{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Canada provincial postal abbreviations",
    "description": "Postal abbreviations for provinces and territories of Canada",
    "id": "http://localhost:8081/schema/postCanadaCommon_schema.json",
    "definitions": {
        "CAN_province": {
            "type": "string",
            "enum": [
                "AB",
                "BC",
                "MB",
                "NB",
                "NL",
                "NS",
                "NT",
                "NU",
                "ON",
                "PE",
                "QC",
                "SK",
                "YT"
            ]
        },
        "CAN_postalCode": {
            "type": "string",
            "pattern": "^[A-Z][0-9][A-Z]( )?[0-9][A-Z][0-9]$"
        }
    },
    "properties": {
        "CAN_province": {
            "$ref": "#/definitions/CAN_province"
        },
        "CAN_postalCode": {
            "$ref": "#/definitions/CAN_postalCode"
        }
    },
    "required": [
        "CAN_province",
        "CAN_postalCode"
    ]
}