-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Description
Is your feature request related to a problem? Please describe.
Working on large openapi spec files or source files in generale is always tedious, because one has too keep scrolling and/or searching for specific locations to be edited. To ease things up, one can devide a large file into smaller ones and use imports/includes etc. features of the specific parser to glue everythig together. The openapi spec allows to put different parts of a spec into dedicated files which can then be referenced with $ref.
Sometmes though it is more practical, if not the only viable solution to have all the specification in a single file, for example if one wants to open it in a viewer that does nto support resolving $refs with relative paths, for example web based swagger editor.
Describe the solution you'd like
- Add an option - language agnostic - to the openapi generator that enables writing the effective openapi spec to a single file right after resolving all
$ref's from the input spec. - Allow usage of this option in the openapi generator maven plugin.
Describe alternatives you've considered
To work around this missing capability I had to include another plugin (io.swagger.codegen.v3) into my pom.xml file for just that (as decribed here) although I already use the openapi generator for generating models and interfaces.
Additional context
Our build pipeline also requires this huge single file with a specific name which is derived from the artifactId in order to parse the spec file using a standard yaml parser and do some other stuff with it. So the aditional plugin takes care just about that leaving me the confort of working with small separate file.