-
-
Notifications
You must be signed in to change notification settings - Fork 979
Description
We could type Resource as a union of Protocols 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 who 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. 🤔