When using OpenAPI generator with Gradle, I would expect to emit the gendered sources to the standard directory used by other source generator plugins. Something like the Maven generated-sources.
So far I haven't been able to do so, particularly to limit the generation to Java source classes instead of a whole “archetype project”.
It seems that the OpenAPI Gradle plugin workflow isn't thought out the same as the Maven one.
Is there a configuration flag to omit generation of all non-java code and to do so in an “generated sources” folder such as /out/production/generated/?
outputDir
property (equivalent tooutput
in our Maven plugin). The gradle plugin is perhaps "more correct" than the Maven plugin because it uses OpenAPI Generator core's defaults rather than defining others. A common gradle workflow would be to generate to a path relative to the project root, rather than agenerated-sources
directory. Feel free to open an issue on the repo and the core team will work to align or document this a little better. – Lachish