apxtrib/adminapi/www/adminapx/schema/towns.json
2023-05-31 15:19:21 +02:00

38 lines
970 B
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "schema/towns",
"title": "Town",
"description": "A town belonging to a nation from apXtrib world",
"type": "object",
"properties": {
"townId": {
"type": "string",
"pattern": "^[a-z0-9]*$"
},
"nationId": {
"type": "string",
"$apxenumkey": "socialworld/objects/nations/searchindex/nations_uuid_uuid.json"
},
"mayorId": {
"type": "string",
"$apxenumkey": "socialworld/objects/nations/searchindex/nations_uuid_uuid.json"
},
"status": {
"default": "active",
"type": "string",
"enum":["chain","unchain","tochain"]
}
},
"dns": {
"type": "array"
}
},
"required": ["townId", "status", "nationId", "dns"],
"apxprimarykey": "townId",
"apxsearchindex": [
{ "key": "status", "value": "townId" },
{ "key": "nationId", "value": "townId" },
{ "key": "townId", "value": [] }
]
}