Skip to content

Commit a1facce

Browse files
authored
Bump schema version numbers for 2022-02-17 release (#2888)
1 parent f6f9ab3 commit a1facce

File tree

10 files changed

+70
-50
lines changed

10 files changed

+70
-50
lines changed

schemas/v3.1/dialect/base.schema.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
2-
"title": "OpenAPI 3.1 Schema Object Dialect",
3-
"description": "A JSON Schema dialect describing schemas found in OpenAPI documents",
42
"$id": "https://spec.openapis.org/oas/3.1/dialect/base",
53
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
5+
"title": "OpenAPI 3.1 Schema Object Dialect",
6+
"description": "A JSON Schema dialect describing schemas found in OpenAPI documents",
7+
68
"$vocabulary": {
79
"https://json-schema.org/draft/2020-12/vocab/core": true,
810
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
@@ -13,6 +15,7 @@
1315
"https://json-schema.org/draft/2020-12/vocab/content": true,
1416
"https://spec.openapis.org/oas/3.1/vocab/base": false
1517
},
18+
1619
"$dynamicAnchor": "meta",
1720

1821
"allOf": [

schemas/v3.1/dialect/base.schema.yaml

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
---
1+
$id: https://spec.openapis.org/oas/3.1/dialect/base
2+
$schema: https://json-schema.org/draft/2020-12/schema
3+
24
title: OpenAPI 3.1 Schema Object Dialect
35
description: A JSON Schema dialect describing schemas found in OpenAPI documents
6+
47
$dynamicAnchor: meta
5-
$id: https://spec.openapis.org/oas/3.1/dialect/base
6-
$schema: https://json-schema.org/draft/2020-12/schema
8+
79
$vocabulary:
810
https://json-schema.org/draft/2020-12/vocab/applicator: true
911
https://json-schema.org/draft/2020-12/vocab/content: true
@@ -13,6 +15,7 @@ $vocabulary:
1315
https://json-schema.org/draft/2020-12/vocab/unevaluated: true
1416
https://json-schema.org/draft/2020-12/vocab/validation: true
1517
https://spec.openapis.org/oas/3.1/vocab/base: false
18+
1619
allOf:
17-
- $ref: https://json-schema.org/draft/2020-12/schema
18-
- $ref: https://spec.openapis.org/oas/3.1/meta/base
20+
- $ref: https://json-schema.org/draft/2020-12/schema
21+
- $ref: https://spec.openapis.org/oas/3.1/meta/base

schemas/v3.1/meta/base.schema.json

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
{
2-
"title": "OAS Base vocabulary",
3-
"description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect",
42
"$id": "https://spec.openapis.org/oas/3.1/meta/base",
53
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
5+
"title": "OAS Base vocabulary",
6+
"description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect",
7+
68
"$vocabulary": {
79
"https://spec.openapis.org/oas/3.1/vocab/base": true
810
},
11+
912
"$dynamicAnchor": "meta",
1013

1114
"type": ["object", "boolean"],
@@ -15,12 +18,14 @@
1518
"externalDocs": { "$ref": "#/$defs/external-docs" },
1619
"xml": { "$ref": "#/$defs/xml" }
1720
},
21+
1822
"$defs": {
1923
"extensible": {
2024
"patternProperties": {
2125
"^x-": true
2226
}
2327
},
28+
2429
"discriminator": {
2530
"$ref": "#/$defs/extensible",
2631
"type": "object",
@@ -38,6 +43,7 @@
3843
"required": ["propertyName"],
3944
"unevaluatedProperties": false
4045
},
46+
4147
"external-docs": {
4248
"$ref": "#/$defs/extensible",
4349
"type": "object",
@@ -53,6 +59,7 @@
5359
"required": ["url"],
5460
"unevaluatedProperties": false
5561
},
62+
5663
"xml": {
5764
"$ref": "#/$defs/extensible",
5865
"type": "object",

schemas/v3.1/meta/base.schema.yaml

+25-19
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
1-
---
1+
$id: https://spec.openapis.org/oas/3.1/meta/base
2+
$schema: https://json-schema.org/draft/2020-12/schema
3+
24
title: OAS Base vocabulary
35
description: A JSON Schema Vocabulary used in the OpenAPI Schema Dialect
6+
7+
$dynamicAnchor: meta
8+
9+
$vocabulary:
10+
https://spec.openapis.org/oas/3.1/vocab/base: true
11+
12+
type:
13+
- object
14+
- boolean
15+
properties:
16+
discriminator:
17+
$ref: '#/$defs/discriminator'
18+
example: true
19+
externalDocs:
20+
$ref: '#/$defs/external-docs'
21+
xml:
22+
$ref: '#/$defs/xml'
23+
424
$defs:
525
discriminator:
626
$ref: '#/$defs/extensible'
@@ -12,9 +32,10 @@ $defs:
1232
propertyName:
1333
type: string
1434
required:
15-
- propertyName
35+
- propertyName
1636
type: object
1737
unevaluatedProperties: false
38+
1839
extensible:
1940
patternProperties:
2041
^x-: true
@@ -27,9 +48,10 @@ $defs:
2748
format: uri-reference
2849
type: string
2950
required:
30-
- url
51+
- url
3152
type: object
3253
unevaluatedProperties: false
54+
3355
xml:
3456
$ref: '#/$defs/extensible'
3557
properties:
@@ -46,19 +68,3 @@ $defs:
4668
type: boolean
4769
type: object
4870
unevaluatedProperties: false
49-
$dynamicAnchor: meta
50-
$id: https://spec.openapis.org/oas/3.1/meta/base
51-
$schema: https://json-schema.org/draft/2020-12/schema
52-
$vocabulary:
53-
https://spec.openapis.org/oas/3.1/vocab/base: true
54-
properties:
55-
discriminator:
56-
$ref: '#/$defs/discriminator'
57-
example: true
58-
externalDocs:
59-
$ref: '#/$defs/external-docs'
60-
xml:
61-
$ref: '#/$defs/xml'
62-
type:
63-
- object
64-
- boolean

schemas/v3.1/schema-base.json

+11-13
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
{
2-
"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",
3-
"$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-09-28",
2+
"$id": "https://spec.openapis.org/oas/3.1/schema-base/2022-02-27",
43
"$schema": "https://json-schema.org/draft/2020-12/schema",
5-
"$ref": "https://spec.openapis.org/oas/3.1/schema/2021-09-28",
4+
5+
"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",
6+
7+
"$ref": "https://spec.openapis.org/oas/3.1/schema/2022-02-27",
68
"properties": {
7-
"jsonSchemaDialect": {
8-
"$ref": "#/$defs/dialect"
9-
}
9+
"jsonSchemaDialect": { "$ref": "#/$defs/dialect" }
1010
},
11+
1112
"$defs": {
12-
"dialect": {
13-
"const": "https://spec.openapis.org/oas/3.1/dialect/base"
14-
},
13+
"dialect": { "const": "https://spec.openapis.org/oas/3.1/dialect/base" },
14+
1515
"schema": {
1616
"$dynamicAnchor": "meta",
1717
"$ref": "https://spec.openapis.org/oas/3.1/dialect/base",
1818
"properties": {
19-
"$schema": {
20-
"$ref": "#/$defs/dialect"
21-
}
19+
"$schema": { "$ref": "#/$defs/dialect" }
2220
}
2321
}
2422
}
25-
}
23+
}

schemas/v3.1/schema-base.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
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
2-
$id: 'https://spec.openapis.org/oas/3.1/schema-base/2021-09-28'
1+
$id: 'https://spec.openapis.org/oas/3.1/schema-base/2022-02-27'
32
$schema: 'https://json-schema.org/draft/2020-12/schema'
43

5-
$ref: 'https://spec.openapis.org/oas/3.1/schema/2021-09-28'
4+
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
5+
6+
$ref: 'https://spec.openapis.org/oas/3.1/schema/2022-02-27'
67
properties:
78
jsonSchemaDialect:
89
$ref: '#/$defs/dialect'
910

1011
$defs:
1112
dialect:
1213
const: 'https://spec.openapis.org/oas/3.1/dialect/base'
14+
1315
schema:
1416
$dynamicAnchor: meta
1517
$ref: 'https://spec.openapis.org/oas/3.1/dialect/base'

schemas/v3.1/schema.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"description": "The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0",
3-
"$id": "https://spec.openapis.org/oas/3.1/schema/2021-09-28",
2+
"$id": "https://spec.openapis.org/oas/3.1/schema/2022-02-27",
43
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"description": "The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0",
55
"type": "object",
66
"properties": {
77
"openapi": {

schemas/v3.1/schema.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
description: The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0
2-
$id: 'https://spec.openapis.org/oas/3.1/schema/2021-09-28'
1+
$id: 'https://spec.openapis.org/oas/3.1/schema/2022-02-27'
32
$schema: 'https://json-schema.org/draft/2020-12/schema'
43

4+
description: The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0
5+
56
type: object
67
properties:
78
openapi:

scripts/validate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const args = process.argv.reduce((acc, arg) => {
2525
(async function () {
2626
try {
2727
const schemaType = args.schema || "schema";
28-
const schemaVersion = args.version || "2021-03-02";
28+
const schemaVersion = args.version || "2022-02-27";
2929
const outputFormat = args.format || JsonSchema.BASIC;
3030

3131
// Config

tests/v3.1/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ before(async () => {
1414
JsonSchema.add(dialect);
1515
JsonSchema.add(vocabulary);
1616
JsonSchema.add(yaml.parse(fs.readFileSync(`${__dirname}/../../schemas/v3.1/schema.yaml`, "utf8"), { prettyErrors: true }));
17-
metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2021-09-28");
17+
metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2022-02-27");
1818
});
1919

2020
describe("v3.1 Pass", () => {

0 commit comments

Comments
 (0)