Skip to content

Swagger-ui doesn't display correctly long numbers with 17 or more digits #2985

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

Closed
romulolara opened this issue May 8, 2025 · 2 comments
Closed

Comments

@romulolara
Copy link

romulolara commented May 8, 2025

Describe the bug
The response of my endpoint has an attribute number with 17 digits. It can be a Long or BitInteger. On TryItOut swagger-ui the number in response shows wrong at the last digit.

I changed the attribute's type to String and it works.

To Reproduce
I have a Spring Boot 3.4.5 application, with springdoc-openapi-starter-webmvc-ui 2.8.6.
test repository springdoc-ui-issue

Swagger-ui endpoint: http://localhost:8080/swagger-ui/index.html#/test-controller/getTest

Expected behavior
Expects that long number with 17 or more digits shows correctly.
In the following screenshot the number should be 12345678901234567 as like the String field.

Screenshots
17 digits number wrong

@Mattias-Sehlstedt
Copy link

Not tied to springdoc, please see swagger-api/swagger-ui#2030

@romulolara
Copy link
Author

Not tied to springdoc, please see swagger-api/swagger-ui#2030

Ok. Closing it so.

@romulolara romulolara closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2025
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