fix(samples): fix handling of additionalProperties in JSON Schema 2020-12 (#9023)

This change is specific to JSON Schema 2020-12 and OpenAPI 3.1.0.

Refs #9022
This commit is contained in:
Adam Davis
2023-07-24 04:04:00 -04:00
committed by GitHub
parent 36583bc042
commit d9375dbddf
3 changed files with 161 additions and 1 deletions

View File

@@ -420,7 +420,7 @@ export const sampleFromSchemaGeneric = (
return res
}
if (isBooleanJSONSchema(additionalProperties)) {
if (isBooleanJSONSchema(additionalProperties) && additionalProperties) {
if (respectXML) {
res[displayName].push({ additionalProp: "Anything can be here" })
} else {