From 1328ee8a59e30cd7290b90a01f902bfa93794cd5 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 28 Aug 2025 10:56:52 +0200 Subject: [PATCH 1/2] Parameter Object with in:querystring can't have content and content cannot be used with style --- .../parameter-object-content-not-with-style.yaml | 14 ++++++++++++++ ...rameter-object-querystring-not-with-schema.yaml | 11 +++++++++++ 2 files changed, 25 insertions(+) create mode 100644 tests/schema/fail/parameter-object-content-not-with-style.yaml create mode 100644 tests/schema/fail/parameter-object-querystring-not-with-schema.yaml diff --git a/tests/schema/fail/parameter-object-content-not-with-style.yaml b/tests/schema/fail/parameter-object-content-not-with-style.yaml new file mode 100644 index 0000000000..7a16b89aa8 --- /dev/null +++ b/tests/schema/fail/parameter-object-content-not-with-style.yaml @@ -0,0 +1,14 @@ +openapi: 3.2.0 +info: + title: API + version: 1.0.0 +components: + parameters: + content-not-with-style: + in: querystring + name: json + content: + application/json: + schema: + type: object + style: simple diff --git a/tests/schema/fail/parameter-object-querystring-not-with-schema.yaml b/tests/schema/fail/parameter-object-querystring-not-with-schema.yaml new file mode 100644 index 0000000000..4f4cf98666 --- /dev/null +++ b/tests/schema/fail/parameter-object-querystring-not-with-schema.yaml @@ -0,0 +1,11 @@ +openapi: 3.2.0 +info: + title: API + version: 1.0.0 +components: + parameters: + querystring-not-with-schema: + in: querystring + name: json + schema: + type: object From 3f1df3fdff63af6c014acaa3ac4852b28b3a0635 Mon Sep 17 00:00:00 2001 From: Ethan Date: Wed, 27 Aug 2025 22:18:56 -0700 Subject: [PATCH 2/2] OAD schema 'parameter object' + in: querystring drop `not`+`required` subschema This subschema would only forbid the presence of all four properties, rather than any of them, but it is superfluous as these properties are caught by `unevaluatedProperties: false`. --- src/schemas/validation/schema.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/schemas/validation/schema.yaml b/src/schemas/validation/schema.yaml index ca24651c50..e658ceb745 100644 --- a/src/schemas/validation/schema.yaml +++ b/src/schemas/validation/schema.yaml @@ -392,12 +392,6 @@ $defs: then: required: - content - not: - required: - - schema - - style - - explode - - allowReserved dependentSchemas: schema: properties: