Bundle shared domain contracts and validation
This commit is contained in:
51
internal/domaininput/resources/rpg/party/v0.2.0/schema.json
Normal file
51
internal/domaininput/resources/rpg/party/v0.2.0/schema.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://schemas.maximumdirect.net/rpg/party/v0.2.0/schema.json",
|
||||
"title": "MAXIMUMDIRECT RPG Party v1",
|
||||
"type": "object",
|
||||
"required": ["schema_version", "characters"],
|
||||
"properties": {
|
||||
"schema_version": {"const": "maximumdirect.rpg.party.v1"},
|
||||
"characters": {
|
||||
"type": "object",
|
||||
"propertyNames": {"minLength": 1},
|
||||
"additionalProperties": {"$ref": "#/$defs/rosterEntry"}
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"text": {"type": "string", "minLength": 1},
|
||||
"rosterEntry": {
|
||||
"type": "object",
|
||||
"required": ["character"],
|
||||
"properties": {
|
||||
"player": {
|
||||
"type": "object",
|
||||
"required": ["name"],
|
||||
"properties": {"name": {"$ref": "#/$defs/text"}}
|
||||
},
|
||||
"character": {
|
||||
"type": "object",
|
||||
"required": ["name"],
|
||||
"properties": {
|
||||
"name": {"$ref": "#/$defs/text"},
|
||||
"aliases": {
|
||||
"type": ["array", "null"],
|
||||
"items": {"$ref": "#/$defs/text"}
|
||||
},
|
||||
"classes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["name"],
|
||||
"properties": {
|
||||
"name": {"$ref": "#/$defs/text"},
|
||||
"level": {"type": "integer", "minimum": 1, "maximum": 9223372036854775807}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user