From 31561062a59a5bd531b5eb24d171e1c0ec3e7a3c Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Sun, 31 Aug 2025 16:03:17 -0700 Subject: [PATCH 1/2] fix: header and parameter objects cannot have examples with "content" The examples instead belong with the media-type object found below. --- src/schemas/validation/schema.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/schemas/validation/schema.yaml b/src/schemas/validation/schema.yaml index e658ceb745..2fcc4b7380 100644 --- a/src/schemas/validation/schema.yaml +++ b/src/schemas/validation/schema.yaml @@ -370,7 +370,6 @@ $defs: - required: - content allOf: - - $ref: '#/$defs/examples' - $ref: '#/$defs/specification-extensions' - if: properties: @@ -403,6 +402,7 @@ $defs: default: false type: boolean allOf: + - $ref: '#/$defs/examples' - $ref: '#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path' - $ref: '#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header' - $ref: '#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query' @@ -785,7 +785,6 @@ $defs: type: boolean $ref: '#/$defs/examples' allOf: - - $ref: '#/$defs/examples' - $ref: '#/$defs/specification-extensions' unevaluatedProperties: false From c75c4e7765145ebe3cc4073ccb916ce4ff765fef Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Sun, 31 Aug 2025 16:00:23 -0700 Subject: [PATCH 2/2] pull out subschemas that do not need to be in an allOf --- src/schemas/validation/schema.yaml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/schemas/validation/schema.yaml b/src/schemas/validation/schema.yaml index 2fcc4b7380..d5b1f9fa42 100644 --- a/src/schemas/validation/schema.yaml +++ b/src/schemas/validation/schema.yaml @@ -369,8 +369,8 @@ $defs: - schema - required: - content + $ref: '#/$defs/specification-extensions' allOf: - - $ref: '#/$defs/specification-extensions' - if: properties: in: @@ -539,14 +539,14 @@ $defs: $ref: '#/$defs/encoding' itemEncoding: $ref: '#/$defs/encoding' + dependentSchemas: + encoding: + properties: + prefixEncoding: false + itemEncoding: false allOf: - $ref: '#/$defs/examples' - $ref: '#/$defs/specification-extensions' - - dependentSchemas: - encoding: - properties: - prefixEncoding: false - itemEncoding: false unevaluatedProperties: false media-type-or-reference: @@ -592,14 +592,14 @@ $defs: $ref: '#/$defs/encoding' itemEncoding: $ref: '#/$defs/encoding' + dependentSchemas: + encoding: + properties: + prefixEncoding: false + itemEncoding: false allOf: - $ref: '#/$defs/specification-extensions' - $ref: '#/$defs/styles-for-form' - - dependentSchemas: - encoding: - properties: - prefixEncoding: false - itemEncoding: false unevaluatedProperties: false responses: @@ -784,8 +784,7 @@ $defs: default: false type: boolean $ref: '#/$defs/examples' - allOf: - - $ref: '#/$defs/specification-extensions' + $ref: '#/$defs/specification-extensions' unevaluatedProperties: false header-or-reference: