-
Notifications
You must be signed in to change notification settings - Fork 270
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 us to specify response headers #283
Comments
@sergei-maertens, nobody has ever asked for it and i didn't need it yet but it certainly makes sense to support it. i imagine folding those parameters into very doable with a small set of changes. feel free to do a PR, we would certainly include this feature. 👍 |
Response headers are sourced from the @extend_schema(parameters=[...]) decorator. Response headers can apply for every response (global, default) or only be applicable to a particular response status code (e.g. Location header on HTTP 201 Created responses). Specifying the response as either a boolean or a dict mapping status code to boolean serves both situations.
Response headers are sourced from the @extend_schema(parameters=[...]) decorator. Response headers can apply for every response (global, default) or only be applicable to a particular response status code (e.g. Location header on HTTP 201 Created responses). Specifying the response as either a boolean or a dict mapping status code to boolean serves both situations.
Response headers are sourced from the @extend_schema(parameters=[...]) decorator. Response headers can apply for every response (global, default) or only be applicable to a particular response status code (e.g. Location header on HTTP 201 Created responses). Specifying the response as either a boolean or a dict mapping status code to boolean serves both situations.
I'm on
drf-spectacular==0.12.0
- and looking at the code it seems it's not currently possible to document response headersIt's also not listed in the 0.13.x release notes, so I don't think it exists :-)
Is this planned? If not, I could probably make a PR.
The text was updated successfully, but these errors were encountered: