JAL-1759 merge from develop
[jalview.git] / examples / biojson-doc / tests / address.json
diff --git a/examples/biojson-doc/tests/address.json b/examples/biojson-doc/tests/address.json
new file mode 100755 (executable)
index 0000000..278728a
--- /dev/null
@@ -0,0 +1,33 @@
+[
+    {
+        "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"]
+                        }
+                    ]
+                }
+            }
+        }
+    }]