{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "line1": {
            "type": "string"
        },
        "city": {
            "type": "string"
        },
        "state": {
            "type": "string"
        },
        "zip": {
            "$ref": "#/definitions/US_zipCode"
        },
        "country": {
            "type": "string"
        }
    },
    "additionalProperties": false,
    "required": [
        "line1",
        "city",
        "state",
        "zip",
        "country"
    ],
    "definitions": {
        "US_zipCode": {
            "type": "string",
            "pattern": "^[0-9]{5}(-[0-9]{4})?$"
        }
    }
}