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

Refs #8513
This commit is contained in:
Vladimir Gorej
2023-04-14 14:23:37 +02:00
committed by Vladimír Gorej
parent 7cfc5e3656
commit f06c1caed5
10 changed files with 53 additions and 20 deletions

View File

@@ -6,11 +6,12 @@ import React from "react"
import JSONSchema from "./components/JSONSchema/JSONSchema"
import BooleanJSONSchema from "./components/BooleanJSONSchema/BooleanJSONSchema"
import KeywordProperties from "./components/keywords/Properties"
import KeywordType from "./components/keywords/Type/Type"
import Accordion from "./components/Accordion/Accordion"
import ExpandDeepButton from "./components/ExpandDeepButton/ExpandDeepButton"
import ChevronRightIcon from "./components/icons/ChevronRight"
import { JSONSchemaContext } from "./context"
import { getTitle, isBooleanJSONSchema, upperFirst } from "./fn"
import { getTitle, isBooleanJSONSchema, upperFirst, getType } from "./fn"
export const withJSONSchemaContext = (Component, overrides = {}) => {
const value = {
@@ -18,6 +19,7 @@ export const withJSONSchemaContext = (Component, overrides = {}) => {
JSONSchema,
BooleanJSONSchema,
KeywordProperties,
KeywordType,
Accordion,
ExpandDeepButton,
ChevronRightIcon,
@@ -30,6 +32,7 @@ export const withJSONSchemaContext = (Component, overrides = {}) => {
fn: {
upperFirst,
getTitle,
getType,
isBooleanJSONSchema,
...overrides.fn,
},