{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "address": {
            "type": "object",
            "properties": {
                "street_address": {
                    "type": "string"
                }
            }
        }
    },
    "type": "object",
    "properties": {
        "billing_address": {
            "$ref": "#/definitions/address"
        },
        "shipping_address": {
            "allOf": [
                {
                    "$ref": "#/definitions/address"
                },
                {
                    "properties": {
                        "type": {
                            "enum": [
                                "residential",
                                "business"
                            ]
                        }
                    }
                }
            ]
        }
    }
}