swagger-parser icon indicating copy to clipboard operation
swagger-parser copied to clipboard

Wrongly adding extensions field on root level

Open nexon opened this issue 1 year ago • 0 comments

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?

nexon avatar Sep 05 '23 00:09 nexon