swagger-api / swagger-api/swagger-parser
Wrongly adding extensions field on root level
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 867
- Forks
- 560
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
I'm currently using swagger-parser to transform Swagger 2.0 Specification to a OpenAPI 3.0.
The problem with the conversion is that it oddly add a new field (extensions) at the root level and inside of it the extension, instead of adding the extension ("x-original-swagger-version") at the root level
"openapi": "3.0.1",
"paths": {...},
"components": {...},
"extensions" : {
"x-original-swagger-version" : "2.0"
}
There is some configuration that I'm missing or it is something that is backed up by the standard?
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 Swagger 2.0 to OpenAPI 3.0 conversion described in the issue and inspect how the root-level extension is represented. The work is done when "x-original-swagger-version" appears directly at the OpenAPI document root rather than under an "extensions" field.
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
- 45/100