feat(json-schema-2020-12): add support for validation keywords for numbers (#8624)

Includes following keywords:
  - multipleOf
  - minimum
  - maximum
  - inclusiveMinimum
  - inclusiveMaximum

Refs #8513
This commit is contained in:
Vladimír Gorej
2023-05-08 11:00:01 +02:00
committed by GitHub
parent 3b940d0d76
commit 1a29662977
10 changed files with 108 additions and 18 deletions

View File

@@ -33,6 +33,7 @@ import KeywordUnevaluatedProperties from "./components/keywords/UnevaluatedPrope
import KeywordType from "./components/keywords/Type/Type"
import KeywordEnum from "./components/keywords/Enum/Enum"
import KeywordConst from "./components/keywords/Const"
import KeywordConstraint from "./components/keywords/Constraint/Constraint"
import KeywordFormat from "./components/keywords/Format/Format"
import KeywordTitle from "./components/keywords/Title/Title"
import KeywordDescription from "./components/keywords/Description/Description"
@@ -48,6 +49,7 @@ import {
hasKeyword,
isExpandable,
stringify,
stringifyConstraints,
} from "./fn"
export const withJSONSchemaContext = (Component, overrides = {}) => {
@@ -83,6 +85,7 @@ export const withJSONSchemaContext = (Component, overrides = {}) => {
KeywordType,
KeywordEnum,
KeywordConst,
KeywordConstraint,
KeywordFormat,
KeywordTitle,
KeywordDescription,
@@ -112,6 +115,7 @@ export const withJSONSchemaContext = (Component, overrides = {}) => {
hasKeyword,
isExpandable,
stringify,
stringifyConstraints,
...overrides.fn,
},
}