In my company, we are would like to recommend OpenAPI and using the design first approach to API development. We would also like to use the OpenAPI Generator to generated server stubs and DTOs from OpenAPI specs.
We are using the OpenAPI Generator maven plugin as our projects are Java based.
It seems though that the autogenerated code (server stubs, DTOs, etc) always end up in the /target folder and there is no way to configure it to write to the /src directory out of the box.
Since this behavior is by design and since the plugin was intended to behave this way by it's creators, my question is: are we not supposed to keep the autogenerated code in the /src folder? Is that code not meant to be committed and versioned along with the rest of the project code?
Any hints would be appreciated.