swagger-api / swagger-api/swagger-codegen
Generated auth_settings in configuration.py is empty for bearerAuth
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Generated auth_settings in configuration.py is empty for bearerAuth.
This issue is reported years ago (https://github.com/swagger-api/swagger-codegen/issues/10060) but no response yet, so I open a new one here.
Swagger-codegen version
3.0.46
Swagger declaration file content or url
openapi.yaml
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
security:
- bearerAuth: []
generated code
def auth_settings(self):
"""Gets Auth Settings dict for api client.
:return: The Auth Settings information dict.
"""
return {
}
Command line used for generation
https://editor-next.swagger.io/
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the provided openapi.yaml in editor-next.swagger.io, then inspect generated configuration.py and the handling of the bearerAuth security scheme. Done means the generated Python client's auth_settings is no longer empty for this bearerAuth declaration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, python
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100