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 · 1 comment
Open

Restentpoints with same name get mix up #2876

Uwe-Br opened this issue Jan 28, 2025 · 1 comment

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.

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

No branches or pull requests

1 participant