OpenAPITools / OpenAPITools/openapi-generator
[REQ] Openapi generator maven plugin does not support "Supporting files" configuration
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
I'm trying to use openapi-generator maven plugin to generate JAVA SDK based on the OAS yaml file. Apart from the API and models, I'd like to generator a utility java file with the template engine. I went through the official document that said it can be achieved by openapi-generator cli with a configuration file(https://openapi-generator.tech/docs/customization/).
templateDir: my_custom_templates
additionalProperties:
artifactId: kotlin-petstore-client
serializableModel: "true"
dateLibrary: java8
files:
AUTHORS.md: {}
api_interfaces.mustache:
templateType: API
destinationFilename: Interface.kt
api.mustache:
templateType: API
destinationFilename: Impl.kt
other/check.mustache:
folder: scripts
destinationFilename: check.sh
templateType: SupportingFiles
The check.mustache in the example is actually what I need(define a template and convert it to util file), and looks it's simple enough by adding things under the files node. However, I found the openapi-generator maven plugin does not support such files configuration in the pom.xml.
Describe the solution you'd like
Do some configuration in the maven pom to declare the supporting files, just like the CLI approach.
Describe alternatives you've considered
N/A
Additional context
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the openapi-generator Maven plugin configuration in pom.xml and compare it with the CLI customization documentation and its files configuration. Done means Maven users can declare supporting files, templates, destinations, folders, and template types in the pom with behavior equivalent to the CLI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100