From 96729e96fa93ef2225ca981ca8f5f627aeed31f4 Mon Sep 17 00:00:00 2001 From: akshat 09867 Date: Thu, 26 Dec 2024 23:06:43 +0530 Subject: [PATCH 1/4] added instruction for multiple of --- .../2020-12/draft-bhutton-json-schema-validation-01.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/draft/2020-12/draft-bhutton-json-schema-validation-01.html b/public/draft/2020-12/draft-bhutton-json-schema-validation-01.html index 540d9ecf5..e7c392a28 100644 --- a/public/draft/2020-12/draft-bhutton-json-schema-validation-01.html +++ b/public/draft/2020-12/draft-bhutton-json-schema-validation-01.html @@ -1744,6 +1744,13 @@

A numeric instance is valid only if division by this keyword's value results in an integer.

+

+ Limitations:Using a floating-point value for 'multipleOf' may lead to inconsistent validation results due to binary precision issues. + Consider using scaled integers instead.

+

+ Solution: Avoid using floating-point numbers with 'multipleOf' due to potential precision issues. For example, use scaled integers (e.g., represent $4.02 as 402 and 'multipleOf' as 1). + If using floating point then use Floating-point-friendly numbers (like 0.05) as it will reduce the chance of + precision issues but are still less reliable than integers.

From 961a51b995429d31a85cfbf4f0bdaec08f26d546 Mon Sep 17 00:00:00 2001 From: akshat 09867 Date: Fri, 27 Dec 2024 21:54:51 +0530 Subject: [PATCH 2/4] #1113 added validation of multipleof --- package.json | 2 +- ...raft-bhutton-json-schema-validation-01.html | 9 +++------ yarn.lock | 18 +++++++++--------- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 907665250..f0e0ec15e 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "postcss": "^8.4.41", "prettier": "3.3.3", "tailwindcss": "^3.3.5", - "typescript": "5.7.2", + "typescript": "~5.3.0", "webpack": "^5.94.0" }, "babel": { diff --git a/public/draft/2020-12/draft-bhutton-json-schema-validation-01.html b/public/draft/2020-12/draft-bhutton-json-schema-validation-01.html index e7c392a28..58bbc13a8 100644 --- a/public/draft/2020-12/draft-bhutton-json-schema-validation-01.html +++ b/public/draft/2020-12/draft-bhutton-json-schema-validation-01.html @@ -1745,12 +1745,9 @@

A numeric instance is valid only if division by this keyword's value results in an integer.

- Limitations:Using a floating-point value for 'multipleOf' may lead to inconsistent validation results due to binary precision issues. - Consider using scaled integers instead.

-

- Solution: Avoid using floating-point numbers with 'multipleOf' due to potential precision issues. For example, use scaled integers (e.g., represent $4.02 as 402 and 'multipleOf' as 1). - If using floating point then use Floating-point-friendly numbers (like 0.05) as it will reduce the chance of - precision issues but are still less reliable than integers.

+ To ensure consistent validation: + - Use scaled integers (e.g., represent $4.02 as 402 with 'multipleOf: 1') + - If floating-point values are necessary, use binary-friendly numbers (e.g., 0.5, 0.25, 0.125)

