Add strict custom field registry
This commit is contained in:
57
specs/versions/0.1/gsp.fields.schema.json
Normal file
57
specs/versions/0.1/gsp.fields.schema.json
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://gsp.local/schema/gsp.fields.schema.json",
|
||||
"title": "GSP Fields",
|
||||
"description": "Game Specification Protocol custom field registry schema.",
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"required": ["gspFieldsVersion", "fields"],
|
||||
"properties": {
|
||||
"gspFieldsVersion": {
|
||||
"type": "string",
|
||||
"enum": ["0.1"]
|
||||
},
|
||||
"fields": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"required": ["type"],
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["string", "number", "integer", "boolean", "array", "object"]
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"allowed": {
|
||||
"type": "array"
|
||||
},
|
||||
"required": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"default": {},
|
||||
"scope": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"idPrefix": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user