fix(oas31): render responses with empty content field (#9664)
Refs #9199
This commit is contained in:
@@ -21,6 +21,9 @@ export const sampleFromSchemaGeneric = (
|
||||
exampleOverride = undefined,
|
||||
respectXML = false
|
||||
) => {
|
||||
// there is nothing to generate schema from
|
||||
if (schema == null && exampleOverride === undefined) return undefined
|
||||
|
||||
if (typeof schema?.toJS === "function") schema = schema.toJS()
|
||||
schema = typeCast(schema)
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@ function afterLoad({ fn, getSystem }) {
|
||||
createXMLExample: fn.jsonSchema202012.createXMLExample,
|
||||
memoizedSampleFromSchema: fn.jsonSchema202012.memoizedSampleFromSchema,
|
||||
memoizedCreateXMLExample: fn.jsonSchema202012.memoizedCreateXMLExample,
|
||||
getJsonSampleSchema: fn.jsonSchema202012.getJsonSampleSchema,
|
||||
getYamlSampleSchema: fn.jsonSchema202012.getYamlSampleSchema,
|
||||
getXmlSampleSchema: fn.jsonSchema202012.getXmlSampleSchema,
|
||||
getSampleSchema: fn.jsonSchema202012.getSampleSchema,
|
||||
},
|
||||
getSystem()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user