OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
20.73k stars 6.32k forks source link

[Question][MAVEN] openapi-generator-maven-plugin inlineSchemaOptions questions #16637

Open KJSchwenze opened 10 months ago

KJSchwenze commented 10 months ago
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.

wing328 commented 9 months ago

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.

what about using docker instead? https://hub.docker.com/r/openapitools/openapi-generator-cli