diff --git a/yarn.lock b/yarn.lock index 73ad621c7..6ff1ba254 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8349,7 +8349,7 @@ __metadata: slate-react: "npm:^0.108.0" slugify: "npm:^1.6.5" tailwindcss: "npm:^3.3.5" - typescript: "npm:5.7.2" + typescript: "npm:~5.3.0" webpack: "npm:^5.94.0" yarn: "npm:1.22.22" zero-fill: "npm:^2.2.4" @@ -11588,23 +11588,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:5.7.2": - version: 5.7.2 - resolution: "typescript@npm:5.7.2" +"typescript@npm:~5.3.0": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/a873118b5201b2ef332127ef5c63fb9d9c155e6fdbe211cbd9d8e65877283797cca76546bad742eea36ed7efbe3424a30376818f79c7318512064e8625d61622 + checksum: 10c0/e33cef99d82573624fc0f854a2980322714986bc35b9cb4d1ce736ed182aeab78e2cb32b385efa493b2a976ef52c53e20d6c6918312353a91850e2b76f1ea44f languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.7.2#optional!builtin": - version: 5.7.2 - resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin::version=5.7.2&hash=74658d" +"typescript@patch:typescript@npm%3A~5.3.0#optional!builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/c891ccf04008bc1305ba34053db951f8a4584b4a1bf2f68fd972c4a354df3dc5e62c8bfed4f6ac2d12e5b3b1c49af312c83a651048f818cd5b4949d17baacd79 + checksum: 10c0/1d0a5f4ce496c42caa9a30e659c467c5686eae15d54b027ee7866744952547f1be1262f2d40de911618c242b510029d51d43ff605dba8fb740ec85ca2d3f9500 languageName: node linkType: hard From c9305a4bafdd19bedd7bf3d8646b2902c0167cb4 Mon Sep 17 00:00:00 2001 From: akshat 09867 Date: Fri, 27 Dec 2024 22:00:11 +0530 Subject: [PATCH 3/4] #1113 added validation --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index f0e0ec15e..c957b9b71 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "postcss": "^8.4.41", "prettier": "3.3.3", "tailwindcss": "^3.3.5", - "typescript": "~5.3.0", + "typescript": "~5.7.2", "webpack": "^5.94.0" }, "babel": { diff --git a/yarn.lock b/yarn.lock index 6ff1ba254..de316f26a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8349,7 +8349,7 @@ __metadata: slate-react: "npm:^0.108.0" slugify: "npm:^1.6.5" tailwindcss: "npm:^3.3.5" - typescript: "npm:~5.3.0" + typescript: "npm:~5.7.2" webpack: "npm:^5.94.0" yarn: "npm:1.22.22" zero-fill: "npm:^2.2.4" @@ -11588,23 +11588,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~5.3.0": - version: 5.3.3 - resolution: "typescript@npm:5.3.3" +"typescript@npm:~5.7.2": + version: 5.7.2 + resolution: "typescript@npm:5.7.2" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/e33cef99d82573624fc0f854a2980322714986bc35b9cb4d1ce736ed182aeab78e2cb32b385efa493b2a976ef52c53e20d6c6918312353a91850e2b76f1ea44f + checksum: 10c0/a873118b5201b2ef332127ef5c63fb9d9c155e6fdbe211cbd9d8e65877283797cca76546bad742eea36ed7efbe3424a30376818f79c7318512064e8625d61622 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A~5.3.0#optional!builtin": - version: 5.3.3 - resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" +"typescript@patch:typescript@npm%3A~5.7.2#optional!builtin": + version: 5.7.2 + resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin::version=5.7.2&hash=74658d" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/1d0a5f4ce496c42caa9a30e659c467c5686eae15d54b027ee7866744952547f1be1262f2d40de911618c242b510029d51d43ff605dba8fb740ec85ca2d3f9500 + checksum: 10c0/c891ccf04008bc1305ba34053db951f8a4584b4a1bf2f68fd972c4a354df3dc5e62c8bfed4f6ac2d12e5b3b1c49af312c83a651048f818cd5b4949d17baacd79 languageName: node linkType: hard From 949c3fdee20f240f7b358090eec3925f88ef6061 Mon Sep 17 00:00:00 2001 From: akshat 09867 Date: Fri, 27 Dec 2024 22:02:05 +0530 Subject: [PATCH 4/4] #1113 added validation --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c957b9b71..907665250 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "postcss": "^8.4.41", "prettier": "3.3.3", "tailwindcss": "^3.3.5", - "typescript": "~5.7.2", + "typescript": "5.7.2", "webpack": "^5.94.0" }, "babel": { diff --git a/yarn.lock b/yarn.lock index de316f26a..73ad621c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8349,7 +8349,7 @@ __metadata: slate-react: "npm:^0.108.0" slugify: "npm:^1.6.5" tailwindcss: "npm:^3.3.5" - typescript: "npm:~5.7.2" + typescript: "npm:5.7.2" webpack: "npm:^5.94.0" yarn: "npm:1.22.22" zero-fill: "npm:^2.2.4" @@ -11588,7 +11588,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~5.7.2": +"typescript@npm:5.7.2": version: 5.7.2 resolution: "typescript@npm:5.7.2" bin: @@ -11598,7 +11598,7 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A~5.7.2#optional!builtin": +"typescript@patch:typescript@npm%3A5.7.2#optional!builtin": version: 5.7.2 resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin::version=5.7.2&hash=74658d" bin: