-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
Description
Bug Report Checklist
Hi, I have attempted to use the modelNameMapping configuration. But the generated SDK does not seem to render it.
Went through few reference PRs. #16209
The configuration was passed via pom.xml
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>6.3.0</version>
<executions>
<execution>
<id>generate-java-sdk2</id>
<phase>install</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<skip>${sdk.codegen.skip}</skip>
<inputSpec>${project.build.directory}/openapi.json</inputSpec>
<generatorName>java</generatorName>
<groupId>${sdk2.java.groupId}</groupId>
<artifactId>${sdk2.java.artifactId}</artifactId>
<artifactVersion>${sdk2.java.version}</artifactVersion>
<packageName>${sdk2.java.packageName}</packageName>
<apiPackage>${sdk2.java.packageName}.api</apiPackage>
<modelPackage>${sdk2.java.packageName}.models</modelPackage>
<invokerPackage>${sdk2.java.packageName}.invoker</invokerPackage>
<generateModelTests>false</generateModelTests>
<output>${sdk2.java.outputDirectory}</output>
<library>webclient</library>
<verbose>true</verbose>
<importMappings>
<importMapping>User=com.foo.sdk.common.models.User</importMapping>
<importMapping>Link=com.foo.sdk.common.models.Link</importMapping>
</importMappings>
<schemaMappings>
<schemaMapping>EntityModelUserAccount=com.foo.sdk.models.UserAccount</schemaMapping>
</schemaMappings>
<!-- <modelNameMappings>
<modelNameMapping>EntityModelUserAccount=com.foo.sdk.models.UserAccount</modelNameMapping>
</modelNameMappings> -->
<configOptions>
<hateoas>true</hateoas>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>Seems like the support is available only for select generators.
Could you please suggest how to proceed and enable support for java.
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)