summary refs log tree commit diff
path: root/t/specs
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-10-14 14:06:28 +0200
committerfranck cuny <franck@lumberjaph.net>2010-10-14 14:06:28 +0200
commitdeeffa80a0be252dd5cce835a17da58f1324834d (patch)
treeb759277425f780aff66f0995e9d0deb50057067c /t/specs
parentuse Scalar::Utils to check if self is blessed (diff)
downloadnet-http-spore-deeffa80a0be252dd5cce835a17da58f1324834d.tar.gz
new spec
Diffstat (limited to 't/specs')
-rw-r--r--t/specs/couchdb.json105
1 files changed, 60 insertions, 45 deletions
diff --git a/t/specs/couchdb.json b/t/specs/couchdb.json
index 21cd5a1..1aa293c 100644
--- a/t/specs/couchdb.json
+++ b/t/specs/couchdb.json
@@ -1,69 +1,81 @@
 {
-   "version" : "0.1",
+   "version" : "0.2",
    "methods" : {
       "create_document_without_id" : {
-         "required" : [
-            "database"
-         ],
+         "params" : {
+            "required" : [
+               "database"
+            ]
+         },
          "path" : "/:database",
          "method" : "POST"
       },
       "get_all_documents" : {
-         "params" : [
-            "descending",
-            "startkey",
-            "endkey",
-            "limit",
-            "include_docs"
-         ],
-         "required" : [
-            "database"
-         ],
+         "params" : {
+            "required" : [
+               "database"
+            ],
+            "optional" : [
+               "descending",
+               "startkey",
+               "endkey",
+               "limit",
+               "include_docs"
+            ]
+         },
+         "authentication": true,
          "path" : "/:database/_all_docs",
-         "method" : "GET",
-         "authentication": 1
+         "method" : "GET"
       },
       "create_document_with_id" : {
-         "required" : [
-            "database",
-            "doc_id"
-         ],
+         "params" : {
+            "required" : [
+               "database",
+               "doc_id"
+            ]
+         },
          "path" : "/:database/:doc_id",
          "method" : "POST"
       },
       "get_document" : {
-         "params" : [
-            "rev",
-            "revs"
-         ],
-         "required" : [
-            "database",
-            "doc_id"
-         ],
+         "params" : {
+            "required" : [
+               "database",
+               "doc_id"
+            ],
+            "optional" : [
+               "rev",
+               "revs"
+            ]
+         },
          "path" : "/:database/:doc_id",
          "method" : "GET"
       },
       "get_all_documents_by_seq" : {
-         "params" : [
-            "startkey",
-            "endkey",
-            "limit",
-            "include_docs"
-         ],
-         "required" : [
-            "database"
-         ],
+         "params" : {
+            "required" : [
+               "database"
+            ],
+            "optional" : [
+               "startkey",
+               "endkey",
+               "limit",
+               "include_docs"
+            ]
+         },
          "path" : "/:database/_all_docs_by_seq",
          "method" : "GET"
       },
       "delete_document" : {
-         "params" : [
-            "rev"
-         ],
-         "required" : [
-            "database",
-            "doc_id"
-         ],
+         "params" : {
+            "required" : [
+               "database",
+               "doc_id"
+            ],
+            "optional" : [
+               "rev"
+            ]
+         },
          "path" : "/:database/:doc_id",
          "method" : "DELETE"
       }
@@ -74,5 +86,8 @@
    "name" : "CouchDB",
    "author" : [
       "franck cuny <franck@lumberjaph.net>"
-   ]
+   ],
+   "meta" : {
+      "documentation" : "http://wiki.apache.org/couchdb/HTTP_Document_API"
+   }
 }