From b704b9b60db2429129c17f30bba031ac5b95aa42 Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Fri, 7 Oct 2022 12:39:27 -0700 Subject: [PATCH] Publish v3.1 schemas version 2022-10-07 --- schemas/v3.1/schema-base.json | 4 ++-- schemas/v3.1/schema-base.yaml | 4 ++-- schemas/v3.1/schema.json | 25 ++++++++++++------------- schemas/v3.1/schema.yaml | 2 +- tests/v3.1/test.js | 2 +- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/schemas/v3.1/schema-base.json b/schemas/v3.1/schema-base.json index 04c9f60206..752e98be4e 100644 --- a/schemas/v3.1/schema-base.json +++ b/schemas/v3.1/schema-base.json @@ -1,10 +1,10 @@ { - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2022-02-27", + "$id": "https://spec.openapis.org/oas/3.1/schema-base/2022-10-07", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "The description of OpenAPI v3.1.x documents using the OpenAPI JSON Schema dialect, as defined by https://spec.openapis.org/oas/v3.1.0", - "$ref": "https://spec.openapis.org/oas/3.1/schema/2022-02-27", + "$ref": "https://spec.openapis.org/oas/3.1/schema/2022-10-07", "properties": { "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } }, diff --git a/schemas/v3.1/schema-base.yaml b/schemas/v3.1/schema-base.yaml index d4fa536fde..01a5209a01 100644 --- a/schemas/v3.1/schema-base.yaml +++ b/schemas/v3.1/schema-base.yaml @@ -1,9 +1,9 @@ -$id: 'https://spec.openapis.org/oas/3.1/schema-base/2022-02-27' +$id: 'https://spec.openapis.org/oas/3.1/schema-base/2022-10-07' $schema: 'https://json-schema.org/draft/2020-12/schema' description: The description of OpenAPI v3.1.x documents using the OpenAPI JSON Schema dialect, as defined by https://spec.openapis.org/oas/v3.1.0 -$ref: 'https://spec.openapis.org/oas/3.1/schema/2022-02-27' +$ref: 'https://spec.openapis.org/oas/3.1/schema/2022-10-07' properties: jsonSchemaDialect: $ref: '#/$defs/dialect' diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index 45492c25a9..468bc7e5f5 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -1,5 +1,5 @@ { - "$id": "https://spec.openapis.org/oas/3.1/schema/2022-02-27", + "$id": "https://spec.openapis.org/oas/3.1/schema/2022-10-07", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0", "type": "object", @@ -22,7 +22,9 @@ "$ref": "#/$defs/server" }, "default": [ - { "url": "/" } + { + "url": "/" + } ] }, "paths": { @@ -148,18 +150,15 @@ "required": [ "name" ], - "oneOf": [ - { - "required": [ - "identifier" - ] - }, - { - "required": [ - "url" - ] + "dependentSchemas": { + "identifier": { + "not": { + "required": [ + "url" + ] + } } - ], + }, "$ref": "#/$defs/specification-extensions", "unevaluatedProperties": false }, diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index f813d4d56b..331bba0813 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -1,4 +1,4 @@ -$id: 'https://spec.openapis.org/oas/3.1/schema/2022-02-27' +$id: 'https://spec.openapis.org/oas/3.1/schema/2022-10-07' $schema: 'https://json-schema.org/draft/2020-12/schema' description: The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0 diff --git a/tests/v3.1/test.js b/tests/v3.1/test.js index e7679f5059..a8bb6b17af 100644 --- a/tests/v3.1/test.js +++ b/tests/v3.1/test.js @@ -14,7 +14,7 @@ before(async () => { JsonSchema.add(dialect); JsonSchema.add(vocabulary); JsonSchema.add(yaml.parse(fs.readFileSync(`${__dirname}/../../schemas/v3.1/schema.yaml`, "utf8"), { prettyErrors: true })); - metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2022-02-27"); + metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2022-10-07"); }); describe("v3.1 Pass", () => {