Skip to content

Commit 413b1a8

Browse files
authored
Update 3.1 schema id for patch release (#2718)
* Update 3.1 schema id for patch release * Generate JSON for new version of 3.1 schemas * Catchup v3.0 schema with #2158 * Catchup v3.0 schemas with #2673 * Catchup v3.0 schemas with #2706 * Update schema id for 3.0 release
1 parent ce732af commit 413b1a8

File tree

7 files changed

+35
-27
lines changed

7 files changed

+35
-27
lines changed

schemas/v3.0/schema.json

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "https://spec.openapis.org/oas/3.0/schema/2019-04-02",
2+
"id": "https://spec.openapis.org/oas/3.0/schema/2021-09-28",
33
"$schema": "http://json-schema.org/draft-04/schema#",
44
"description": "Validation schema for OpenAPI Specification 3.0.X.",
55
"type": "object",
@@ -1358,9 +1358,8 @@
13581358
"description": "Bearer",
13591359
"properties": {
13601360
"scheme": {
1361-
"enum": [
1362-
"bearer"
1363-
]
1361+
"type": "string",
1362+
"pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$"
13641363
}
13651364
}
13661365
},
@@ -1374,9 +1373,8 @@
13741373
"properties": {
13751374
"scheme": {
13761375
"not": {
1377-
"enum": [
1378-
"bearer"
1379-
]
1376+
"type": "string",
1377+
"pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$"
13801378
}
13811379
}
13821380
}
@@ -1489,7 +1487,8 @@
14891487
"PasswordOAuthFlow": {
14901488
"type": "object",
14911489
"required": [
1492-
"tokenUrl"
1490+
"tokenUrl",
1491+
"scopes"
14931492
],
14941493
"properties": {
14951494
"tokenUrl": {
@@ -1516,7 +1515,8 @@
15161515
"ClientCredentialsFlow": {
15171516
"type": "object",
15181517
"required": [
1519-
"tokenUrl"
1518+
"tokenUrl",
1519+
"scopes"
15201520
],
15211521
"properties": {
15221522
"tokenUrl": {
@@ -1544,7 +1544,8 @@
15441544
"type": "object",
15451545
"required": [
15461546
"authorizationUrl",
1547-
"tokenUrl"
1547+
"tokenUrl",
1548+
"scopes"
15481549
],
15491550
"properties": {
15501551
"authorizationUrl": {
@@ -1628,7 +1629,14 @@
16281629
"headers": {
16291630
"type": "object",
16301631
"additionalProperties": {
1631-
"$ref": "#/definitions/Header"
1632+
"oneOf": [
1633+
{
1634+
"$ref": "#/definitions/Header"
1635+
},
1636+
{
1637+
"$ref": "#/definitions/Reference"
1638+
}
1639+
]
16321640
}
16331641
},
16341642
"style": {
@@ -1651,4 +1659,4 @@
16511659
"additionalProperties": false
16521660
}
16531661
}
1654-
}
1662+
}

schemas/v3.0/schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
id: https://spec.openapis.org/oas/3.0/schema/2021-08-12
1+
id: https://spec.openapis.org/oas/3.0/schema/2021-09-28
22
$schema: http://json-schema.org/draft-04/schema#
33
description: Validation schema for OpenAPI Specification 3.0.X.
44
type: object

schemas/v3.1/schema-base.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-05-20",
2+
"$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-09-28",
33
"$schema": "https://json-schema.org/draft/2020-12/schema",
4-
"$ref": "https://spec.openapis.org/oas/3.1/schema/2021-05-20",
4+
"$ref": "https://spec.openapis.org/oas/3.1/schema/2021-09-28",
55
"properties": {
66
"jsonSchemaDialect": {
77
"$ref": "#/$defs/dialect"
@@ -21,4 +21,4 @@
2121
}
2222
}
2323
}
24-
}
24+
}

schemas/v3.1/schema-base.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
$id: 'https://spec.openapis.org/oas/3.1/schema-base/2021-05-20'
1+
$id: 'https://spec.openapis.org/oas/3.1/schema-base/2021-09-28'
22
$schema: 'https://json-schema.org/draft/2020-12/schema'
33

4-
$ref: 'https://spec.openapis.org/oas/3.1/schema/2021-05-20'
4+
$ref: 'https://spec.openapis.org/oas/3.1/schema/2021-09-28'
55
properties:
66
jsonSchemaDialect:
77
$ref: '#/$defs/dialect'

schemas/v3.1/schema.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$id": "https://spec.openapis.org/oas/3.1/schema/2021-05-20",
2+
"$id": "https://spec.openapis.org/oas/3.1/schema/2021-09-28",
33
"$schema": "https://json-schema.org/draft/2020-12/schema",
44
"type": "object",
55
"properties": {
@@ -622,6 +622,7 @@
622622
},
623623
"parameter-or-reference": {
624624
"if": {
625+
"type": "object",
625626
"required": [
626627
"$ref"
627628
]
@@ -865,6 +866,7 @@
865866
},
866867
"example-or-reference": {
867868
"if": {
869+
"type": "object",
868870
"required": [
869871
"$ref"
870872
]
@@ -1131,7 +1133,8 @@
11311133
"const": "http"
11321134
},
11331135
"scheme": {
1134-
"const": "bearer"
1136+
"type": "string",
1137+
"pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$"
11351138
}
11361139
},
11371140
"required": [
@@ -1144,10 +1147,7 @@
11441147
"bearerFormat": {
11451148
"type": "string"
11461149
}
1147-
},
1148-
"required": [
1149-
"scheme"
1150-
]
1150+
}
11511151
}
11521152
},
11531153
"type-oauth2": {
@@ -1348,4 +1348,4 @@
13481348
}
13491349
}
13501350
}
1351-
}
1351+
}

schemas/v3.1/schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$id: 'https://spec.openapis.org/oas/3.1/schema/2021-05-20'
1+
$id: 'https://spec.openapis.org/oas/3.1/schema/2021-09-28'
22
$schema: 'https://json-schema.org/draft/2020-12/schema'
33

44
type: object

tests/v3.1/test.js

Lines changed: 1 addition & 1 deletion
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-05-20");
17+
metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2021-09-28");
1818
});
1919

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

0 commit comments

Comments
 (0)