From a9cdd8827989fcaeb5c3d2e10ea3d644940d266a Mon Sep 17 00:00:00 2001 From: franck cuny Date: Thu, 14 Oct 2010 13:29:59 +0200 Subject: add validation schema --- spore_validation.rx | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 spore_validation.rx diff --git a/spore_validation.rx b/spore_validation.rx new file mode 100644 index 0000000..0214d6d --- /dev/null +++ b/spore_validation.rx @@ -0,0 +1,58 @@ +{ + "type": "//rec", + "optional": { + "api_base_url": "//str", + "api_authentication": "//bool", + "version": "//str", + "author": { + "type" : "//arr", + "length" : { "min": 1 }, + "contents": { "type": "//str" } + }, + "api_format": { + "type" : "//arr", + "contents": { "type":"//str" } + }, + "meta": { + "type": "//map", + "values": { + "type": "//str" + } + } + }, + "required": { + "name": "//str", + "methods": { + "type": "//map", + "values": { + "type": "//rec", + "required": { + "method": "//str", + "path": "//str" + }, + "optional": { + "expected": { + "type" : "//arr", + "contents": { + "type": "//int" + } + }, + "params": { + "type": "//map", + "values": { + "type": "//arr", + "contents": {"type": "//str"} + } + }, + "description": "//str", + "authentication": "//bool", + "base_url": "//str", + "format": { + "type" : "//arr", + "contents": { "type":"//str" } + } + } + } + } + } +} -- cgit v1.2.3