File tree 10 files changed +70
-50
lines changed
10 files changed +70
-50
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "title" : " OpenAPI 3.1 Schema Object Dialect" ,
3
- "description" : " A JSON Schema dialect describing schemas found in OpenAPI documents" ,
4
2
"$id" : " https://spec.openapis.org/oas/3.1/dialect/base" ,
5
3
"$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
+
6
8
"$vocabulary" : {
7
9
"https://json-schema.org/draft/2020-12/vocab/core" : true ,
8
10
"https://json-schema.org/draft/2020-12/vocab/applicator" : true ,
13
15
"https://json-schema.org/draft/2020-12/vocab/content" : true ,
14
16
"https://spec.openapis.org/oas/3.1/vocab/base" : false
15
17
},
18
+
16
19
"$dynamicAnchor" : " meta" ,
17
20
18
21
"allOf" : [
Original file line number Diff line number Diff line change 1
- ---
1
+ $id : https://spec.openapis.org/oas/3.1/dialect/base
2
+ $schema : https://json-schema.org/draft/2020-12/schema
3
+
2
4
title : OpenAPI 3.1 Schema Object Dialect
3
5
description : A JSON Schema dialect describing schemas found in OpenAPI documents
6
+
4
7
$dynamicAnchor : meta
5
- $id : https://spec.openapis.org/oas/3.1/dialect/base
6
- $schema : https://json-schema.org/draft/2020-12/schema
8
+
7
9
$vocabulary :
8
10
https://json-schema.org/draft/2020-12/vocab/applicator : true
9
11
https://json-schema.org/draft/2020-12/vocab/content : true
@@ -13,6 +15,7 @@ $vocabulary:
13
15
https://json-schema.org/draft/2020-12/vocab/unevaluated : true
14
16
https://json-schema.org/draft/2020-12/vocab/validation : true
15
17
https://spec.openapis.org/oas/3.1/vocab/base : false
18
+
16
19
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
Original file line number Diff line number Diff line change 1
1
{
2
- "title" : " OAS Base vocabulary" ,
3
- "description" : " A JSON Schema Vocabulary used in the OpenAPI Schema Dialect" ,
4
2
"$id" : " https://spec.openapis.org/oas/3.1/meta/base" ,
5
3
"$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
+
6
8
"$vocabulary" : {
7
9
"https://spec.openapis.org/oas/3.1/vocab/base" : true
8
10
},
11
+
9
12
"$dynamicAnchor" : " meta" ,
10
13
11
14
"type" : [" object" , " boolean" ],
15
18
"externalDocs" : { "$ref" : " #/$defs/external-docs" },
16
19
"xml" : { "$ref" : " #/$defs/xml" }
17
20
},
21
+
18
22
"$defs" : {
19
23
"extensible" : {
20
24
"patternProperties" : {
21
25
"^x-" : true
22
26
}
23
27
},
28
+
24
29
"discriminator" : {
25
30
"$ref" : " #/$defs/extensible" ,
26
31
"type" : " object" ,
38
43
"required" : [" propertyName" ],
39
44
"unevaluatedProperties" : false
40
45
},
46
+
41
47
"external-docs" : {
42
48
"$ref" : " #/$defs/extensible" ,
43
49
"type" : " object" ,
53
59
"required" : [" url" ],
54
60
"unevaluatedProperties" : false
55
61
},
62
+
56
63
"xml" : {
57
64
"$ref" : " #/$defs/extensible" ,
58
65
"type" : " object" ,
Original file line number Diff line number Diff line change 1
- ---
1
+ $id : https://spec.openapis.org/oas/3.1/meta/base
2
+ $schema : https://json-schema.org/draft/2020-12/schema
3
+
2
4
title : OAS Base vocabulary
3
5
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
+
4
24
$defs :
5
25
discriminator :
6
26
$ref : ' #/$defs/extensible'
@@ -12,9 +32,10 @@ $defs:
12
32
propertyName :
13
33
type : string
14
34
required :
15
- - propertyName
35
+ - propertyName
16
36
type : object
17
37
unevaluatedProperties : false
38
+
18
39
extensible :
19
40
patternProperties :
20
41
^x- : true
@@ -27,9 +48,10 @@ $defs:
27
48
format : uri-reference
28
49
type : string
29
50
required :
30
- - url
51
+ - url
31
52
type : object
32
53
unevaluatedProperties : false
54
+
33
55
xml :
34
56
$ref : ' #/$defs/extensible'
35
57
properties :
@@ -46,19 +68,3 @@ $defs:
46
68
type : boolean
47
69
type : object
48
70
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
Original file line number Diff line number Diff line change 1
1
{
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" ,
4
3
"$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" ,
6
8
"properties" : {
7
- "jsonSchemaDialect" : {
8
- "$ref" : " #/$defs/dialect"
9
- }
9
+ "jsonSchemaDialect" : { "$ref" : " #/$defs/dialect" }
10
10
},
11
+
11
12
"$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
+
15
15
"schema" : {
16
16
"$dynamicAnchor" : " meta" ,
17
17
"$ref" : " https://spec.openapis.org/oas/3.1/dialect/base" ,
18
18
"properties" : {
19
- "$schema" : {
20
- "$ref" : " #/$defs/dialect"
21
- }
19
+ "$schema" : { "$ref" : " #/$defs/dialect" }
22
20
}
23
21
}
24
22
}
25
- }
23
+ }
Original file line number Diff line number Diff line change 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'
3
2
$schema : ' https://json-schema.org/draft/2020-12/schema'
4
3
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'
6
7
properties :
7
8
jsonSchemaDialect :
8
9
$ref : ' #/$defs/dialect'
9
10
10
11
$defs :
11
12
dialect :
12
13
const : ' https://spec.openapis.org/oas/3.1/dialect/base'
14
+
13
15
schema :
14
16
$dynamicAnchor : meta
15
17
$ref : ' https://spec.openapis.org/oas/3.1/dialect/base'
Original file line number Diff line number Diff line change 1
1
{
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" ,
4
3
"$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" ,
5
5
"type" : " object" ,
6
6
"properties" : {
7
7
"openapi" : {
Original file line number Diff line number Diff line change 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'
3
2
$schema : ' https://json-schema.org/draft/2020-12/schema'
4
3
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
+
5
6
type : object
6
7
properties :
7
8
openapi :
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ const args = process.argv.reduce((acc, arg) => {
25
25
( async function ( ) {
26
26
try {
27
27
const schemaType = args . schema || "schema" ;
28
- const schemaVersion = args . version || "2021-03-02 " ;
28
+ const schemaVersion = args . version || "2022-02-27 " ;
29
29
const outputFormat = args . format || JsonSchema . BASIC ;
30
30
31
31
// Config
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ before(async () => {
14
14
JsonSchema . add ( dialect ) ;
15
15
JsonSchema . add ( vocabulary ) ;
16
16
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 " ) ;
18
18
} ) ;
19
19
20
20
describe ( "v3.1 Pass" , ( ) => {
You can’t perform that action at this time.
0 commit comments