Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 20 additions & 12 deletions schemas/v3.0/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "https://spec.openapis.org/oas/3.0/schema/2019-04-02",
"id": "https://spec.openapis.org/oas/3.0/schema/2021-09-28",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Validation schema for OpenAPI Specification 3.0.X.",
"type": "object",
Expand Down Expand Up @@ -1358,9 +1358,8 @@
"description": "Bearer",
"properties": {
"scheme": {
"enum": [
"bearer"
]
"type": "string",
"pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$"
}
}
},
Expand All @@ -1374,9 +1373,8 @@
"properties": {
"scheme": {
"not": {
"enum": [
"bearer"
]
"type": "string",
"pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$"
}
}
}
Expand Down Expand Up @@ -1489,7 +1487,8 @@
"PasswordOAuthFlow": {
"type": "object",
"required": [
"tokenUrl"
"tokenUrl",
"scopes"
],
"properties": {
"tokenUrl": {
Expand All @@ -1516,7 +1515,8 @@
"ClientCredentialsFlow": {
"type": "object",
"required": [
"tokenUrl"
"tokenUrl",
"scopes"
],
"properties": {
"tokenUrl": {
Expand Down Expand Up @@ -1544,7 +1544,8 @@
"type": "object",
"required": [
"authorizationUrl",
"tokenUrl"
"tokenUrl",
"scopes"
],
"properties": {
"authorizationUrl": {
Expand Down Expand Up @@ -1628,7 +1629,14 @@
"headers": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Header"
"oneOf": [
{
"$ref": "#/definitions/Header"
},
{
"$ref": "#/definitions/Reference"
}
]
}
},
"style": {
Expand All @@ -1651,4 +1659,4 @@
"additionalProperties": false
}
}
}
}
2 changes: 1 addition & 1 deletion schemas/v3.0/schema.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id: https://spec.openapis.org/oas/3.0/schema/2021-08-12
id: https://spec.openapis.org/oas/3.0/schema/2021-09-28
$schema: http://json-schema.org/draft-04/schema#
description: Validation schema for OpenAPI Specification 3.0.X.
type: object
Expand Down
6 changes: 3 additions & 3 deletions schemas/v3.1/schema-base.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-05-20",
"$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-09-28",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "https://spec.openapis.org/oas/3.1/schema/2021-05-20",
"$ref": "https://spec.openapis.org/oas/3.1/schema/2021-09-28",
"properties": {
"jsonSchemaDialect": {
"$ref": "#/$defs/dialect"
Expand All @@ -21,4 +21,4 @@
}
}
}
}
}
4 changes: 2 additions & 2 deletions schemas/v3.1/schema-base.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$id: 'https://spec.openapis.org/oas/3.1/schema-base/2021-05-20'
$id: 'https://spec.openapis.org/oas/3.1/schema-base/2021-09-28'
$schema: 'https://json-schema.org/draft/2020-12/schema'

$ref: 'https://spec.openapis.org/oas/3.1/schema/2021-05-20'
$ref: 'https://spec.openapis.org/oas/3.1/schema/2021-09-28'
properties:
jsonSchemaDialect:
$ref: '#/$defs/dialect'
Expand Down
14 changes: 7 additions & 7 deletions schemas/v3.1/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "https://spec.openapis.org/oas/3.1/schema/2021-05-20",
"$id": "https://spec.openapis.org/oas/3.1/schema/2021-09-28",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
Expand Down Expand Up @@ -622,6 +622,7 @@
},
"parameter-or-reference": {
"if": {
"type": "object",
"required": [
"$ref"
]
Expand Down Expand Up @@ -865,6 +866,7 @@
},
"example-or-reference": {
"if": {
"type": "object",
"required": [
"$ref"
]
Expand Down Expand Up @@ -1131,7 +1133,8 @@
"const": "http"
},
"scheme": {
"const": "bearer"
"type": "string",
"pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$"
}
},
"required": [
Expand All @@ -1144,10 +1147,7 @@
"bearerFormat": {
"type": "string"
}
},
"required": [
"scheme"
]
}
}
},
"type-oauth2": {
Expand Down Expand Up @@ -1348,4 +1348,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion schemas/v3.1/schema.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$id: 'https://spec.openapis.org/oas/3.1/schema/2021-05-20'
$id: 'https://spec.openapis.org/oas/3.1/schema/2021-09-28'
$schema: 'https://json-schema.org/draft/2020-12/schema'

type: object
Expand Down
2 changes: 1 addition & 1 deletion tests/v3.1/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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-05-20");
metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2021-09-28");
});

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