Search code examples
javaopenapiopenapi-generator

Generate files at different location using openapi-generator


I am using the OpenAPI generator to generate my APIs. My requirement is that I want to generate at different locations. For example I wish to generate and save models in some other directory than the service class, but there seems to be just one option outputDir. Can someone suggest a way to generate files at different locations?


Solution

  • outputDir is the only option to customize the output location for all files at the moment.

    If you want to put some auto-generated files in a particular location, I would recommend a script to post-process the output (e.g. move files around).