json-schema-org / json-schema-org/JSON-Schema-Test-Suite
Add test for multipleOf to ensure that implementation does not have an issue regarding scale
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 750
- Forks
- 308
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 24
Description
This is not a float/double related issue but is one regarding scale. Consider the following schema:
[
{
"description": "by deep scale",
"schema": {"multipleOf": 0.25},
"tests": [
{
"description": "8.75 is multiple of 0.25",
"data": 8.75,
"valid": true
},
{
"description": "8.750000000001 is not multiple of 0.25",
"data": 8.750000000001,
"valid": false
},
{
"description": "8.7500000000001 is not multiple of 0.25",
"data": 8.7500000000001,
"valid": false
},
{
"description": "8.75000000000001 is not multiple of 0.25",
"data": 8.75000000000001,
"valid": false
}
]
}
]
This will ensure libraries with language support for a rich big decimal are not constrained by a low exponent check.
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
Locate the test fixture containing multipleOf cases and review how numeric validation examples are organized. Add the provided deep-scale schema cases, then run the JSON Schema Test Suite checks to confirm 8.75 is valid while each more precise value is invalid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100