diff --git a/src/schemas/validation/meta.yaml b/src/schemas/validation/meta.yaml index bbd40a1897..91e88d768f 100644 --- a/src/schemas/validation/meta.yaml +++ b/src/schemas/validation/meta.yaml @@ -21,6 +21,34 @@ properties: $ref: '#/$defs/external-docs' xml: $ref: '#/$defs/xml' +if: + type: object + required: + - xml +then: + if: + anyOf: + - required: + - $ref + - required: + - $dynamicRef + - required: + - type + properties: + type: + const: array + then: + properties: + xml: + properties: + nodeType: + default: none + else: + properties: + xml: + properties: + nodeType: + default: element $defs: discriminator: diff --git a/tests/schema/pass/media-type-examples.yaml b/tests/schema/pass/media-type-examples.yaml index c4b47190ba..62d5cfa707 100644 --- a/tests/schema/pass/media-type-examples.yaml +++ b/tests/schema/pass/media-type-examples.yaml @@ -88,6 +88,15 @@ paths: type: object xml: nodeType: none + forCoverage: + type: object + $ref: '#/components/schemas/Address' + xml: {} + forCoverage2: + type: object + $dynamicRef: '#/components/schemas/Address' + xml: {} + forCoverage3: true application/x-www-form-urlencoded: schema: type: object