swagger-api / swagger-api/swagger-codegen
Vendor Extensions not present in CodegenSecurity
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Hi,
CodegenSecurity does no have a property for vendorExtensions and therefore it is not populated by the values provided from SecuritySchemeDefinition.
But the spec dictates that those values should be available as displayed here:
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#security-scheme-object
Swagger-codegen version
2.2.2, but confirmed that the issue is present in the 2.3.0 and 3.0.0 branches
Related issues/PRs
Not directly linked to this but similar to: https://github.com/swagger-api/swagger-codegen/issues/4022
Suggest a fix/enhancement
- Add the vendorExtensions property to
CodegenSecurity. - Populate the extensions at
DefaultCodegen.fromSecurity()
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 locating CodegenSecurity and DefaultCodegen.fromSecurity() in the codebase, then compare their handling with the OpenAPI 2.0 Security Scheme Object. Done means CodegenSecurity exposes vendor extensions and DefaultCodegen.fromSecurity() populates them from SecuritySchemeDefinition; validate behavior against the referenced specification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100