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