spring-projects / spring-authorization-server

Spring Authorization Server
https://spring.io/projects/spring-authorization-server
Apache License 2.0
4.78k stars 1.25k forks source link

Upgrading to 3.3.X is breaking spring doc to retreive Oauth2 endpoints #1661

Closed abderrezakBoukazouha closed 4 days ago

abderrezakBoukazouha commented 1 week ago

Describe the bug Upgrading the package "spring-boot-starter-oauth2-authorization-server" from 3.2.X to 3.3.X is breaking spring doc openapi, with this error :

Null key for a Map not allowed in JSON (use a converting NullKeySerializer?) (through reference chain: io.swagger.v3.oas.models.OpenAPI["paths"]->io.swagger.v3.oas.models.Paths["null"])

this error appears starting from the version 3.3.0, I have tested 2.2.5 and 2.2.7 and it worked perfectly.

To Reproduce accessing this endpoint http://localhost:8080/oauth2/docs/swagger-ui/index.html , see the sample, Downgrading to 3.2.7 or 3.2.5 solve the issue and shows the list of endpoints like the image bellow.

Expected behavior displaying the availble endpoints and schemas like the 3.2.X versions.

Capture d’écran 2024-06-27 à 11 39 10

Sample

Link to minimalistic sample : https://github.com/abderrezakBoukazouha/sample-oauth2-authorization-server-bug/tree/master

abderrezakBoukazouha commented 4 days ago

Hello, I'm closing this issue since is has been fixed with latest update of springdoc-openapi-starter-webmvc-ui to 2.6.0. Link to the changelog :https://github.com/springdoc/springdoc-openapi/releases/tag/v2.6.0