30 lines
1.1 KiB
JSON
30 lines
1.1 KiB
JSON
|
|
{
|
||
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
|
|
"$id": "https://coulomb.social/resource-control/financial-entity-register.schema.json",
|
||
|
|
"title": "Financial entity register v0.1",
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": ["schema_version", "terms_version", "entities"],
|
||
|
|
"properties": {
|
||
|
|
"schema_version": {"const": "0.1"},
|
||
|
|
"terms_version": {"type": "string", "minLength": 1},
|
||
|
|
"entities": {
|
||
|
|
"type": "array",
|
||
|
|
"minItems": 1,
|
||
|
|
"items": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": ["id", "display_name", "role", "credit_limit_eur", "account_ref", "status"],
|
||
|
|
"properties": {
|
||
|
|
"id": {"type": "string", "pattern": "^entity:[a-z0-9]+$"},
|
||
|
|
"display_name": {"type": "string", "minLength": 1},
|
||
|
|
"role": {"enum": ["umbrella", "provider", "consumer"]},
|
||
|
|
"credit_limit_eur": {"type": ["string", "null"], "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$"},
|
||
|
|
"account_ref": {"type": ["string", "null"]},
|
||
|
|
"status": {"enum": ["active", "suspended", "retired"]}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|