Skip to content

Commit

Permalink
turn on "noExtraProps" flag in auto test (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
netanel-mce authored Aug 20, 2023
1 parent f4600cf commit 3662786
Show file tree
Hide file tree
Showing 90 changed files with 156 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1901,7 +1901,7 @@ interface ChildFoo {
}

interface Foo {
readonly childFoos: Foo & ChildFoo;
readonly childFoos: Foo | ChildFoo;
}
```

Expand Down
1 change: 1 addition & 0 deletions test/programs/abstract-class/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"propA": {
"type": "number"
Expand Down
1 change: 1 addition & 0 deletions test/programs/abstract-extends/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"propA": {
"type": "number"
Expand Down
1 change: 1 addition & 0 deletions test/programs/annotation-default/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"varBoolean": {
"default": true,
Expand Down
2 changes: 2 additions & 0 deletions test/programs/annotation-id/schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"MySubObject": {
"$id": "filled#",
"type": "object",
"additionalProperties": false,
"properties": {
"a": { "type": "boolean" }
},
Expand Down
1 change: 1 addition & 0 deletions test/programs/annotation-items/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"a": {
"items": {
Expand Down
2 changes: 2 additions & 0 deletions test/programs/annotation-ref/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"MySubObject": {
"additionalProperties": false,
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"externalRef": {
"$ref": "http://my-schema.org"
Expand Down
4 changes: 4 additions & 0 deletions test/programs/annotation-required/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"MyDefaultObject": {
"additionalProperties": false,
"properties": {
"age": {
"type": "number"
Expand All @@ -17,6 +19,7 @@
"type": "object"
},
"MySubObject": {
"additionalProperties": false,
"properties": {
"bool": {
"type": "boolean"
Expand Down Expand Up @@ -46,6 +49,7 @@
"type": "object"
},
"MySubObject2": {
"additionalProperties": false,
"properties": {
"bool": {
"type": "boolean"
Expand Down
3 changes: 3 additions & 0 deletions test/programs/annotation-title/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"AnotherSubObject": {
"additionalProperties": false,
"properties": {
"b": {
"type": "boolean"
Expand All @@ -11,6 +13,7 @@
"type": "object"
},
"MySubObject": {
"additionalProperties": false,
"title": "filled#",
"type": "object",
"properties": {
Expand Down
1 change: 1 addition & 0 deletions test/programs/annotation-tjs/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"dateTime": {
"format": "date-time",
Expand Down
1 change: 1 addition & 0 deletions test/programs/any-unknown/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"type": "object",
"additionalProperties": false,
"properties": {
"a": {},
"b": {}
Expand Down
2 changes: 2 additions & 0 deletions test/programs/argument-id/schema.MyObject.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"$id": "someSchemaId",
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"ReferenceType": {
"additionalProperties": false,
"properties": {
"reference": {
"const": true,
Expand Down
1 change: 1 addition & 0 deletions test/programs/array-and-description/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
Expand Down
2 changes: 2 additions & 0 deletions test/programs/builtin-names/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"Ext.Array": {
"additionalProperties": false,
"type": "object"
}
},
Expand Down
1 change: 1 addition & 0 deletions test/programs/class-extends/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"propA": {
"type": "number"
Expand Down
1 change: 1 addition & 0 deletions test/programs/class-single/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"propA": {
"type": "number"
Expand Down
1 change: 1 addition & 0 deletions test/programs/comments-from-lib/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"description": "Use this comment",
"additionalProperties": false,
"type": "object",
"properties": {
"prop1": {
Expand Down
2 changes: 2 additions & 0 deletions test/programs/comments-imports/schema.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"Color": {
"description": "Description of Color.",
"pattern": "^[0-9a-f]{6}$",
"type": "string"
},
"Text": {
"additionalProperties": false,
"description": "Description of Text interface.",
"properties": {
"color": {
Expand Down
1 change: 1 addition & 0 deletions test/programs/comments-inline-tags/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"description": "This is MyObject. It extends {@link MyOtherObject} and {@link SomeOtherObject}.",
"properties": {
"prop1": {
Expand Down
1 change: 1 addition & 0 deletions test/programs/comments-override/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"MySubObject": {
"additionalProperties": true,
Expand Down
1 change: 1 addition & 0 deletions test/programs/comments/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"type": "array"
},
"rotation": {
"additionalProperties": false,
"description": "Description of rotation, a field with an anonymous type",
"properties": {
"yaw": {
Expand Down
1 change: 1 addition & 0 deletions test/programs/const-keyword/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"value": {
"const": "value",
Expand Down
2 changes: 2 additions & 0 deletions test/programs/custom-dates/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"foo.Date": {
"additionalProperties": false,
"properties": {
"day": {
"type": "number"
Expand Down
1 change: 1 addition & 0 deletions test/programs/dates/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"var1": {
"format": "date-time",
Expand Down
1 change: 1 addition & 0 deletions test/programs/default-properties/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"Foo": {
"anyOf": [
Expand Down
1 change: 1 addition & 0 deletions test/programs/enums-mixed/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"Enum": {
"enum": [
Expand Down
1 change: 1 addition & 0 deletions test/programs/enums-number/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"Enum": {
"enum": [
Expand Down
1 change: 1 addition & 0 deletions test/programs/enums-string/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"Enum": {
"enum": [
Expand Down
1 change: 1 addition & 0 deletions test/programs/enums-value-in-interface/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"A.B": {
"const": 0,
Expand Down
1 change: 1 addition & 0 deletions test/programs/force-type-imported/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"Widget": {
"type": "number"
Expand Down
1 change: 1 addition & 0 deletions test/programs/force-type/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"Widget": {
"type": "number"
Expand Down
2 changes: 2 additions & 0 deletions test/programs/generate-all-types/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"type": "number"
},
"MyInterface": {
"additionalProperties": false,
"type": "object"
},
"MyObject": {
"additionalProperties": false,
"type": "object"
}
}
Expand Down
3 changes: 3 additions & 0 deletions test/programs/generic-anonymous/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"MyGeneric<number,string>": {
"additionalProperties": false,
"properties": {
"a": {
"type": "number"
Expand All @@ -17,6 +19,7 @@
"type": "object"
},
"MyGeneric<string,number>": {
"additionalProperties": false,
"properties": {
"a": {
"type": "string"
Expand Down
1 change: 1 addition & 0 deletions test/programs/generic-arrays/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"numberArray": {
"items": {
Expand Down
3 changes: 3 additions & 0 deletions test/programs/generic-multiargs/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"MyGeneric<number,string>": {
"additionalProperties": false,
"properties": {
"a": {
"type": "number"
Expand All @@ -17,6 +19,7 @@
"type": "object"
},
"MyGeneric<string,number>": {
"additionalProperties": false,
"properties": {
"a": {
"type": "string"
Expand Down
3 changes: 3 additions & 0 deletions test/programs/generic-multiple/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"MyGeneric<number>": {
"additionalProperties": false,
"properties": {
"field": {
"type": "number"
Expand All @@ -13,6 +15,7 @@
"type": "object"
},
"MyGeneric<string>": {
"additionalProperties": false,
"properties": {
"field": {
"type": "string"
Expand Down
3 changes: 3 additions & 0 deletions test/programs/generic-recursive/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"MyGeneric<number,string>": {
"additionalProperties": false,
"properties": {
"field": {
"$ref": "#/definitions/MyGeneric<string,number>"
Expand All @@ -14,6 +15,7 @@
"type": "object"
},
"MyGeneric<string,number>": {
"additionalProperties": false,
"properties": {
"field": {
"$ref": "#/definitions/MyGeneric<number,string>"
Expand All @@ -25,6 +27,7 @@
"type": "object"
},
"MyObject": {
"additionalProperties": false,
"properties": {
"value": {
"$ref": "#/definitions/MyGeneric<string,number>"
Expand Down
2 changes: 2 additions & 0 deletions test/programs/generic-simple/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"MyGeneric<number>": {
"additionalProperties": false,
"properties": {
"field": {
"type": "number"
Expand Down
1 change: 1 addition & 0 deletions test/programs/ignored-required/schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"required": {
"type": "boolean"
Expand Down
Loading

0 comments on commit 3662786

Please sign in to comment.