-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support for Bearer Token #4
Comments
@pedrorjbr what is the version of fastapi and fastapi-swagger2? |
@pedrorjbr I am not able to reproduce it with latest versions. |
This is OpenAPI Json (openapi:3.1.0) FastApi Version: fastapi==0.111.0 |
Ahh got it. Need to figure out an alternative or atleast handle the error. |
@pedrorjbr Please use #v0.2.4, It will skip security definitions that are not supported by swagger 2.0 and not crash. |
@virajkanwade Use |
@pedrorjbr In my case, it was pretty straightforward for me. In the CI/CD pipeline, I added an env var for local. I used to expose both the specs when env var was set to local. In your case, the auth customization you do, if you can automate it, you could do it in a similar way. Hope this helps. |
I am getting this error using it on my fastapi application.
{"errors":[{"status":422,"title":"Input should be 'apiKey', 'basic' or 'oauth2'","detail":"Check this field (securityDefinitions -> HTTPBearer -> BasicAuth -> type) for errors."},{"status":422,"title":"Input should be 'apiKey', 'basic' or 'oauth2'","detail":"Check this field (securityDefinitions -> HTTPBearer -> APIKey -> type) for errors."},{"status":422,"title":"Field required","detail":"The field
securityDefinitions -> HTTPBearer -> APIKey -> in
is required and cannot be missing."},{"status":422,"title":"Field required","detail":"The fieldsecurityDefinitions -> HTTPBearer -> APIKey -> name
is required and cannot be missing."},{"status":422,"title":"Input should be 'apiKey', 'basic' or 'oauth2'","detail":"Check this field (securityDefinitions -> HTTPBearer -> OAuth2Implicit -> type) for errors."},{"status":422,"title":"Field required","detail":"The fieldsecurityDefinitions -> HTTPBearer -> OAuth2Implicit -> flow
is required and cannot be missing."},{"status":422,"title":"Field required","detail":"The fieldsecurityDefinitions -> HTTPBearer -> OAuth2Implicit -> authorizationUrl
is required and cannot be missing."},{"status":422,"title":"Input should be 'apiKey', 'basic' or 'oauth2'","detail":"Check this field (securityDefinitions -> HTTPBearer -> OAuth2Password -> type) for errors."},{"status":422,"title":"Field required","detail":"The fieldsecurityDefinitions -> HTTPBearer -> OAuth2Password -> flow
is required and cannot be missing."},{"status":422,"title":"Field required","detail":"The fieldsecurityDefinitions -> HTTPBearer -> OAuth2Password -> tokenUrl
is required and cannot be missing."},{"status":422,"title":"Input should be 'apiKey', 'basic' or 'oauth2'","detail":"Check this field (securityDefinitions -> HTTPBearer -> OAuth2Application -> type) for errors."},{"status":422,"title":"Field required","detail":"The fieldsecurityDefinitions -> HTTPBearer -> OAuth2Application -> flow
is required and cannot be missing."},{"status":422,"title":"Field required","detail":"The fieldsecurityDefinitions -> HTTPBearer -> OAuth2Application -> tokenUrl
is required and cannot be missing."},{"status":422,"title":"Input should be 'apiKey', 'basic' or 'oauth2'","detail":"Check this field (securityDefinitions -> HTTPBearer -> OAuth2AccessCode -> type) for errors."},{"status":422,"title":"Field required","detail":"The fieldsecurityDefinitions -> HTTPBearer -> OAuth2AccessCode -> flow
is required and cannot be missing."},{"status":422,"title":"Field required","detail":"The fieldsecurityDefinitions -> HTTPBearer -> OAuth2AccessCode -> authorizationUrl
is required and cannot be missing."},{"status":422,"title":"Field required","detail":"The fieldsecurityDefinitions -> HTTPBearer -> OAuth2AccessCode -> tokenUrl
is required and cannot be missing."},{"status":422,"title":"Field required","detail":"The fieldsecurityDefinitions -> HTTPBearer -> Reference -> $ref
is required and cannot be missing."}]}The text was updated successfully, but these errors were encountered: