未验证 提交 157a4c81 编写于 作者: J Jason Desrosiers 提交者: GitHub

Publish v3.1 schemas version 2022-10-07 (#3042)

上级 ba8510a7
{ {
"$id": "https://spec.openapis.org/oas/3.1/schema-base/2022-02-27", "$id": "https://spec.openapis.org/oas/3.1/schema-base/2022-10-07",
"$schema": "https://json-schema.org/draft/2020-12/schema", "$schema": "https://json-schema.org/draft/2020-12/schema",
"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", "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", "$ref": "https://spec.openapis.org/oas/3.1/schema/2022-10-07",
"properties": { "properties": {
"jsonSchemaDialect": { "$ref": "#/$defs/dialect" } "jsonSchemaDialect": { "$ref": "#/$defs/dialect" }
}, },
......
$id: 'https://spec.openapis.org/oas/3.1/schema-base/2022-02-27' $id: 'https://spec.openapis.org/oas/3.1/schema-base/2022-10-07'
$schema: 'https://json-schema.org/draft/2020-12/schema' $schema: 'https://json-schema.org/draft/2020-12/schema'
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 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' $ref: 'https://spec.openapis.org/oas/3.1/schema/2022-10-07'
properties: properties:
jsonSchemaDialect: jsonSchemaDialect:
$ref: '#/$defs/dialect' $ref: '#/$defs/dialect'
......
{ {
"$id": "https://spec.openapis.org/oas/3.1/schema/2022-02-27", "$id": "https://spec.openapis.org/oas/3.1/schema/2022-10-07",
"$schema": "https://json-schema.org/draft/2020-12/schema", "$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", "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", "type": "object",
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
"$ref": "#/$defs/server" "$ref": "#/$defs/server"
}, },
"default": [ "default": [
{ "url": "/" } {
"url": "/"
}
] ]
}, },
"paths": { "paths": {
...@@ -148,18 +150,15 @@ ...@@ -148,18 +150,15 @@
"required": [ "required": [
"name" "name"
], ],
"oneOf": [ "dependentSchemas": {
{ "identifier": {
"required": [ "not": {
"identifier" "required": [
] "url"
}, ]
{ }
"required": [
"url"
]
} }
], },
"$ref": "#/$defs/specification-extensions", "$ref": "#/$defs/specification-extensions",
"unevaluatedProperties": false "unevaluatedProperties": false
}, },
......
$id: 'https://spec.openapis.org/oas/3.1/schema/2022-02-27' $id: 'https://spec.openapis.org/oas/3.1/schema/2022-10-07'
$schema: 'https://json-schema.org/draft/2020-12/schema' $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 description: The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0
......
...@@ -14,7 +14,7 @@ before(async () => { ...@@ -14,7 +14,7 @@ before(async () => {
JsonSchema.add(dialect); JsonSchema.add(dialect);
JsonSchema.add(vocabulary); JsonSchema.add(vocabulary);
JsonSchema.add(yaml.parse(fs.readFileSync(`${__dirname}/../../schemas/v3.1/schema.yaml`, "utf8"), { prettyErrors: true })); 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/2022-02-27"); metaSchema = await JsonSchema.get("https://spec.openapis.org/oas/3.1/schema/2022-10-07");
}); });
describe("v3.1 Pass", () => { describe("v3.1 Pass", () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册