-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator?
- 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)
Description
Generating Java code duplicates the root path at both interface and method level:
Actual:
@Path("/api/comm/notices-v1") public interface NoticesResource { /** * * * @param auth * @param id The unique identifier of the notice to delete. * @return Mono<Void> */ @DELETE @Path("/api/comm/notices-v1/{id}")
Expected:
@Path("/api/comm/notices-v1") public interface NoticesResource { /** * * * @param auth * @param id The unique identifier of the notice to delete. * @return Mono<Void> */ @DELETE @Path("/{id}")
openapi-generator version
7.17.0 (it works correctly in 7.16.0)
OpenAPI declaration file content or url
Generation Details
<plugin> <groupId>org.openapitools</groupId> <artifactId>openapi-generator-maven-plugin</artifactId> <version>7.17.0</version> <executions> <execution> <id>artifact-notices-api-v1</id> <goals> <goal>generate</goal> </goals> <configuration> <inputSpec>/messages-notices-api-v1.yaml</inputSpec> <packageName>se.fortnox.notices.v1</packageName> <apiNameSuffix>Resource</apiNameSuffix> <typeMappings> <typeMapping>OffsetDateTime=LocalDateTime</typeMapping> </typeMappings> <importMappings> <importMapping>java.time.OffsetDateTime=java.time.LocalDateTime</importMapping> </importMappings> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>se.fortnox.messages</groupId> <artifactId>messages-api</artifactId> <version>${messages-api.version}</version> </dependency> </dependencies> </plugin>
Steps to reproduce
See Generation Details
Related issues/PRs
Suggest a fix
Fix whatever 7.16.0 broke regarding API root paths.