From a058881d6f5a556a7046c0aef62b8f92286c2e73 Mon Sep 17 00:00:00 2001 From: Alvaro Cabrera <pateketrueke@gmail.com> Date: Wed, 26 Nov 2014 18:17:43 -0600 Subject: [PATCH] Keyword testing --- spec/core/keywords.json | 63 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 spec/core/keywords.json diff --git a/spec/core/keywords.json b/spec/core/keywords.json new file mode 100644 index 00000000..20763815 --- /dev/null +++ b/spec/core/keywords.json @@ -0,0 +1,63 @@ +[ + { + "description": "instance keywords", + "tests": [ + { + "description": "should handle array of types", + "schema": { + "type": ["string", "number"] + }, + "valid": true + }, + { + "description": "should handle enum values", + "schema": { + "enum": ["", [], {}, false, null, -1] + }, + "valid": true + }, + { + "description": "should handle allOf values", + "schema": { + "allOf": [ + { + "type": "string" + }, + { + "enum": ["a", "value"] + } + ] + }, + "valid": true + }, + { + "description": "should handle anyof values", + "schema": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "array" + } + ] + }, + "valid": true + }, + { + "description": "should handle oneOf values", + "schema": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "valid": true + } + ] + } +] -- GitLab