summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-10-14 13:29:59 +0200
committerfranck cuny <franck@lumberjaph.net>2010-10-14 13:29:59 +0200
commita9cdd8827989fcaeb5c3d2e10ea3d644940d266a (patch)
tree7207acfb2e69b3a53e248331648e5f2f99fdd548
parentadded max_redirect and redirections in the env (diff)
downloadspore-specifications-a9cdd8827989fcaeb5c3d2e10ea3d644940d266a.tar.gz
add validation schema
-rw-r--r--spore_validation.rx58
1 files changed, 58 insertions, 0 deletions
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" }
+ }
+ }
+ }
+ }
+ }
+}