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
about the header parameter #25
Comments
Hi!
setup_aiohttp_apispec(
app,
title='My API',
version=__version__,
info={"description": "some markdown description"},
securityDefinitions={
"user": {"type": "apiKey", "name": "Authorization", "in": "header"}
},
) It will add @use_kwargs(MyRequestSchema(strict=True), locations=['headers'])
async def my_handler(self, request: web.Request) -> web.Response:
return web.Response() After that you will see it in your documentation exactly for this method. |
thank you for your reply: |
setup_aiohttp_apispec(
app,
securityDefinitions={
"user": {"type": "apiKey", "name": "Accept", "in": "header"}
},
) |
sorry .but this solution can not make the request from swagger contain the accept header just like : |
Field description - use |
@larssonsun I see that the question is answered, so I'm closing issue. |
if you still need this feature, you have to add setup_aiohttp_apispec(
app,
securityDefinitions={
"user": {"type": "apiKey", "name": "Accept", "in": "header"}
},
security=[{"user": []}]
) |
hi, thanks for your proj:
how to add a parameter whitch the parameter's type is header,for exmaple
the accept header or some customize headers juest like token ?
The text was updated successfully, but these errors were encountered: