From ebd36f2d91e9e47d5f7b650c65e7734b4537db1e Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Oct 2025 10:02:32 -0400 Subject: [PATCH 1/7] ci: adds test infrastructure for v1.1 --- scripts/validate.mjs | 3 +- tests/{v1.0 => }/schema.test.mjs | 52 ++++++++++++++++---------------- 2 files changed, 28 insertions(+), 27 deletions(-) rename tests/{v1.0 => }/schema.test.mjs (59%) diff --git a/scripts/validate.mjs b/scripts/validate.mjs index dc6c7cc..d10608a 100755 --- a/scripts/validate.mjs +++ b/scripts/validate.mjs @@ -38,12 +38,13 @@ const args = process.argv.reduce((acc, arg) => { const schemaType = args.schema || "schema"; const outputFormat = args.format || defaultOutputFormat; +const version = args.version || "1.0"; // Config setMetaSchemaOutputFormat(outputFormat); // Compile / meta-validate -const validateOverlay = await validate(`./schemas/v1.0/${schemaType}.yaml`); +const validateOverlay = await validate(`./schemas/v${version}/${schemaType}.yaml`); // Validate instance const instanceYaml = await readFile(`${process.argv[process.argv.length - 1]}`, "utf8"); diff --git a/tests/v1.0/schema.test.mjs b/tests/schema.test.mjs similarity index 59% rename from tests/v1.0/schema.test.mjs rename to tests/schema.test.mjs index 43fa9db..4ab1b09 100644 --- a/tests/v1.0/schema.test.mjs +++ b/tests/schema.test.mjs @@ -30,38 +30,38 @@ const parseYamlFromFile = (filePath) => { return YAML.parse(schemaYaml, { prettyErrors: true }); }; +const runTestSuite = (version, validateOverlay, suite = "pass") => { + readdirSync(`./tests/v${version}/${suite}`, { withFileTypes: true }) + .filter((entry) => entry.isFile() && /\.yaml$/.test(entry.name)) + .forEach((entry) => { + test(entry.name, () => { + const instance = parseYamlFromFile(`./tests/v${version}/${suite}/${entry.name}`); + const output = validateOverlay(instance, BASIC); + if (suite === "pass") + expect(output).to.deep.equal({ valid: true }); + else + expect(output.valid).to.equal(false); + }); + }); +} + setMetaSchemaOutputFormat(BASIC); -let validateOverlay; -try { - validateOverlay = await validate("./schemas/v1.0/schema.yaml"); -} catch (error) { - console.error(error.output); - process.exit(1); -} +const versions = ["1.0", "1.1"]; -describe("v1.0", () => { +describe.each(versions)("v%s", async (version) => { + let validateOverlay; + try { + validateOverlay = await validate(`./schemas/v${version}/schema.yaml`); + } catch (error) { + console.error(error.output); + process.exit(1); + } describe("Pass", () => { - readdirSync(`./tests/v1.0/pass`, { withFileTypes: true }) - .filter((entry) => entry.isFile() && /\.yaml$/.test(entry.name)) - .forEach((entry) => { - test(entry.name, () => { - const instance = parseYamlFromFile(`./tests/v1.0/pass/${entry.name}`); - const output = validateOverlay(instance, BASIC); - expect(output).to.deep.equal({ valid: true }); - }); - }); + runTestSuite(version, validateOverlay); }); describe("Fail", () => { - readdirSync(`./tests/v1.0/fail`, { withFileTypes: true }) - .filter((entry) => entry.isFile() && /\.yaml$/.test(entry.name)) - .forEach((entry) => { - test(entry.name, () => { - const instance = parseYamlFromFile(`./tests/v1.0/fail/${entry.name}`); - const output = validateOverlay(instance, BASIC); - expect(output.valid).to.equal(false); - }); - }); + runTestSuite(version, validateOverlay, "fail"); }); }); From c35312b390561854f624b9ea64802773098b9b5f Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Oct 2025 10:02:51 -0400 Subject: [PATCH 2/7] feat: adds a schemas for v1.1 --- schemas/v1.1/schema.yaml | 70 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 schemas/v1.1/schema.yaml diff --git a/schemas/v1.1/schema.yaml b/schemas/v1.1/schema.yaml new file mode 100644 index 0000000..4dfcd31 --- /dev/null +++ b/schemas/v1.1/schema.yaml @@ -0,0 +1,70 @@ +$id: https://spec.openapis.org/overlay/1.1/schema/WORK-IN-PROGRESS +$schema: https://json-schema.org/draft/2020-12/schema +description: The description of Overlay v1.1.x documents +type: object +properties: + overlay: + type: string + pattern: ^1\.1\.\d+$ + info: + $ref: "#/$defs/info-object" + extends: + type: string + format: uri-reference + actions: + type: array + minItems: 1 + uniqueItems: true + items: + $ref: "#/$defs/action-object" +required: + - overlay + - info + - actions +$ref: "#/$defs/specification-extensions" +unevaluatedProperties: false +$defs: + info-object: + type: object + properties: + title: + type: string + version: + type: string + required: + - title + - version + $ref: "#/$defs/specification-extensions" + unevaluatedProperties: false + action-object: + properties: + target: + type: string + pattern: ^\$ + description: + type: string + oneOf: + - properties: + update: + type: + - string + - boolean + - object + - array + - number + - "null" + required: + - update + - properties: + remove: + type: boolean + default: false + required: + - remove + required: + - target + $ref: "#/$defs/specification-extensions" + unevaluatedProperties: false + specification-extensions: + patternProperties: + ^x-: true From e31916072f1b944a01e4ff25846e073770b376db Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Oct 2025 10:03:22 -0400 Subject: [PATCH 3/7] tests: updates v1.0 tests to be semantically valid --- tests/v1.0/pass/actions-description.yaml | 1 + tests/v1.0/pass/actions-extensions.yaml | 1 + tests/v1.0/pass/info-extensions.yaml | 1 + tests/v1.0/pass/minimal.yaml | 1 + tests/v1.0/pass/root-extensions.yaml | 1 + 5 files changed, 5 insertions(+) diff --git a/tests/v1.0/pass/actions-description.yaml b/tests/v1.0/pass/actions-description.yaml index a15c94e..4da3dc9 100644 --- a/tests/v1.0/pass/actions-description.yaml +++ b/tests/v1.0/pass/actions-description.yaml @@ -5,3 +5,4 @@ info: actions: - target: '$' # Root of document description: this is an action description + update: {} diff --git a/tests/v1.0/pass/actions-extensions.yaml b/tests/v1.0/pass/actions-extensions.yaml index 206de4b..9ee1e0a 100644 --- a/tests/v1.0/pass/actions-extensions.yaml +++ b/tests/v1.0/pass/actions-extensions.yaml @@ -5,3 +5,4 @@ info: actions: - target: '$' # Root of document x-myActionsExtension: {} + update: {} diff --git a/tests/v1.0/pass/info-extensions.yaml b/tests/v1.0/pass/info-extensions.yaml index bcee3b6..0e3bc74 100644 --- a/tests/v1.0/pass/info-extensions.yaml +++ b/tests/v1.0/pass/info-extensions.yaml @@ -5,3 +5,4 @@ info: x-myInfoExtension: {} actions: - target: '$' # Root of document + update: {} diff --git a/tests/v1.0/pass/minimal.yaml b/tests/v1.0/pass/minimal.yaml index 2717fc2..600f964 100644 --- a/tests/v1.0/pass/minimal.yaml +++ b/tests/v1.0/pass/minimal.yaml @@ -4,3 +4,4 @@ info: version: 1.0.0 actions: - target: '$' # Root of document + update: {} diff --git a/tests/v1.0/pass/root-extensions.yaml b/tests/v1.0/pass/root-extensions.yaml index e311b42..8cb528c 100644 --- a/tests/v1.0/pass/root-extensions.yaml +++ b/tests/v1.0/pass/root-extensions.yaml @@ -4,4 +4,5 @@ info: version: 1.0.0 actions: - target: '$' # Root of document + update: {} x-myExtension: {} From 06545e77db6d0d17d59b47a95ecd277809063b5f Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Oct 2025 10:05:09 -0400 Subject: [PATCH 4/7] tests: duplicates all v1.0 test files to v1.1 --- .../fail/actions-invalid-description.yaml | 7 ++++++ tests/v1.1/fail/actions-invalid-target.yaml | 7 ++++++ tests/v1.1/fail/actions-minimal.yaml | 5 +++++ tests/v1.1/fail/actions-missing-target.yaml | 6 +++++ tests/v1.1/fail/actions-missing.yaml | 5 +++++ tests/v1.1/fail/actions-not-unique.yaml | 9 ++++++++ tests/v1.1/fail/extends-invalid-type.yaml | 7 ++++++ tests/v1.1/fail/info-missing-title.yaml | 5 +++++ tests/v1.1/fail/info-missing-version.yaml | 5 +++++ tests/v1.1/fail/invalid-overlay-version.yaml | 6 +++++ tests/v1.1/fail/not-an-object.yaml | 5 +++++ tests/v1.1/fail/not-update-with-remove.yaml | 10 +++++++++ ...ons-array-modification-example-remove.yaml | 11 ++++++++++ ...ons-array-modification-example-update.yaml | 7 ++++++ tests/v1.1/pass/actions-description.yaml | 8 +++++++ tests/v1.1/pass/actions-extensions.yaml | 8 +++++++ .../actions-structured-overlay-example.yaml | 22 +++++++++++++++++++ .../actions-targeted-overlay-example.yaml | 16 ++++++++++++++ tests/v1.1/pass/actions-traits-example.yaml | 14 ++++++++++++ .../actions-wildcard-overlay-example.yaml | 12 ++++++++++ tests/v1.1/pass/info-extensions.yaml | 8 +++++++ tests/v1.1/pass/minimal.yaml | 7 ++++++ tests/v1.1/pass/root-extensions.yaml | 8 +++++++ 23 files changed, 198 insertions(+) create mode 100644 tests/v1.1/fail/actions-invalid-description.yaml create mode 100644 tests/v1.1/fail/actions-invalid-target.yaml create mode 100644 tests/v1.1/fail/actions-minimal.yaml create mode 100644 tests/v1.1/fail/actions-missing-target.yaml create mode 100644 tests/v1.1/fail/actions-missing.yaml create mode 100644 tests/v1.1/fail/actions-not-unique.yaml create mode 100644 tests/v1.1/fail/extends-invalid-type.yaml create mode 100644 tests/v1.1/fail/info-missing-title.yaml create mode 100644 tests/v1.1/fail/info-missing-version.yaml create mode 100644 tests/v1.1/fail/invalid-overlay-version.yaml create mode 100644 tests/v1.1/fail/not-an-object.yaml create mode 100644 tests/v1.1/fail/not-update-with-remove.yaml create mode 100644 tests/v1.1/pass/actions-array-modification-example-remove.yaml create mode 100644 tests/v1.1/pass/actions-array-modification-example-update.yaml create mode 100644 tests/v1.1/pass/actions-description.yaml create mode 100644 tests/v1.1/pass/actions-extensions.yaml create mode 100644 tests/v1.1/pass/actions-structured-overlay-example.yaml create mode 100644 tests/v1.1/pass/actions-targeted-overlay-example.yaml create mode 100644 tests/v1.1/pass/actions-traits-example.yaml create mode 100644 tests/v1.1/pass/actions-wildcard-overlay-example.yaml create mode 100644 tests/v1.1/pass/info-extensions.yaml create mode 100644 tests/v1.1/pass/minimal.yaml create mode 100644 tests/v1.1/pass/root-extensions.yaml diff --git a/tests/v1.1/fail/actions-invalid-description.yaml b/tests/v1.1/fail/actions-invalid-description.yaml new file mode 100644 index 0000000..7fb44ee --- /dev/null +++ b/tests/v1.1/fail/actions-invalid-description.yaml @@ -0,0 +1,7 @@ +overlay: 1.1.0 +info: + title: Actions invalid description + version: 1.0.0 +actions: + - target: '$' # Root of document + description: 10 diff --git a/tests/v1.1/fail/actions-invalid-target.yaml b/tests/v1.1/fail/actions-invalid-target.yaml new file mode 100644 index 0000000..64641db --- /dev/null +++ b/tests/v1.1/fail/actions-invalid-target.yaml @@ -0,0 +1,7 @@ +overlay: 1.1.0 +info: + title: Invalid `target`, must begin with `$` + version: 1.0.0 +actions: + - target: info.description + update: An updated description diff --git a/tests/v1.1/fail/actions-minimal.yaml b/tests/v1.1/fail/actions-minimal.yaml new file mode 100644 index 0000000..66ae16b --- /dev/null +++ b/tests/v1.1/fail/actions-minimal.yaml @@ -0,0 +1,5 @@ +overlay: 1.1.0 +info: + title: Minimal actions + version: 1.0.0 +actions: [] diff --git a/tests/v1.1/fail/actions-missing-target.yaml b/tests/v1.1/fail/actions-missing-target.yaml new file mode 100644 index 0000000..066e569 --- /dev/null +++ b/tests/v1.1/fail/actions-missing-target.yaml @@ -0,0 +1,6 @@ +overlay: 1.1.0 +info: + title: Missing actions `target` + version: 1.0.0 +actions: + - update: my description diff --git a/tests/v1.1/fail/actions-missing.yaml b/tests/v1.1/fail/actions-missing.yaml new file mode 100644 index 0000000..383761e --- /dev/null +++ b/tests/v1.1/fail/actions-missing.yaml @@ -0,0 +1,5 @@ +overlay: 1.1.0 +info: + title: Missing `actions` + version: 1.0.0 +extends: '/openapi.yaml' diff --git a/tests/v1.1/fail/actions-not-unique.yaml b/tests/v1.1/fail/actions-not-unique.yaml new file mode 100644 index 0000000..da7a657 --- /dev/null +++ b/tests/v1.1/fail/actions-not-unique.yaml @@ -0,0 +1,9 @@ +overlay: 1.1.0 +info: + title: Actions not unique + version: 1.0.0 +actions: + - target: '$.info.title' + update: 'My New title' + - target: '$.info.title' + update: 'My New title' diff --git a/tests/v1.1/fail/extends-invalid-type.yaml b/tests/v1.1/fail/extends-invalid-type.yaml new file mode 100644 index 0000000..d3b699c --- /dev/null +++ b/tests/v1.1/fail/extends-invalid-type.yaml @@ -0,0 +1,7 @@ +overlay: 1.1.0 +info: + title: Invalid `extends` type + version: 1.0.0 +extends: {} +actions: + - target: '$' # Root of document diff --git a/tests/v1.1/fail/info-missing-title.yaml b/tests/v1.1/fail/info-missing-title.yaml new file mode 100644 index 0000000..3b3088b --- /dev/null +++ b/tests/v1.1/fail/info-missing-title.yaml @@ -0,0 +1,5 @@ +overlay: 1.1.0 +info: + version: 1.0.0 +actions: + - target: '$' # Root of document diff --git a/tests/v1.1/fail/info-missing-version.yaml b/tests/v1.1/fail/info-missing-version.yaml new file mode 100644 index 0000000..7372b67 --- /dev/null +++ b/tests/v1.1/fail/info-missing-version.yaml @@ -0,0 +1,5 @@ +overlay: 1.1.0 +info: + title: Missing Info version +actions: + - target: '$' # Root of document diff --git a/tests/v1.1/fail/invalid-overlay-version.yaml b/tests/v1.1/fail/invalid-overlay-version.yaml new file mode 100644 index 0000000..1936290 --- /dev/null +++ b/tests/v1.1/fail/invalid-overlay-version.yaml @@ -0,0 +1,6 @@ +overlay: 2 +info: + title: Invalid Overlay version + version: 1.0.0 +actions: + - target: '$' # Root of document diff --git a/tests/v1.1/fail/not-an-object.yaml b/tests/v1.1/fail/not-an-object.yaml new file mode 100644 index 0000000..574dc05 --- /dev/null +++ b/tests/v1.1/fail/not-an-object.yaml @@ -0,0 +1,5 @@ +- root +- must +- be +- an +- object diff --git a/tests/v1.1/fail/not-update-with-remove.yaml b/tests/v1.1/fail/not-update-with-remove.yaml new file mode 100644 index 0000000..036a02d --- /dev/null +++ b/tests/v1.1/fail/not-update-with-remove.yaml @@ -0,0 +1,10 @@ +overlay: 1.1.0 +info: + title: Update many objects at once + version: 1.0.0 +actions: + - target: $.paths.*.get + update: + x-safe: true + remove: true + description: This test could technically be in 1.0 but I'm not sure whether we can edit the schema at this point. diff --git a/tests/v1.1/pass/actions-array-modification-example-remove.yaml b/tests/v1.1/pass/actions-array-modification-example-remove.yaml new file mode 100644 index 0000000..c3990a1 --- /dev/null +++ b/tests/v1.1/pass/actions-array-modification-example-remove.yaml @@ -0,0 +1,11 @@ +overlay: 1.1.0 +info: + title: Add an array element + version: 1.0.0 +actions: + - target: $.paths.*.get.parameters + update: + name: newParam + in: query + schema: + type: string diff --git a/tests/v1.1/pass/actions-array-modification-example-update.yaml b/tests/v1.1/pass/actions-array-modification-example-update.yaml new file mode 100644 index 0000000..29c0059 --- /dev/null +++ b/tests/v1.1/pass/actions-array-modification-example-update.yaml @@ -0,0 +1,7 @@ +overlay: 1.1.0 +info: + title: Remove a array element + version: 1.0.0 +actions: + - target: $.paths.*.get.parameters[?@.name == 'dummy'] + remove: true diff --git a/tests/v1.1/pass/actions-description.yaml b/tests/v1.1/pass/actions-description.yaml new file mode 100644 index 0000000..80e00d9 --- /dev/null +++ b/tests/v1.1/pass/actions-description.yaml @@ -0,0 +1,8 @@ +overlay: 1.1.0 +info: + title: Actions Description + version: 1.0.0 +actions: + - target: '$' # Root of document + description: this is an action description + update: {} diff --git a/tests/v1.1/pass/actions-extensions.yaml b/tests/v1.1/pass/actions-extensions.yaml new file mode 100644 index 0000000..88eed5d --- /dev/null +++ b/tests/v1.1/pass/actions-extensions.yaml @@ -0,0 +1,8 @@ +overlay: 1.1.0 +info: + title: Actions Extensions + version: 1.0.0 +actions: + - target: '$' # Root of document + x-myActionsExtension: {} + update: {} diff --git a/tests/v1.1/pass/actions-structured-overlay-example.yaml b/tests/v1.1/pass/actions-structured-overlay-example.yaml new file mode 100644 index 0000000..1f6d714 --- /dev/null +++ b/tests/v1.1/pass/actions-structured-overlay-example.yaml @@ -0,0 +1,22 @@ +overlay: 1.1.0 +info: + title: Structured Overlay + version: 1.0.0 +extends: '/openapi.yaml' +actions: + - target: '$' # Root of document + update: + info: + x-overlay-applied: structured-overlay + paths: + '/': + summary: 'The root resource' + get: + summary: 'Retrieve the root resource' + x-rate-limit: 100 + '/pets': + get: + summary: 'Retrieve a list of pets' + x-rate-limit: 100 + components: + tags: [] diff --git a/tests/v1.1/pass/actions-targeted-overlay-example.yaml b/tests/v1.1/pass/actions-targeted-overlay-example.yaml new file mode 100644 index 0000000..dd7fb91 --- /dev/null +++ b/tests/v1.1/pass/actions-targeted-overlay-example.yaml @@ -0,0 +1,16 @@ +overlay: 1.1.0 +info: + title: Targeted Overlay + version: 1.0.0 +actions: + - target: $.paths['/foo'].get + update: + description: This is the new description + - target: $.paths['/bar'].get + update: + description: This is the updated description + - target: $.paths['/bar'] + update: + post: + description: This is an updated description of a child object + x-safe: false diff --git a/tests/v1.1/pass/actions-traits-example.yaml b/tests/v1.1/pass/actions-traits-example.yaml new file mode 100644 index 0000000..1863558 --- /dev/null +++ b/tests/v1.1/pass/actions-traits-example.yaml @@ -0,0 +1,14 @@ +overlay: 1.1.0 +info: + title: Apply Traits + version: 1.0.0 +actions: + - target: $.paths.*.get[?@.x-oai-traits.paged] + update: + parameters: + - name: top + in: query + # ... + - name: skip + in: query + # ... diff --git a/tests/v1.1/pass/actions-wildcard-overlay-example.yaml b/tests/v1.1/pass/actions-wildcard-overlay-example.yaml new file mode 100644 index 0000000..7897225 --- /dev/null +++ b/tests/v1.1/pass/actions-wildcard-overlay-example.yaml @@ -0,0 +1,12 @@ +overlay: 1.1.0 +info: + title: Update many objects at once + version: 1.0.0 +actions: + - target: $.paths.*.get + update: + x-safe: true + - target: $.paths.*.get.parameters[?@.name=='filter' && @.in=='query'] + update: + schema: + $ref: '#/components/schemas/filterSchema' diff --git a/tests/v1.1/pass/info-extensions.yaml b/tests/v1.1/pass/info-extensions.yaml new file mode 100644 index 0000000..b8d3471 --- /dev/null +++ b/tests/v1.1/pass/info-extensions.yaml @@ -0,0 +1,8 @@ +overlay: 1.1.0 +info: + title: Info Extensions + version: 1.0.0 + x-myInfoExtension: {} +actions: + - target: '$' # Root of document + update: {} diff --git a/tests/v1.1/pass/minimal.yaml b/tests/v1.1/pass/minimal.yaml new file mode 100644 index 0000000..894f630 --- /dev/null +++ b/tests/v1.1/pass/minimal.yaml @@ -0,0 +1,7 @@ +overlay: 1.1.0 +info: + title: Minimal + version: 1.0.0 +actions: + - target: '$' # Root of document + update: {} diff --git a/tests/v1.1/pass/root-extensions.yaml b/tests/v1.1/pass/root-extensions.yaml new file mode 100644 index 0000000..e76abfc --- /dev/null +++ b/tests/v1.1/pass/root-extensions.yaml @@ -0,0 +1,8 @@ +overlay: 1.1.0 +info: + title: Root Extensions + version: 1.0.0 +actions: + - target: '$' # Root of document + update: {} +x-myExtension: {} From fd6b04ecbd51c7d51edde84d0fa97c5d87061b70 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Oct 2025 10:42:25 -0400 Subject: [PATCH 5/7] Revert "tests: updates v1.0 tests to be semantically valid" This reverts commit e31916072f1b944a01e4ff25846e073770b376db. --- tests/v1.0/pass/actions-description.yaml | 1 - tests/v1.0/pass/actions-extensions.yaml | 1 - tests/v1.0/pass/info-extensions.yaml | 1 - tests/v1.0/pass/minimal.yaml | 1 - tests/v1.0/pass/root-extensions.yaml | 1 - 5 files changed, 5 deletions(-) diff --git a/tests/v1.0/pass/actions-description.yaml b/tests/v1.0/pass/actions-description.yaml index 4da3dc9..a15c94e 100644 --- a/tests/v1.0/pass/actions-description.yaml +++ b/tests/v1.0/pass/actions-description.yaml @@ -5,4 +5,3 @@ info: actions: - target: '$' # Root of document description: this is an action description - update: {} diff --git a/tests/v1.0/pass/actions-extensions.yaml b/tests/v1.0/pass/actions-extensions.yaml index 9ee1e0a..206de4b 100644 --- a/tests/v1.0/pass/actions-extensions.yaml +++ b/tests/v1.0/pass/actions-extensions.yaml @@ -5,4 +5,3 @@ info: actions: - target: '$' # Root of document x-myActionsExtension: {} - update: {} diff --git a/tests/v1.0/pass/info-extensions.yaml b/tests/v1.0/pass/info-extensions.yaml index 0e3bc74..bcee3b6 100644 --- a/tests/v1.0/pass/info-extensions.yaml +++ b/tests/v1.0/pass/info-extensions.yaml @@ -5,4 +5,3 @@ info: x-myInfoExtension: {} actions: - target: '$' # Root of document - update: {} diff --git a/tests/v1.0/pass/minimal.yaml b/tests/v1.0/pass/minimal.yaml index 600f964..2717fc2 100644 --- a/tests/v1.0/pass/minimal.yaml +++ b/tests/v1.0/pass/minimal.yaml @@ -4,4 +4,3 @@ info: version: 1.0.0 actions: - target: '$' # Root of document - update: {} diff --git a/tests/v1.0/pass/root-extensions.yaml b/tests/v1.0/pass/root-extensions.yaml index 8cb528c..e311b42 100644 --- a/tests/v1.0/pass/root-extensions.yaml +++ b/tests/v1.0/pass/root-extensions.yaml @@ -4,5 +4,4 @@ info: version: 1.0.0 actions: - target: '$' # Root of document - update: {} x-myExtension: {} From f43a2e99532f46daf0057ea28b27a36b35f40059 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Oct 2025 14:46:38 -0400 Subject: [PATCH 6/7] chore: aligns v1.1 schema with v1.0 Signed-off-by: Vincent Biret --- schemas/v1.1/schema.yaml | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/schemas/v1.1/schema.yaml b/schemas/v1.1/schema.yaml index 4dfcd31..459cbef 100644 --- a/schemas/v1.1/schema.yaml +++ b/schemas/v1.1/schema.yaml @@ -43,24 +43,17 @@ $defs: pattern: ^\$ description: type: string - oneOf: - - properties: - update: - type: - - string - - boolean - - object - - array - - number - - "null" - required: - - update - - properties: - remove: - type: boolean - default: false - required: - - remove + update: + type: + - string + - boolean + - object + - array + - number + - "null" + remove: + type: boolean + default: false required: - target $ref: "#/$defs/specification-extensions" From aa5902de6b022e18d6fb3f4822a6ba853c12d97a Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 21 Oct 2025 14:47:04 -0400 Subject: [PATCH 7/7] tests: removes extraneous test Signed-off-by: Vincent Biret --- tests/v1.1/fail/not-update-with-remove.yaml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 tests/v1.1/fail/not-update-with-remove.yaml diff --git a/tests/v1.1/fail/not-update-with-remove.yaml b/tests/v1.1/fail/not-update-with-remove.yaml deleted file mode 100644 index 036a02d..0000000 --- a/tests/v1.1/fail/not-update-with-remove.yaml +++ /dev/null @@ -1,10 +0,0 @@ -overlay: 1.1.0 -info: - title: Update many objects at once - version: 1.0.0 -actions: - - target: $.paths.*.get - update: - x-safe: true - remove: true - description: This test could technically be in 1.0 but I'm not sure whether we can edit the schema at this point.