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

Maven plugin seems to be missing the api-name-suffix argument #12055

Open
anthonymayfield opened this issue Apr 5, 2022 · 4 comments
Open

Maven plugin seems to be missing the api-name-suffix argument #12055

anthonymayfield opened this issue Apr 5, 2022 · 4 comments

Comments

@anthonymayfield
Copy link

Maybe I have missed something but I can't find the apiNameSuffix argument I was expecting in the maven plugin. It appears to be an option for the CLI but I can't see or use it in the plugin.

@dave-minter
Copy link

It would be nice if it was part of the immediate configuration properties, but it can be added via additional properties. E.g.

<configuration>
...
	<additionalProperties>
		<additionalProperty>apiNameSuffix=ApiClient</additionalProperty>
	</additionalProperties>
</configuration>

@NoyTim
Copy link

NoyTim commented Nov 3, 2022

Hi Dave,
still have no success with your example. The apiNameSuffix has no impact on the generated classes. Using version 6.2.1.

<plugin>
  <groupId>org.openapitools</groupId>
  <artifactId>openapi-generator-maven-plugin</artifactId>
  <executions>
      <execution>
          <id>Api</id>
          <goals>
              <goal>generate</goal>
          </goals>
          <configuration>
              <inputSpec>
                  ${project.basedir}/src/main/resources/General-API.yaml
              </inputSpec>
              <generatorName>spring</generatorName>
              <library>spring-boot</library>
              <modelNameSuffix>Suffix</modelNameSuffix>
              <additionalProperties>
                  <additionalProperty>apiNameSuffix=ApiClient</additionalProperty>
              </additionalProperties>
              <apiPackage>com.test.rest.general</apiPackage>
              <modelPackage>com.test.rest.general.dto</modelPackage>
              <supportingFilesToGenerate>
                  ApiUtil.java
              </supportingFilesToGenerate>
              <configOptions>
                  <delegatePattern>true</delegatePattern>
                  <dateLibrary>java8</dateLibrary>
                  <java8>true</java8>
                  <useBeanValidation>true</useBeanValidation>
              </configOptions>
          </configuration>
      </execution>
  </executions>
</plugin>

@GetStart13
Copy link

generator spring can not,kotlin-spring can,you can replace it temporaily,wait fix

@grubeninspekteur
Copy link

See #8822

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

No branches or pull requests

5 participants