Skip to content

[BUG] 7.17.0 duplicate path root #22581

@mirvnillith

Description

@mirvnillith

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

https://gist.githubusercontent.com/mirvnillith/8c020746fa7458e9b4ed98277e87debf/raw/1c207c5b00f44c2a7b9f8fe65668fd08f0c5cd6e/messages-notices-api-v1.yaml

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions