swagger-api / swagger-api/swagger-codegen

Vendor Extensions not present in CodegenSecurity

Open
#7,236 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: General Feature: Codegen
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.