Skip to content

Commit

Permalink
Set additionalProperties/unevaluatedProperties: false in schema
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x committed Nov 26, 2024
1 parent 5775f02 commit 81a6b41
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$schema": "https://json-schema.org/draft-07/schema",
"type": "object",
"additionalProperties": false,
"definitions": {
"Name": {
"type": "string",
Expand Down Expand Up @@ -94,6 +95,7 @@
},
"Callback": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"$ref": "#/definitions/Name",
Expand Down Expand Up @@ -122,6 +124,7 @@
},
"ParameterType": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"$ref": "#/definitions/Name",
Expand All @@ -134,13 +137,9 @@
"$ref": "#/definitions/Type",
"description": "Parameter type"
},
"ownership": {
"type": "string",
"description": "Ownership of the value",
"enum": [
"with",
"without"
]
"passed_with_ownership": {
"type": "boolean",
"description": "Whether the value is passed with ownership or without ownership"
},
"pointer": {
"$ref": "#/definitions/Pointer",
Expand All @@ -156,7 +155,11 @@
"pattern": "^[a-z]+$"
},
"default": {
"type": [ "string", "number", "boolean" ],
"type": [
"string",
"number",
"boolean"
],
"description": "Default value assigned to this parameter when using initializer macro"
}
},
Expand All @@ -167,6 +170,7 @@
]
},
"FunctionParameterType": {
"unevaluatedProperties": false,
"allOf": [
{
"$ref": "#/definitions/ParameterType"
Expand All @@ -185,6 +189,7 @@
},
"Function": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"$ref": "#/definitions/Name",
Expand All @@ -195,6 +200,7 @@
},
"returns": {
"type": "object",
"additionalProperties": false,
"description": "Optional property, return type of the function",
"properties": {
"doc": {
Expand Down Expand Up @@ -254,6 +260,7 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"description": "An alias of a primitive type",
"properties": {
"name": {
Expand All @@ -277,6 +284,7 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"$ref": "#/definitions/Name",
Expand All @@ -301,6 +309,7 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"$ref": "#/definitions/Name",
Expand All @@ -323,6 +332,7 @@
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"$ref": "#/definitions/Name",
Expand Down Expand Up @@ -355,6 +365,7 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"$ref": "#/definitions/Name",
Expand All @@ -371,6 +382,7 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"$ref": "#/definitions/Name",
Expand Down Expand Up @@ -408,6 +420,7 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"$ref": "#/definitions/Name",
Expand Down Expand Up @@ -471,6 +484,7 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"$ref": "#/definitions/Name",
Expand Down

0 comments on commit 81a6b41

Please sign in to comment.