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

Restentpoints with same name get mix up #2876

Open
Uwe-Br opened this issue Jan 28, 2025 · 5 comments
Open

Restentpoints with same name get mix up #2876

Uwe-Br opened this issue Jan 28, 2025 · 5 comments
Labels
incomplete incomplete description: Make sure you Provide a Minimal, Reproducible Example - with HelloController

Comments

@Uwe-Br
Copy link

Uwe-Br commented Jan 28, 2025

Describe the bug

I updated springdoc-openapi-starter-webmvc-ui from Version 2.6.0 to Version 2.8.4 (Version 2.7.0, same issue). And I updated spring-boot-starter-parent from 3.3.5 to 3.4.2.
After the update, I recognize a problem with the swagger UI. Restpoints with the same name get mixed up. The UI shows the correct header, but if I open one, both open. Both use the from the first restpoint.

Expected behavior

springdoc-openapi-starter-webmvc-ui Version 2.8.4 should have same behavior as Version 2.6.0

Screenshots

UI with same Restentpoints names:
Image

In the old (2.6.0) HTML code, both areas had different IDs. With the new Version, both areas get the samIDId.

Old Version:
OldVersion

New Version:
NewVersion

Additional context

@ApiResponse(responseCode = "200", description = "Liste aller Verfahren", content = { @Content(mediaType = "application/json", schema = @Schema(anyOf = { VerfahrenDtoRestKurz.class, VerfahrenDtoRest.class })) }) @ApiResponse(responseCode = "409", description = "Interner Fehler beim Aulesen der Daten.", content = { @Content(schema = @Schema(implementation = ProblemErrors.class), mediaType = MediaType.APPLICATION_PROBLEM_JSON_VALUE) }) @ApiResponse(responseCode = "404", description = "Kein Verfahren wurde gefunden.", content = { @Content(schema = @Schema(implementation = ProblemErrors.class), mediaType = MediaType.APPLICATION_PROBLEM_JSON_VALUE) }) @ApiResponse(responseCode = "403", description = "Keine Zugriffsrechte", content = { @Content(schema = @Schema(implementation = ProblemErrors.class), mediaType = MediaType.APPLICATION_PROBLEM_JSON_VALUE) }) @ApiResponse(responseCode = "400", description = "Parameter ist unbekannt.", content = { @Content(schema = @Schema(implementation = ProblemErrors.class), mediaType = MediaType.APPLICATION_PROBLEM_JSON_VALUE) }) @GetMapping(produces = MediaType.APPLICATION_JSON_VALUE) public Set<Object> getVerfahren( @Parameter(required = false, description = "Wird als Parameter 'lang' angeben, wird VerfahrenLang zurück geben ansonsten VerfahrenKurz.") @RequestParam(name = "darstellung", required = false) final Optional<String> darstellung) throws KeineDatenException {

@ApiResponse(responseCode = "409", description = "Interner Fehler beim Aulesen der Daten.", content = { @Content(schema = @Schema(implementation = ProblemErrors.class), mediaType = MediaTypes.HTTP_PROBLEM_DETAILS_JSON_VALUE) }) @ApiResponse(responseCode = "404", description = "Kein Verfahren wurde gefunden.", content = { @Content(schema = @Schema(implementation = ProblemErrors.class), mediaType = MediaTypes.HTTP_PROBLEM_DETAILS_JSON_VALUE) }) @ApiResponse(responseCode = "403", description = "Keine Zugriffsrechte", content = { @Content(schema = @Schema(implementation = ProblemErrors.class), mediaType = MediaType.APPLICATION_PROBLEM_JSON_VALUE) }) @ApiResponse(responseCode = "400", description = "Parameter ist unbekannt.", content = { @Content(schema = @Schema(implementation = ProblemErrors.class), mediaType = MediaType.APPLICATION_PROBLEM_JSON_VALUE) }) @GetMapping(value = "/{vvpId}", produces = MediaType.APPLICATION_JSON_VALUE) public VerfahrenDtoRest getVerfahren(@PathVariable("vvpId") final Long vvpId) throws KeineDatenException {

@Uwe-Br
Copy link
Author

Uwe-Br commented Jan 28, 2025

Both Restentpoints use the same first restpoint for the documentation.

@bnasslahsen
Copy link
Collaborator

@Uwe-Br,

Try providing a Minimal, Reproducible Example - with HelloController that reproduces the problem.

This ticket will be closed, but can be reopened if your provide the reproducible sample.

@bnasslahsen bnasslahsen added the incomplete incomplete description: Make sure you Provide a Minimal, Reproducible Example - with HelloController label Feb 8, 2025
@Uwe-Br
Copy link
Author

Uwe-Br commented Feb 11, 2025

Hello
I created an example. Important are the file Application.properties. With this change, I can reproduce the Bug.

demo.zip

@Uwe-Br
Copy link
Author

Uwe-Br commented Feb 11, 2025

Sorry, the names are a little bit different. But it is a tiny example, so it is no problem, I hope.

@Uwe-Br
Copy link
Author

Uwe-Br commented Feb 14, 2025

@bnasslahsen Do I need to do something to reopen the ticket?

@bnasslahsen bnasslahsen reopened this Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incomplete incomplete description: Make sure you Provide a Minimal, Reproducible Example - with HelloController
Projects
None yet
Development

No branches or pull requests

2 participants