{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "description": "schema for a product price",
    "id": "https://raw.githubusercontent.com/eviratec/schema/master/v1/product/price.json#",
    "properties": {
        "amount": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "schema for a currency amount",
            "id": "https://raw.githubusercontent.com/eviratec/schema/master/v1/currency/amount.json#",
            "properties": {
                "currency": {
                    "$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"
                },
                "units": {
                    "minimum": 0,
                    "type": "number"
                }
            },
            "required": [
                "currency",
                "units"
            ],
            "type": "object"
        },
        "date_from": {
            "_format": "date-time",
            "type": "string"
        },
        "date_thru": {
            "_format": "date-time",
            "type": "string"
        },
        "id": {
            "_format": "uuid",
            "type": "string"
        },
        "is_public": {
            "type": "boolean",
            "value": false
        },
        "type": {
            "maxLength": 18,
            "type": "string"
        }
    },
    "required": [
        "id",
        "type",
        "amount",
        "is_public",
        "date_from",
        "date_thru"
    ],
    "type": "object"
}