swagger-api / swagger-api/swagger-ui

Error on providing value for double as less than 1e-6 or 0.000001 inside body

Open
#8,363 1 comment 1 reaction 0 assignees View on GitHub

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/

image

As can be seen in attach screenshot on https://editor.swagger.io/ :

  1. "wavelength" property is defined as "double"
  2. On using "Try it out", value of wavelength is provided as 0.00000085 which is less than 0.000001
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.