Skip to content

Commit b011389

Browse files
committed
Upgrade to draft 6. Fixes YousefED#156
1 parent 4e3e7c9 commit b011389

File tree

86 files changed

+231
-404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+231
-404
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ will be translated to
103103
```json
104104
{
105105
"$ref": "#/definitions/Shape",
106-
"$schema": "http://json-schema.org/draft-04/schema#",
106+
"$schema": "http://json-schema.org/draft-06/schema#",
107107
"definitions": {
108108
"Shape": {
109109
"properties": {

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@
4949
"glob": "~7.1.2",
5050
"json-stable-stringify": "^1.0.1",
5151
"typescript": "~2.6.2",
52-
"yargs": "^8.0.2"
52+
"yargs": "^11.0.0"
5353
},
5454
"devDependencies": {
5555
"@types/assertion-error": "^1.0.30",
5656
"@types/chai": "^4.0.1",
5757
"@types/glob": "^5.0.30",
5858
"@types/json-stable-stringify": "^1.0.31",
5959
"@types/mocha": "^2.2.41",
60-
"@types/node": "^8.0.7",
61-
"ajv": "^5.2.0",
62-
"chai": "^4.0.2",
63-
"mocha": "^3.4.2",
64-
"source-map-support": "^0.4.15",
65-
"ts-node": "^3.1.0",
60+
"@types/node": "^9.4.6",
61+
"ajv": "^6.2.0",
62+
"chai": "^4.1.2",
63+
"mocha": "^5.0.1",
64+
"source-map-support": "^0.5.3",
65+
"ts-node": "^5.0.0",
6666
"tslint": "^5.4.3"
6767
},
6868
"scripts": {

test/programs/annotation-default/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"properties": {
44
"varBoolean": {
55
"default": true,

test/programs/annotation-id/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"MySubObject": {
55
"id": "filled#",

test/programs/annotation-ref/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"MySubObject": {
55
"type": "object"

test/programs/annotation-tjs/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"properties": {
44
"dateTime": {
55
"format": "date-time",

test/programs/array-and-description/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"properties": {
44
"description": {
55
"type": "string"

test/programs/array-readonly/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"items": {
44
"type": "number"
55
},

test/programs/array-types/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"items": {
44
"type": [
55
"string",

test/programs/class-extends/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"properties": {
44
"propA": {
55
"type": "number"

test/programs/class-single/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"properties": {
44
"propA": {
55
"type": "number"

test/programs/comments-override/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"MySubObject": {
55
"additionalProperties": true,

test/programs/comments/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"additionalProperties": false,
44
"description": "Description of MyObject, a top level object,\nwhich also has a comment that spans\nmultiple lines",
55
"properties": {

test/programs/enums-compiled-compute/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"enum": [
44
1,
55
2,

test/programs/enums-mixed/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"Enum": {
55
"enum": [

test/programs/enums-number-initialized/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"enum": [
44
1,
55
10,

test/programs/enums-number/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"Enum": {
55
"enum": [

test/programs/enums-string/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"Enum": {
55
"enum": [

test/programs/enums-value-in-interface/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"A.B": {
55
"enum": [

test/programs/extra-properties/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"additionalProperties": {
44
"type": [
55
"string",

test/programs/force-type-imported/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"Widget": {
55
"type": "number"

test/programs/force-type/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"Widget": {
55
"type": "number"

test/programs/generate-all-types/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"MyEnum": {
55
"enum": [

test/programs/generic-anonymous/schema.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
4-
"MyGeneric<number, string>": {
4+
"MyGeneric<number,string>": {
55
"properties": {
66
"a": {
77
"type": "number"
@@ -16,7 +16,7 @@
1616
],
1717
"type": "object"
1818
},
19-
"MyGeneric<string, number>": {
19+
"MyGeneric<string,number>": {
2020
"properties": {
2121
"a": {
2222
"type": "string"
@@ -34,10 +34,10 @@
3434
},
3535
"properties": {
3636
"value1": {
37-
"$ref": "#/definitions/MyGeneric<string, number>"
37+
"$ref": "#/definitions/MyGeneric<string,number>"
3838
},
3939
"value2": {
40-
"$ref": "#/definitions/MyGeneric<number, string>"
40+
"$ref": "#/definitions/MyGeneric<number,string>"
4141
}
4242
},
4343
"required": [

test/programs/generic-arrays/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"properties": {
44
"numberArray": {
55
"items": {

test/programs/generic-hell/schema.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"GenericA<\"alias\">": {
55
"properties": {
@@ -90,7 +90,7 @@
9090
],
9191
"type": "object"
9292
},
93-
"SomeGeneric<\"alias\", \"alias\">": {
93+
"SomeGeneric<\"alias\",\"alias\">": {
9494
"properties": {
9595
"a": {
9696
"enum": [
@@ -119,7 +119,7 @@
119119
],
120120
"type": "object"
121121
},
122-
"SomeGeneric<1, 2>": {
122+
"SomeGeneric<1,2>": {
123123
"properties": {
124124
"a": {
125125
"enum": [
@@ -157,10 +157,10 @@
157157
"$ref": "#/definitions/GenericC<GenericC<GenericA<string>>>"
158158
},
159159
"someAlias": {
160-
"$ref": "#/definitions/SomeGeneric<\"alias\", \"alias\">"
160+
"$ref": "#/definitions/SomeGeneric<\"alias\",\"alias\">"
161161
},
162162
"someGeneric": {
163-
"$ref": "#/definitions/SomeGeneric<1, 2>"
163+
"$ref": "#/definitions/SomeGeneric<1,2>"
164164
}
165165
},
166166
"required": [

test/programs/generic-multiargs/schema.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
4-
"MyGeneric<number, string>": {
4+
"MyGeneric<number,string>": {
55
"properties": {
66
"a": {
77
"type": "number"
@@ -16,7 +16,7 @@
1616
],
1717
"type": "object"
1818
},
19-
"MyGeneric<string, number>": {
19+
"MyGeneric<string,number>": {
2020
"properties": {
2121
"a": {
2222
"type": "string"
@@ -34,10 +34,10 @@
3434
},
3535
"properties": {
3636
"value1": {
37-
"$ref": "#/definitions/MyGeneric<string, number>"
37+
"$ref": "#/definitions/MyGeneric<string,number>"
3838
},
3939
"value2": {
40-
"$ref": "#/definitions/MyGeneric<number, string>"
40+
"$ref": "#/definitions/MyGeneric<number,string>"
4141
}
4242
},
4343
"required": [

test/programs/generic-multiple/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"MyGeneric<number>": {
55
"properties": {

test/programs/generic-recursive/schema.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
22
"$ref": "#/definitions/MyObject",
3-
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"$schema": "http://json-schema.org/draft-06/schema#",
44
"definitions": {
5-
"MyGeneric<number, string>": {
5+
"MyGeneric<number,string>": {
66
"properties": {
77
"field": {
8-
"$ref": "#/definitions/MyGeneric<string, number>"
8+
"$ref": "#/definitions/MyGeneric<string,number>"
99
}
1010
},
1111
"required": [
1212
"field"
1313
],
1414
"type": "object"
1515
},
16-
"MyGeneric<string, number>": {
16+
"MyGeneric<string,number>": {
1717
"properties": {
1818
"field": {
19-
"$ref": "#/definitions/MyGeneric<number, string>"
19+
"$ref": "#/definitions/MyGeneric<number,string>"
2020
}
2121
},
2222
"required": [
@@ -27,7 +27,7 @@
2727
"MyObject": {
2828
"properties": {
2929
"value": {
30-
"$ref": "#/definitions/MyGeneric<string, number>"
30+
"$ref": "#/definitions/MyGeneric<string,number>"
3131
}
3232
},
3333
"required": [

test/programs/generic-simple/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"MyGeneric<number>": {
55
"properties": {

test/programs/ignored-required/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"properties": {
44
"required": {
55
"type": "boolean"

test/programs/imports/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"MyInterface": {
55
"properties": {

test/programs/interface-extends/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"properties": {
44
"propA": {
55
"type": "number"

test/programs/interface-extra-props/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"MyObject": {
55
"type": "object",

test/programs/interface-multi/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"definitions": {
44
"MySubObject": {
55
"properties": {

test/programs/interface-recursion/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$ref": "#/definitions/MyObject",
3-
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"$schema": "http://json-schema.org/draft-06/schema#",
44
"definitions": {
55
"MyObject": {
66
"properties": {

test/programs/interface-single/schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
2+
"$schema": "http://json-schema.org/draft-06/schema#",
33
"properties": {
44
"propA": {
55
"type": "number"

0 commit comments

Comments
 (0)