summary refs log tree commit diff
path: root/t/specs
diff options
context:
space:
mode:
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"
+   }
 }