refactor(oas31): concentrate OpenAPI 3.1.0 code to separate plugin (#8475)
Refs #8474
This commit is contained in:
16
src/core/plugins/oas31/wrap-components/license.jsx
Normal file
16
src/core/plugins/oas31/wrap-components/license.jsx
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @prettier
|
||||
*/
|
||||
import React from "react"
|
||||
|
||||
const LicenseWrapper = (Original, system) => (props) => {
|
||||
if (system.specSelectors.isOAS31()) {
|
||||
const OAS31License = system.getComponent("OAS31License")
|
||||
|
||||
return <OAS31License {...props} />
|
||||
}
|
||||
|
||||
return <Original {...props} />
|
||||
}
|
||||
|
||||
export default LicenseWrapper
|
||||
Reference in New Issue
Block a user