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 ModelsWrapper from "./wrap-components/models"
|
||||||
import VersionPragmaFilterWrapper from "./wrap-components/version-pragma-filter"
|
import VersionPragmaFilterWrapper from "./wrap-components/version-pragma-filter"
|
||||||
import VersionStampWrapper from "./wrap-components/version-stamp"
|
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 {
|
import {
|
||||||
license as selectLicense,
|
license as selectLicense,
|
||||||
contact as selectContact,
|
contact as selectContact,
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
* @prettier
|
* @prettier
|
||||||
*/
|
*/
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { createOnlyOAS31ComponentWrapper } from "../fn"
|
import { createOnlyOAS31ComponentWrapper } from "../../../fn"
|
||||||
|
|
||||||
const JSONSchema202012KeywordDescriptionWrapper =
|
const DescriptionWrapper = createOnlyOAS31ComponentWrapper(
|
||||||
createOnlyOAS31ComponentWrapper(({ schema, getComponent }) => {
|
({ schema, getComponent }) => {
|
||||||
if (!schema.description) return null
|
if (!schema?.description) return null
|
||||||
|
|
||||||
const MarkDown = getComponent("Markdown")
|
const MarkDown = getComponent("Markdown")
|
||||||
|
|
||||||
@@ -17,6 +17,7 @@ const JSONSchema202012KeywordDescriptionWrapper =
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
export default JSONSchema202012KeywordDescriptionWrapper
|
export default DescriptionWrapper
|
||||||
Reference in New Issue
Block a user