-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow alt_response on MethodView #280
Comments
From what I can see, this feature has been added now? Unfortunately it seems like adding If not, should I file a separate issue or is this already listed (I couldn't find anything)? Edit: in fact, it seems like all method-level annotations (eg Docstrings) get ignored when providing a class-level |
I don't remember but from your findings, the use case is still unsupported. It just seems to work but screws everything up. Let's keep the discussion in this thread. |
Thanks! My bad then: just assumed it had been implemented, but if it's still WIP, feel free to ignore the above comment 😉 |
No pb. Your comment may help someone facing the same issue. As you can see, it is not really in progress, unless someone wants to take charge. |
It would be a nice enhancement to allow the usage of the
alt_response
-Decorator onMethodView
-classes.It could act as a shortcut to decorating every endpoint of the view with
alt_response
.An example use case would be a custom converter that rejects any pet_id not present in the pet database.
Since its declared in the
route
-decorator, every endpoint will raise 404 if the pet was not found:The text was updated successfully, but these errors were encountered: