swagger-api / swagger-api/swagger-ui
Error on providing value for double as less than 1e-6 or 0.000001 inside body
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Error is on Swagger 2.0 specification and visible on https://editor.swagger.io/

As can be seen in attach screenshot on https://editor.swagger.io/ :
- "wavelength" property is defined as "double"
- On using "Try it out", value of wavelength is provided as 0.00000085 which is less than 0.000001
- On clicking "Execute", the below error can be seen:
Please correct the following validation errors and try again.
propKeychannelserrorindex0errorpropKeywavelengtherrorValue must be a number
Just to add that this error does not come when value provided is equal to or greater than 0.000001
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in Swagger UI at editor.swagger.io using a Swagger 2.0 body with a double wavelength value of 0.00000085, then compare it with 0.000001. Trace the Try it out request validation that produces “Value must be a number”; done means valid values below 0.000001 are accepted without that validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100