Skip to content

Starting with 2.8.6 OAS 3.1 broken enums #2989

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

Open
crazyav1 opened this issue May 9, 2025 · 3 comments
Open

Starting with 2.8.6 OAS 3.1 broken enums #2989

crazyav1 opened this issue May 9, 2025 · 3 comments

Comments

@crazyav1
Copy link

crazyav1 commented May 9, 2025

Starting from version 2.8.6 with OAS 3.1 enums and examples are displayed broken
2.8.6+

Image Image

2.8.5:
Image

Image
@Mattias-Sehlstedt
Copy link

Mattias-Sehlstedt commented May 9, 2025

Hi,

Springdoc 2.8.6 changed the default OpenAPI specification version from 3.0 to 3.1, this makes swagger-ui change how it renders the specification. You can see it here https://editor-next.swagger.io/ when you in the top left can select File -> Load example -> OpenAPI 3.(1/0) Petstore. And if you go to the 3.1 version you will see that its enum rendering will align with what you show above.

Image

If you prefer the previous way of displaying a specification, then you can set springdoc.api-docs.version=openapi_3_0 in your properties.

@crazyav1
Copy link
Author

crazyav1 commented May 9, 2025

@Mattias-Sehlstedt I do not understand your comment, it was already 3.1 for me before. So you are saying it is intentional change to downgrade visually for 3.1? does not make any sence. Partiularry redundant part "#0=" etc

@Mattias-Sehlstedt
Copy link

If not tied to the specification version, then it is tied to the swagger-ui bump in 2.8.6, and yes the 3.1 rendering is a downgrade with regards to enum display and oneOf/anyOf and objects in general.

This is for example with 3.0

Image

And this with 3.1

Image

But to summarize, the issue is not tied to springdoc-openapi, so any issues with this display format should be raised in swagger-ui.

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

2 participants