Mermade / oas-kit

Convert Swagger 2.0 definitions to OpenAPI 3.0 and resolve/validate/lint
https://mermade.org.uk/openapi-converter
BSD 3-Clause "New" or "Revised" License
698 stars 129 forks source link

[swagger2openapi][components] Add a prefix to generated components #646

Open silversoul93 opened 1 year ago

silversoul93 commented 1 year ago

Detailed Description

During the conversion of a swagger file to oas using swagger2openapi with Node.JS, the algorithm creates the components object. Is there the possibility to add a prefix to components?

Now the result is:

{
  "components": {
    "requestBodies": {
      "Body": ...
      "Body2": ...
    }
  }
}

Is there the possibility to add a prefix to Body, Body2 and other components?

Thanks.

silversoul93 commented 1 year ago

Hi, do you have some news about this request? @MikeRalphson I can open a PR too to support this functionality if it's not supported and if you agree.

MikeRalphson commented 9 months ago

If you're still interested, can you tell me why you need this feature?