Bump schema version numbers for 2022-02-17 release
MODIFY
schemas/v3.1/dialect/base.schema.json
schemas/v3.1/dialect/base.schema.json
{
- "title": "OpenAPI 3.1 Schema Object Dialect",
- "description": "A JSON Schema dialect describing schemas found in OpenAPI documents",
"$id": "https://spec.openapis.org/oas/3.1/dialect/base",
"$schema": "https://json-schema.org/draft/2020-12/schema",
+
+ "title": "OpenAPI 3.1 Schema Object Dialect",
+ "description": "A JSON Schema dialect describing schemas found in OpenAPI documents",
+
"$vocabulary": {
"https://json-schema.org/draft/2020-12/vocab/core": true,
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
"https://json-schema.org/draft/2020-12/vocab/content": true,
"https://spec.openapis.org/oas/3.1/vocab/base": false
},
+
"$dynamicAnchor": "meta",
"allOf": [

MODIFY
schemas/v3.1/dialect/base.schema.yaml
schemas/v3.1/dialect/base.schema.yaml
----
+$id: https://spec.openapis.org/oas/3.1/dialect/base
+$schema: https://json-schema.org/draft/2020-12/schema
+
title: OpenAPI 3.1 Schema Object Dialect
description: A JSON Schema dialect describing schemas found in OpenAPI documents
+
$dynamicAnchor: meta
-$id: https://spec.openapis.org/oas/3.1/dialect/base
-$schema: https://json-schema.org/draft/2020-12/schema
+
$vocabulary:
https://json-schema.org/draft/2020-12/vocab/applicator: true
https://json-schema.org/draft/2020-12/vocab/content: true
@@ -13,6 +15,7 @@ $vocabulary:
https://json-schema.org/draft/2020-12/vocab/unevaluated: true
https://json-schema.org/draft/2020-12/vocab/validation: true
https://spec.openapis.org/oas/3.1/vocab/base: false
+
allOf:
- $ref: https://json-schema.org/draft/2020-12/schema
- $ref: https://spec.openapis.org/oas/3.1/meta/base

MODIFY
schemas/v3.1/meta/base.schema.json
schemas/v3.1/meta/base.schema.json
{
- "title": "OAS Base vocabulary",
- "description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect",
"$id": "https://spec.openapis.org/oas/3.1/meta/base",
"$schema": "https://json-schema.org/draft/2020-12/schema",
+
+ "title": "OAS Base vocabulary",
+ "description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect",
+
"$vocabulary": {
"https://spec.openapis.org/oas/3.1/vocab/base": true
},
+
"$dynamicAnchor": "meta",
"type": ["object", "boolean"],
"externalDocs": { "$ref": "#/$defs/external-docs" },
"xml": { "$ref": "#/$defs/xml" }
},
+
"$defs": {
"extensible": {
"patternProperties": {
"^x-": true
}
},
+
"discriminator": {
"$ref": "#/$defs/extensible",
"type": "object",
"required": ["propertyName"],
"unevaluatedProperties": false
},
+
"external-docs": {
"$ref": "#/$defs/extensible",
"type": "object",
"required": ["url"],
"unevaluatedProperties": false
},
+
"xml": {
"$ref": "#/$defs/extensible",
"type": "object",

MODIFY
schemas/v3.1/meta/base.schema.yaml
schemas/v3.1/meta/base.schema.yaml
----
+$id: https://spec.openapis.org/oas/3.1/meta/base
+$schema: https://json-schema.org/draft/2020-12/schema
+
title: OAS Base vocabulary
description: A JSON Schema Vocabulary used in the OpenAPI Schema Dialect
+
+$dynamicAnchor: meta
+
+$vocabulary:
+ https://spec.openapis.org/oas/3.1/vocab/base: true
+
+type:
+ - object
+ - boolean
+properties:
+ discriminator:
+ $ref: '#/$defs/discriminator'
+ example: true
+ externalDocs:
+ $ref: '#/$defs/external-docs'
+ xml:
+ $ref: '#/$defs/xml'
+
$defs:
discriminator:
$ref: '#/$defs/extensible'
@@ -15,6 +35,7 @@ $defs:
- propertyName
type: object
unevaluatedProperties: false
+
extensible:
patternProperties:
^x-: true
@@ -30,6 +51,7 @@ $defs:
- url
type: object
unevaluatedProperties: false
+
xml:
$ref: '#/$defs/extensible'
properties:
@@ -46,19 +68,3 @@ $defs:
type: boolean
type: object
unevaluatedProperties: false
-$dynamicAnchor: meta
-$id: https://spec.openapis.org/oas/3.1/meta/base
-$schema: https://json-schema.org/draft/2020-12/schema
-$vocabulary:
- https://spec.openapis.org/oas/3.1/vocab/base: true
-properties:
- discriminator:
- $ref: '#/$defs/discriminator'
- example: true
- externalDocs:
- $ref: '#/$defs/external-docs'
- xml:
- $ref: '#/$defs/xml'
-type:
-- object
-- boolean

MODIFY
schemas/v3.1/schema-base.json
schemas/v3.1/schema-base.json
{
- "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",
- "$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-09-28",
+ "$id": "https://spec.openapis.org/oas/3.1/schema-base/2022-02-27",
"$schema": "https://json-schema.org/draft/2020-12/schema",
- "$ref": "https://spec.openapis.org/oas/3.1/schema/2021-09-28",
+
+ "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",
"properties": {
- "jsonSchemaDialect": {
- "$ref": "#/$defs/dialect"
- }
+ "jsonSchemaDialect": { "$ref": "#/$defs/dialect" }
},
+
"$defs": {
- "dialect": {
- "const": "https://spec.openapis.org/oas/3.1/dialect/base"
- },
+ "dialect": { "const": "https://spec.openapis.org/oas/3.1/dialect/base" },
+
"schema": {
"$dynamicAnchor": "meta",
"$ref": "https://spec.openapis.org/oas/3.1/dialect/base",
"properties": {
- "$schema": {
- "$ref": "#/$defs/dialect"
- }
+ "$schema": { "$ref": "#/$defs/dialect" }
}
}
}

MODIFY
schemas/v3.1/schema-base.yaml
schemas/v3.1/schema-base.yaml
-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
-$id: 'https://spec.openapis.org/oas/3.1/schema-base/2021-09-28'
+$id: 'https://spec.openapis.org/oas/3.1/schema-base/2022-02-27'
$schema: 'https://json-schema.org/draft/2020-12/schema'
-$ref: 'https://spec.openapis.org/oas/3.1/schema/2021-09-28'
+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'
properties:
jsonSchemaDialect:
$ref: '#/$defs/dialect'
@@ -10,6 +11,7 @@ properties:
$defs:
dialect:
const: 'https://spec.openapis.org/oas/3.1/dialect/base'
+
schema:
$dynamicAnchor: meta
$ref: 'https://spec.openapis.org/oas/3.1/dialect/base'

MODIFY
schemas/v3.1/schema.json
schemas/v3.1/schema.json
{
- "description": "The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0",
- "$id": "https://spec.openapis.org/oas/3.1/schema/2021-09-28",
+ "$id": "https://spec.openapis.org/oas/3.1/schema/2022-02-27",
"$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",
"properties": {
"openapi": {

MODIFY
schemas/v3.1/schema.yaml
schemas/v3.1/schema.yaml
-description: The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0
-$id: 'https://spec.openapis.org/oas/3.1/schema/2021-09-28'
+$id: 'https://spec.openapis.org/oas/3.1/schema/2022-02-27'
$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
properties:
openapi:

MODIFY
scripts/validate.js
scripts/validate.js
@@ -25,7 +25,7 @@ const args = process.argv.reduce((acc, arg) => {
(async function () {
try {
const schemaType = args.schema || "schema";
- const schemaVersion = args.version || "2021-03-02";
+ const schemaVersion = args.version || "2022-02-27";
const outputFormat = args.format || JsonSchema.BASIC;
// Config

MODIFY
tests/v3.1/test.js
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-09-28");
+ metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2022-02-27");
});
describe("v3.1 Pass", () => {

Bump schema version numbers for 2022-02-17 release (#2888)