The Wayback Machine - https://web.archive.org/web/20230101014656/https://github.com/OAI/OpenAPI-Specification/commit/a1facce1b3621df3630cb692e9fbe18a7612ea6d
Skip to content
Permalink
Browse files
Bump schema version numbers for 2022-02-17 release (#2888)
  • Loading branch information
jdesrosiers committed Mar 10, 2022
1 parent f6f9ab3 commit a1facce1b3621df3630cb692e9fbe18a7612ea6d
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 50 deletions.
@@ -1,8 +1,10 @@
{
"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,
@@ -13,6 +15,7 @@
"https://json-schema.org/draft/2020-12/vocab/content": true,
"https://spec.openapis.org/oas/3.1/vocab/base": false
},

"$dynamicAnchor": "meta",

"allOf": [
@@ -1,9 +1,11 @@
---
$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
- $ref: https://json-schema.org/draft/2020-12/schema
- $ref: https://spec.openapis.org/oas/3.1/meta/base
@@ -1,11 +1,14 @@
{
"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"],
@@ -15,12 +18,14 @@
"externalDocs": { "$ref": "#/$defs/external-docs" },
"xml": { "$ref": "#/$defs/xml" }
},

"$defs": {
"extensible": {
"patternProperties": {
"^x-": true
}
},

"discriminator": {
"$ref": "#/$defs/extensible",
"type": "object",
@@ -38,6 +43,7 @@
"required": ["propertyName"],
"unevaluatedProperties": false
},

"external-docs": {
"$ref": "#/$defs/extensible",
"type": "object",
@@ -53,6 +59,7 @@
"required": ["url"],
"unevaluatedProperties": false
},

"xml": {
"$ref": "#/$defs/extensible",
"type": "object",
@@ -1,6 +1,26 @@
---
$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'
@@ -12,9 +32,10 @@ $defs:
propertyName:
type: string
required:
- propertyName
- propertyName
type: object
unevaluatedProperties: false

extensible:
patternProperties:
^x-: true
@@ -27,9 +48,10 @@ $defs:
format: uri-reference
type: string
required:
- url
- 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
@@ -1,25 +1,23 @@
{
"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" }
}
}
}
}
}
@@ -1,15 +1,17 @@
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'

$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'
@@ -1,7 +1,7 @@
{
"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": {
@@ -1,7 +1,8 @@
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:
@@ -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
@@ -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", () => {

0 comments on commit a1facce

Please sign in to comment.