refactor(oas31): standardize JSON Schema 2020-12 plugin extensions (#8651)
Refs #8513
This commit is contained in:
@@ -14,7 +14,7 @@ import InfoWrapper from "./wrap-components/info"
|
||||
import ModelsWrapper from "./wrap-components/models"
|
||||
import VersionPragmaFilterWrapper from "./wrap-components/version-pragma-filter"
|
||||
import VersionStampWrapper from "./wrap-components/version-stamp"
|
||||
import JSONSchema202012KeywordDescriptionWrapper from "./wrap-components/json-schema-2020-12-keyword-description"
|
||||
import JSONSchema202012KeywordDescriptionWrapper from "./json-schema-2020-12-extensions/wrap-components/keywords/Description"
|
||||
import {
|
||||
license as selectLicense,
|
||||
contact as selectContact,
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
* @prettier
|
||||
*/
|
||||
import React from "react"
|
||||
import { createOnlyOAS31ComponentWrapper } from "../fn"
|
||||
import { createOnlyOAS31ComponentWrapper } from "../../../fn"
|
||||
|
||||
const JSONSchema202012KeywordDescriptionWrapper =
|
||||
createOnlyOAS31ComponentWrapper(({ schema, getComponent }) => {
|
||||
if (!schema.description) return null
|
||||
const DescriptionWrapper = createOnlyOAS31ComponentWrapper(
|
||||
({ schema, getComponent }) => {
|
||||
if (!schema?.description) return null
|
||||
|
||||
const MarkDown = getComponent("Markdown")
|
||||
|
||||
@@ -17,6 +17,7 @@ const JSONSchema202012KeywordDescriptionWrapper =
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
export default JSONSchema202012KeywordDescriptionWrapper
|
||||
export default DescriptionWrapper
|
||||
Reference in New Issue
Block a user