feat(json-schema-2020-12): add support for vocabulary keyword

Refs #8513
This commit is contained in:
Vladimir Gorej
2023-04-19 19:21:13 +02:00
committed by Vladimír Gorej
parent d6d3e9ffc1
commit 679698b998
9 changed files with 83 additions and 1 deletions

View File

@@ -112,5 +112,10 @@ export const getType = (schema, processedSchemas = new WeakSet()) => {
export const isBooleanJSONSchema = (schema) => typeof schema === "boolean"
export const isExpandable = (schema) => {
return schema?.description || schema?.properties || schema?.$schema
return (
schema?.$schema ||
schema?.$vocabulary ||
schema?.description ||
schema?.properties
)
}