feat(json-schema-2020-12): add support for const keyword (#8622)

Refs #8513
This commit is contained in:
Vladimír Gorej
2023-05-07 16:49:23 +02:00
committed by GitHub
parent b4e5af901d
commit 8e4fde5ddd
7 changed files with 69 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ import KeywordPropertyNames from "./components/keywords/PropertyNames"
import KeywordUnevaluatedItems from "./components/keywords/UnevaluatedItems"
import KeywordUnevaluatedProperties from "./components/keywords/UnevaluatedProperties"
import KeywordType from "./components/keywords/Type/Type"
import KeywordConst from "./components/keywords/Const"
import KeywordFormat from "./components/keywords/Format/Format"
import KeywordTitle from "./components/keywords/Title/Title"
import KeywordDescription from "./components/keywords/Description/Description"
@@ -45,6 +46,7 @@ import {
getType,
hasKeyword,
isExpandable,
stringify,
} from "./fn"
export const withJSONSchemaContext = (Component, overrides = {}) => {
@@ -78,6 +80,7 @@ export const withJSONSchemaContext = (Component, overrides = {}) => {
KeywordUnevaluatedItems,
KeywordUnevaluatedProperties,
KeywordType,
KeywordConst,
KeywordFormat,
KeywordTitle,
KeywordDescription,
@@ -106,6 +109,7 @@ export const withJSONSchemaContext = (Component, overrides = {}) => {
isBooleanJSONSchema,
hasKeyword,
isExpandable,
stringify,
...overrides.fn,
},
}