I am using openapi and just updated to spring 3. I ran into some issue since spring 3 uses Jakarta and not Javax. Here is a post if you have this issue
Therefore I need to use the open.api plugin for the configOptions
<configOptions>
<configHelp>false</configHelp>
<sourceFolder>.</sourceFolder>
<useJakartaEe>true</useJakartaEe> <--- need this
However the the word “application” is duplicated in the filepath.
<inputSpec>${project.basedir}/application/target/generated-sources/openapi/json/AdminService.gcp.json</inputSpec>
The above will look like
<root path>/application/application/target/generated-sources/openapi/json/AdminService.gcp.json
Why the added application??? Removing “application” from the naturally results it its complete removal.
plugin
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>${openapi-generator-maven-plugin.version}</version>
<executions>
<execution>
<id>generate-admin-services</id>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<configOptions>
<configHelp>false</configHelp>
<sourceFolder>.</sourceFolder>
<useJakartaEe>true</useJakartaEe>
<useTags>true</useTags>
<openApiNullable>false</openApiNullable>
<skipDefaultInterface>true</skipDefaultInterface>
<interfaceOnly>true</interfaceOnly>
</configOptions>
<generateApis>true</generateApis>
<generateAliasAsModel>false</generateAliasAsModel>
<generateSupportingFiles>false</generateSupportingFiles>
<generateApiTests>false</generateApiTests>
<inputSpec>${project.basedir}/application/target/generated-sources/openapi/json/AdminService.gcp.json</inputSpec>
<generatorName>spring</generatorName>
<output>${project.basedir}/target/generated-sources/openapi/java</output>
<typeMappings>map=java.util.Map</typeMappings>
<apiPackage>qw.tell.admin</apiPackage>
<modelPackage>qw.tell.admin</modelPackage>
<output>${project.build.directory}/target/generated-sources/openapi/java</output>
</configuration>
I thought maybe using different variants of ${project.basedir} might help but it did not
${project.build.directory}
${project.uri}
${project.basedir}
In the end I am trying to make the input url look like
${project.basedir}/application/target/generated-sources/openapi/json/AdminService.gcp.json
and not
${project.basedir}/application/application/target/generated-sources/openapi/json/AdminService.gcp.json</inputSpec>
Any advice would be appreciated.