Isto Intents common definitions
$id: https://istointents.org/schemas/0.1/common.schema.json
Definitions#
| name | type | description |
|---|
version | "0.1" | |
id | string (uri) | |
timestamp | string (date-time) | |
date | string (date) | |
country | string (pattern ^[A-Z]{2}$) | |
region | string (pattern ^[A-Z]{2}-[A-Z0-9]{1,3}$) | |
currency | string (pattern ^[A-Z]{3}$) | |
language | string (pattern ^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$) | |
category | anyOf: "vehicle" | "property", string (uri, pattern ^https?://) | |
amount | integer (≥ 0) | |
party | object | |
geo | object | |
area | oneOf: object, object, object | |
sealed | object | A sealed value: opaque to everyone but the holder that sealed it (spec §4.2). Never a plain number. |
extensions | object | |
party
| field | type | required | description |
|---|
id | id | yes | |
name | string | | |
geo
| field | type | required | description |
|---|
lat | number (≥ -90, ≤ 90) | yes | |
lon | number (≥ -180, ≤ 180) | yes | |
sealed
| field | type | required | description |
|---|
scheme | string | yes | holder-defined identifier of the sealing scheme |
ciphertext | string | yes | |
keyId | string | yes | |
Full schema#
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://istointents.org/schemas/0.1/common.schema.json",
"title": "Isto Intents common definitions",
"$defs": {
"version": {
"const": "0.1"
},
"id": {
"type": "string",
"format": "uri",
"minLength": 3
},
"timestamp": {
"type": "string",
"format": "date-time"
},
"date": {
"type": "string",
"format": "date"
},
"country": {
"type": "string",
"pattern": "^[A-Z]{2}$"
},
"region": {
"type": "string",
"pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"language": {
"type": "string",
"pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"
},
"category": {
"anyOf": [
{
"enum": [
"vehicle",
"property"
]
},
{
"type": "string",
"format": "uri",
"pattern": "^https?://"
}
]
},
"amount": {
"type": "integer",
"minimum": 0
},
"party": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"$ref": "#/$defs/id"
},
"name": {
"type": "string"
}
}
},
"geo": {
"type": "object",
"required": [
"lat",
"lon"
],
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"lon": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"additionalProperties": false
},
"area": {
"oneOf": [
{
"type": "object",
"required": [
"center",
"radiusKm"
],
"properties": {
"center": {
"$ref": "#/$defs/geo"
},
"radiusKm": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"regions"
],
"properties": {
"regions": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/region"
}
}
},
"additionalProperties": false
},
{
"description": "Whole LAU 1 units (administrative districts, e.g. SK0203, CZ0642).",
"type": "object",
"required": [
"lau"
],
"properties": {
"lau": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"pattern": "^[A-Z]{2}[0-9A-Z]{2,8}$"
}
}
},
"additionalProperties": false
}
]
},
"sealed": {
"description": "A sealed value: opaque to everyone but the holder that sealed it (spec §4.2). Never a plain number.",
"type": "object",
"required": [
"scheme",
"ciphertext",
"keyId"
],
"properties": {
"scheme": {
"type": "string",
"minLength": 1,
"description": "holder-defined identifier of the sealing scheme"
},
"ciphertext": {
"type": "string",
"minLength": 16
},
"keyId": {
"type": "string"
}
},
"additionalProperties": false
},
"extensions": {
"type": "object",
"propertyNames": {
"anyOf": [
{
"pattern": "^x-"
},
{
"format": "uri"
}
]
}
}
}
}