feat(json-schema-2020-12): add initial rendering engine

Refs #8513
This commit is contained in:
Vladimir Gorej
2023-04-12 17:09:35 +02:00
committed by Vladimír Gorej
parent dbd8931161
commit ab1842083d
17 changed files with 311 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
/**
* @prettier
*/
import React from "react"
import { createOnlyOAS31ComponentWrapper } from "../fn"
const ModelsWrapper = createOnlyOAS31ComponentWrapper(({ getSystem }) => {
const { getComponent, fn } = getSystem()
const Models = getComponent("OAS31Models", true)
const JSONSchema = getComponent("JSONSchema202012")
const BooleanJSONSchema = getComponent("BooleanJSONSchema202012")
const withSchemaContext = getComponent("withJSONSchema202012Context")
const ModelsWithJSONContext = withSchemaContext(Models, {
config: {
default$schema: "https://spec.openapis.org/oas/3.1/dialect/base",
},
components: {
JSONSchema,
BooleanJSONSchema,
},
fn: {
upperFirst: fn.upperFirst,
},
})
return <ModelsWithJSONContext />
})
export default ModelsWrapper