-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
Comments
Both Restentpoints use the same first restpoint for the documentation. |
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. |
Hello |
Sorry, the names are a little bit different. But it is a tiny example, so it is no problem, I hope. |
@bnasslahsen Do I need to do something to reopen the ticket? |
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](https://private-user-images.githubusercontent.com/196749392/407200738-e51d475d-a561-4ae8-8f43-4f00d270ebff.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5MDU4OTYsIm5iZiI6MTczOTkwNTU5NiwicGF0aCI6Ii8xOTY3NDkzOTIvNDA3MjAwNzM4LWU1MWQ0NzVkLWE1NjEtNGFlOC04ZjQzLTRmMDBkMjcwZWJmZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOFQxOTA2MzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zYTFlMzBjNWFjOGM4M2U5YTliZWE3MjAwMTBjZDYwOWVkNzE1ZTZmOTE5MGQ3ZGViOTFjZTVhN2Y3NGRlMWEzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.0dwmHEHPFi4ehcPTFowZ9Ic7U_x3jJCVTryKWBgpUZk)
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](https://private-user-images.githubusercontent.com/196749392/407201419-43e1368e-6449-4ef7-a4ad-b253d28da9c1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5MDU4OTYsIm5iZiI6MTczOTkwNTU5NiwicGF0aCI6Ii8xOTY3NDkzOTIvNDA3MjAxNDE5LTQzZTEzNjhlLTY0NDktNGVmNy1hNGFkLWIyNTNkMjhkYTljMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOFQxOTA2MzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mNzBiYzc5MWYzNTQyNzMzOTE0YTUxZTVlYzk4ZmMxOWQ2YzViZGMzYWQzODc0NjE3MDdjYzY5NzEwOTU2YjQxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.2e5XzRlGxnwjE1eV-apWqauiiALbzBtA6knoh4Vhsjk)
New Version:
![NewVersion](https://private-user-images.githubusercontent.com/196749392/407201564-a5e70ee0-cd15-4763-932b-bd70ce6ee429.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5MDU4OTYsIm5iZiI6MTczOTkwNTU5NiwicGF0aCI6Ii8xOTY3NDkzOTIvNDA3MjAxNTY0LWE1ZTcwZWUwLWNkMTUtNDc2My05MzJiLWJkNzBjZTZlZTQyOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOFQxOTA2MzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xZmEyMWM0YWQ4MWY3MjNlM2E2ZDA2ZWMzN2U3ZmVmN2FlMTc0MzM5YWYzZDFkODUyMGEyNDc1ZWQ2ODY2MTQ1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.lj6oRWdGIjJALlu-WqjPRkIB9kK5l9DMcI0J82vbYGs)
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 {
The text was updated successfully, but these errors were encountered: