springdoc-openapi icon indicating copy to clipboard operation
springdoc-openapi copied to clipboard

Schema quality reduced after migrating from 2.3.0 to 2.6.0

Open bay73 opened this issue 7 months ago • 0 comments

Describe the bug

We have a class hierarchy describing requests model with possibility of recursive elements. Version springdoc-openapi 2.3.0 produced pretty clean and understandable schema while in version 2.6.0 schema became more complex, includes unnecessary and repeated elements and causes swagger UI to hang when trying to expand endpoint definition. In the attached screenshots you can see how schema looked before and after migration.

To Reproduce Steps to reproduce the behavior:

springdoc_demo.zip

An example gradle project to to reproduce an issue is in the attach zip file. Unpack, build and run the application, navigate to http://localhost:8080/swagger-ui/index.html and see the incorrect schema in Swagger UI.

Expected behavior

Expected schema presented in correct_schema.json. Actual schema generated by version 2.6.0 is in wrong_schema.png wrong_schema.json correct_schema.json

Screenshots Wrong_schema Correct_schema

bay73 avatar Jul 05 '24 10:07 bay73