swagger-api / swagger-ui

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
https://swagger.io
Apache License 2.0
26.39k stars 8.93k forks source link

Support for integers larger than i32 #10049

Open DenuxPlays opened 3 months ago

DenuxPlays commented 3 months ago

Q&A (please complete the following information)

Describe the bug you're encountering

I am sending big numbers over my api and everything bigger than i32 gets wrongly displayed.
For example in my db the number is: 60503861139345408 but swagger-ui displays: 60503861139345410

To reproduce...

Steps to reproduce the behavior:

  1. serve large numbers over your api
  2. see what swagger-ui displays

Expected behavior

Display the correct number

Screenshots

//

Additional context or thoughts

I found this comment but I think this is right. If I want to serve big numbers over my api swagger-ui should not be the limiting factor.

I understand that their is no correct way to serialize BigInts to Json but at the end the shown json file is just a string that is shown so I should be possible to serialize it to a string and remove the " right?

DenuxPlays commented 3 months ago

I understand that json does not specify how large numbers can be so thats another point to not be limited by swagger-ui