OpenAPITools / OpenAPITools/openapi-generator
[Question][MAVEN] openapi-generator-maven-plugin inlineSchemaOptions questions
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
I have problems with super long class names when generating java code with openapi-generator-maven-plugin version 6.6.0.
E.g.
SearchpassengerPnr200ResponseAirAvailFlightsForCheckInDcsflightSegmentListInnerFlightSegmentArrivalAirportCityInfoCountryCurrency.java
The plugin suggests to set a title or use inlineSchemaNameMapping. That worked but will cause 500+ entries in my pom to resolve all class names. A title is not an option because the yaml was provided from a third party and can be updated once a while.
Comming from SOAP world I am searching something like jaxws-maven-plugin autoNameResolution feature and gave inlineSchemaOptions a shoot, without success.
Message:
[WARNING] Parameter 'inlineSchemaOptions' is unknown for plugin 'openapi-generator-maven-plugin:6.6.0:generate (generateClient)'
I cannot use a newer plugin version like 7.0.1 cause it crashes with an error sating my local java is to old, which is true but I need to stick to it.
openapi-generator version 6.6.0
The question is if there is something similar to autoNameResolution which will extend the class name of the inner class only if necessary like if there are name duplicates.
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 by reviewing the openapi-generator-maven-plugin configuration around inlineSchemaOptions in version 6.6.0 and the generated Java class-name handling. Determine whether an autoNameResolution-style option can avoid duplicate names without 500+ inlineSchemaNameMapping entries, and document the supported configuration or required change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100