fix(oas31): use system.fn as source of truth for Model wrapper (#9153)

Refs #8577
This commit is contained in:
Pierre PLR
2023-11-13 14:11:08 +01:00
committed by GitHub
parent ace93dfd79
commit 20c2c74746

View File

@@ -4,10 +4,6 @@
import React from "react"
import { createOnlyOAS31ComponentWrapper } from "../fn"
import {
makeIsExpandable,
getProperties,
} from "../json-schema-2020-12-extensions/fn"
const ModelWrapper = createOnlyOAS31ComponentWrapper(
({ getSystem, ...props }) => {
@@ -139,11 +135,8 @@ const ModelWrapper = createOnlyOAS31ComponentWrapper(
},
fn: {
upperFirst: fn.upperFirst,
isExpandable: makeIsExpandable(
fn.jsonSchema202012.isExpandable,
getSystem
),
getProperties,
isExpandable: fn.jsonSchema202012.isExpandable,
getProperties: fn.jsonSchema202012.getProperties,
},
})