Closed baccenfutter closed 3 years ago
hmm for the next version I use request from starlette instead Header from fastAPI to get header name, In some cases, you want to change Authorization header to Auth or something like that and because I use request from starlette, swagger UI doesn't support. @baccenfutter you can check my code
but in your cases, it's a mistake from fastAPI related to you mention
When using the API via FastAPI's built-in SwaggerUI, a field for the
Authorization
header is shown in the JWT endpoints, however the header seems to not be set in the request, resulting in the following error:Example
When I navigate to http://localhost:8000/docs I am presented with my two endpoints.
/login
endpointauthorization
field of the/refresh
endpoint/refresh
endpointI then get the error show above.
I've also noticed that the header isn't show to be set in the
curl
command, shown in the SwaggerUI:Versions
Is this possibly related to https://github.com/swagger-api/swagger-ui/issues/981#issuecomment-277922089?