-
-
Notifications
You must be signed in to change notification settings - Fork 967
Description
We could type Resource as a union of Protocol
s similar to what was done for middleware in #2390.
One caveat is that we would reasonably introduce only the protocols for the most common HTTP verbs such as GET
, HEAD
, DELETE
, POST
, PATCH
, PUT
, etc. These protocols would only cover non-suffixed responders, but maybe that's reasonable too? Since suffixes were introduced to be able to define additional resources in the same class, not having only suffixed responders.
Furthermore, we would probably need to publish the resource types as part of the public interface (falcon.typing
) for the users that want to properly annotate middleware methods.
So maybe we could first evaluate community feedback on making the App
types generic in 4.2 before proceeding to this. 🤔