{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "description": "schema for a currency",
    "id": "https://raw.githubusercontent.com/eviratec/schema/master/v1/currency.json#",
    "properties": {
        "code": {
            "maxLength": 4,
            "type": "string"
        },
        "id": {
            "_format": "uuid",
            "type": "string"
        },
        "label": {
            "maxLength": 64,
            "type": "string"
        },
        "prefix": {
            "maxLength": 1,
            "type": "string"
        },
        "separator": {
            "properties": {
                "decimal": {
                    "maxLength": 1,
                    "minLength": 1,
                    "type": "string"
                },
                "thousands": {
                    "maxLength": 1,
                    "minLength": 1,
                    "type": "string"
                }
            },
            "required": [
                "thousands",
                "decimal"
            ],
            "type": "object"
        }
    },
    "required": [
        "id",
        "code",
        "label",
        "separator"
    ],
    "type": "object"
}