JAL-1641 biojson documentation with docson
[jalview.git] / examples / biojson-doc / tests / minItems.json
diff --git a/examples/biojson-doc/tests/minItems.json b/examples/biojson-doc/tests/minItems.json
new file mode 100755 (executable)
index 0000000..ed51188
--- /dev/null
@@ -0,0 +1,28 @@
+[
+    {
+        "description": "minItems validation",
+        "schema": {"minItems": 1},
+        "tests": [
+            {
+                "description": "longer is valid",
+                "data": [1, 2],
+                "valid": true
+            },
+            {
+                "description": "exact length is valid",
+                "data": [1],
+                "valid": true
+            },
+            {
+                "description": "too short is invalid",
+                "data": [],
+                "valid": false
+            },
+            {
+                "description": "ignores non-arrays",
+                "data": "",
+                "valid": true
+            }
+        ]
+    }
+]