diff --git a/schemas/v3.1/schema-base.json b/schemas/v3.1/schema-base.json index 658e943cc5..b8631e628f 100644 --- a/schemas/v3.1/schema-base.json +++ b/schemas/v3.1/schema-base.json @@ -1,7 +1,7 @@ { - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-04-15", + "$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-05-20", "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://spec.openapis.org/oas/3.1/schema/2021-04-15", + "$ref": "https://spec.openapis.org/oas/3.1/schema/2021-05-20", "properties": { "jsonSchemaDialect": { "$ref": "#/$defs/dialect" diff --git a/schemas/v3.1/schema-base.yaml b/schemas/v3.1/schema-base.yaml index 515ed08989..860f62b106 100644 --- a/schemas/v3.1/schema-base.yaml +++ b/schemas/v3.1/schema-base.yaml @@ -1,7 +1,7 @@ -$id: 'https://spec.openapis.org/oas/3.1/schema-base/2021-04-15' +$id: 'https://spec.openapis.org/oas/3.1/schema-base/2021-05-20' $schema: 'https://json-schema.org/draft/2020-12/schema' -$ref: 'https://spec.openapis.org/oas/3.1/schema/2021-04-15' +$ref: 'https://spec.openapis.org/oas/3.1/schema/2021-05-20' properties: jsonSchemaDialect: $ref: '#/$defs/dialect' diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index a798834247..44fdbb92b8 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/2021-04-15", + "$id": "https://spec.openapis.org/oas/3.1/schema/2021-05-20", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { @@ -11,7 +11,8 @@ "$ref": "#/$defs/info" }, "jsonSchemaDialect": { - "$ref": "#/$defs/uri", + "type": "string", + "format": "uri", "default": "https://spec.openapis.org/oas/3.1/dialect/base" }, "servers": { @@ -130,7 +131,8 @@ "type": "string" }, "url": { - "$ref": "#/$defs/uri" + "type": "string", + "format": "uri" } }, "required": [ @@ -155,7 +157,8 @@ "type": "object", "properties": { "url": { - "$ref": "#/$defs/uri" + "type": "string", + "format": "uri-reference" }, "description": { "type": "string" @@ -390,7 +393,8 @@ "type": "string" }, "url": { - "$ref": "#/$defs/uri" + "type": "string", + "format": "uri" } }, "required": [ @@ -849,7 +853,8 @@ }, "value": true, "externalValue": { - "$ref": "#/$defs/uri" + "type": "string", + "format": "uri" } }, "$ref": "#/$defs/specification-extensions", @@ -872,7 +877,8 @@ "type": "object", "properties": { "operationRef": { - "$ref": "#/$defs/uri" + "type": "string", + "format": "uri-reference" }, "operationId": true, "parameters": { @@ -1003,7 +1009,8 @@ "type": "object", "properties": { "$ref": { - "$ref": "#/$defs/uri" + "type": "string", + "format": "uri-reference" }, "summary": { "type": "string" @@ -1176,7 +1183,8 @@ "then": { "properties": { "openIdConnectUrl": { - "$ref": "#/$defs/uri" + "type": "string", + "format": "uri" } }, "required": [ @@ -1329,10 +1337,6 @@ } } }, - "uri": { - "type": "string", - "format": "uri" - }, "map-of-strings": { "type": "object", "additionalProperties": { diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 86cb44efca..39b90f34de 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/2021-04-15' +$id: 'https://spec.openapis.org/oas/3.1/schema/2021-05-20' $schema: 'https://json-schema.org/draft/2020-12/schema' type: object @@ -9,7 +9,8 @@ properties: info: $ref: '#/$defs/info' jsonSchemaDialect: - $ref: '#/$defs/uri' + type: string + format: uri default: 'https://spec.openapis.org/oas/3.1/dialect/base' servers: type: array @@ -90,7 +91,8 @@ $defs: identifier: type: string url: - $ref: '#/$defs/uri' + type: string + format: uri required: - name oneOf: @@ -105,7 +107,8 @@ $defs: type: object properties: url: - $ref: '#/$defs/uri' + type: string + format: uri-reference description: type: string variables: @@ -270,7 +273,8 @@ $defs: description: type: string url: - $ref: '#/$defs/uri' + type: string + format: uri required: - url $ref: '#/$defs/specification-extensions' @@ -574,7 +578,8 @@ $defs: type: string value: true externalValue: - $ref: '#/$defs/uri' + type: string + format: uri $ref: '#/$defs/specification-extensions' unevaluatedProperties: false @@ -591,7 +596,8 @@ $defs: type: object properties: operationRef: - $ref: '#/$defs/uri' + type: string + format: uri-reference operationId: true parameters: $ref: '#/$defs/map-of-strings' @@ -681,7 +687,8 @@ $defs: type: object properties: $ref: - $ref: '#/$defs/uri' + type: string + format: uri-reference summary: type: string description: @@ -793,7 +800,8 @@ $defs: then: properties: openIdConnectUrl: - $ref: '#/$defs/uri' + type: string + format: uri required: - openIdConnectUrl @@ -903,10 +911,6 @@ $defs: additionalProperties: $ref: '#/$defs/example-or-reference' - uri: - type: string - format: uri - map-of-strings: type: object additionalProperties: diff --git a/tests/v3.1/test.js b/tests/v3.1/test.js index 43f7e80588..5e7bf55692 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/2021-03-02"); + metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2021-05-20"); }); describe("Pass", () => {