Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable appending def to generated class names after upgrading from 5.30 -> 7.6.0 #18990

Closed
drewjocham opened this issue Jun 21, 2024 · 4 comments

Comments

@drewjocham
Copy link

Description

After upgrading the openapi-generator-maven-plugin from version 5.3.0 to 7.6.0 def is appended to all the generated class names. Example Action.java is now Actiondef.java. The only thing that has changed is the version. How can we stop this from happening?

openapi-generator version
<version>7.6.0</version>   
OpenAPI declaration file content or url
<plugin>
        <groupId>org.openapitools</groupId>
        <artifactId>openapi-generator-maven-plugin</artifactId>
        <version>7.6.0</version>
        <executions>
          <execution>
            <id>generate-java</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <configOptions>
                <useJakartaEe>true</useJakartaEe>
                <sourceFolder>.</sourceFolder>
                <interfaceOnly>true</interfaceOnly>
                <useTags>true</useTags>
                <dateLibrary>java8</dateLibrary>
                <java8>true</java8>
                <reactive>false</reactive>
                <useBeanValidation>true</useBeanValidation>
                <performBeanValidation>true</performBeanValidation>
                <useOptional>true</useOptional>
                <serviceInterface>false</serviceInterface>
                <serviceImplementation>false</serviceImplementation>
              </configOptions>
              <generateAliasAsModel>false</generateAliasAsModel>
              <generateApiDocumentation>true</generateApiDocumentation>
              <generateApis>false</generateApis>
              <generateApiTests>false</generateApiTests>
              <generateModelDocumentation>true</generateModelDocumentation>
              <generateModels>true</generateModels>
              <generateModelTests>true</generateModelTests>
              <generateSupportingFiles>false</generateSupportingFiles>
              <generatorName>spring</generatorName>
             <inputSpec>${generated.sources.openapi}/EtlConfiguration.api.json</inputSpec>
              <typeMappings>map=java.util.Map</typeMappings>
              <modelPackage>etl.product.configuration.models</modelPackage>
              <output>${generated.sources.java}</output>
            </configuration>
          </execution>
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
@wing328
Copy link
Member

wing328 commented Jun 21, 2024

can you please share the spec?

don't think we add the def suffix to the model name behind the scene

@drewjocham
Copy link
Author

@wing328 Thanks for responding. Are you referring to a xxx.api.json file or xxx.def.json file?

@drewjocham
Copy link
Author

drewjocham commented Jun 25, 2024

bump. There was a change between 5.4.x and 6.1.x. After 6.1.x def is appended to all my entities.

@drewjocham
Copy link
Author

I had files name foo.def.json. Removing the def from the files resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants