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