swagger-api / swagger-api/swagger-parser
security requiements object is ignored when the components are in different file
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 867
- Forks
- 560
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
Description
my open api file is composed of two files.
openapi.yaml
and components.yaml
the paths in my openapi.yaml references the components files.
openapi-generator (javascript) ignores the security field unless I merged the two files
seems like the security field and the components (and their security schemes ) must be in the same file.
openapi-generator version
3.3.2
OpenAPI declaration file content or url
components.yaml
components:
securitySchemes:
api_key:
type: apiKey
name: x-api-key
in: header
openapi.yaml
security:
- api_key: []
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
Reproduce the issue using the split openapi.yaml and components.yaml examples, with the security scheme defined in components.yaml and the security requirement in openapi.yaml. Start by tracing how the parser resolves referenced components and security schemes across files. Done means the JavaScript generator honors the security requirement without merging the files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100