Country Risk Table
| Field | Value |
|---|---|
| Schema ID | https://github.com/ksuk/merlon/schemas/country_risk_v1.json |
| JSON Schema dialect | https://json-schema.org/draft/2020-12/schema |
| Type | object |
| Required top-level fields | schema_version, content_type, effective_date, default_score, countries |
Properties
| Name | Type | Required | Description |
|---|---|---|---|
schema_version | string | Yes | |
content_type | const | Yes | |
name | string | No | |
effective_date | string | Yes | |
default_score | integer | Yes | |
countries | object | Yes |
content_type
| Constraint | Value |
|---|---|
| Const | "country_risk_table" |
effective_date
| Constraint | Value |
|---|---|
| Format | date |
default_score
| Constraint | Value |
|---|---|
| Minimum | 1 |
| Maximum | 5 |
countries
| Constraint | Value |
|---|---|
| Property name pattern | ^[A-Z]{2}$ |
| Name | Type | Required | Description |
|---|---|---|---|
(any key) | object | — |
countries.*
| Name | Type | Required | Description |
|---|---|---|---|
score | integer | Yes | |
reason | string | No |
countries.*.score
| Constraint | Value |
|---|---|
| Minimum | 1 |
| Maximum | 5 |
Full schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/ksuk/merlon/schemas/country_risk_v1.json",
"title": "Country Risk Table",
"type": "object",
"required": [
"schema_version",
"content_type",
"effective_date",
"default_score",
"countries"
],
"properties": {
"schema_version": {
"type": "string"
},
"content_type": {
"type": "string",
"const": "country_risk_table"
},
"name": {
"type": "string"
},
"effective_date": {
"type": "string",
"format": "date"
},
"default_score": {
"type": "integer",
"minimum": 1,
"maximum": 5
},
"countries": {
"type": "object",
"additionalProperties": {
"type": "object",
"required": [
"score"
],
"properties": {
"score": {
"type": "integer",
"minimum": 1,
"maximum": 5
},
"reason": {
"type": "string"
}
}
},
"propertyNames": {
"pattern": "^[A-Z]{2}$"
}
}
}
}