swagger-api / swagger-parser

Swagger Spec to Java POJOs
http://swagger.io
Apache License 2.0
774 stars 526 forks source link

Wrongly adding extensions field on root level #1971

Open nexon opened 10 months ago

nexon commented 10 months ago

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?