You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2013/08/21 18:37:45 UTC
[18/50] git commit: updated
refs/heads/1781-reorganize-and-improve-docs to 360107b
Improve HTTP domain for local needs.
Ok, now we're going to be incompatible with mainstream httpdomain ext.
Added 4 new fields to mark wherever request or response json data is
an object or an array of objects. Default "Json Parameters" is not
enough.
Shorter markup syntax: things started with < are for requests and
with > for responses e.g. :>header ETag: :<json foo bar: etc.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/e3f4ee70
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/e3f4ee70
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/e3f4ee70
Branch: refs/heads/1781-reorganize-and-improve-docs
Commit: e3f4ee702ead6023deba4a4963415d26d95a4d6f
Parents: db1d458
Author: Alexander Shorin <kx...@apache.org>
Authored: Sun Aug 11 23:22:59 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Wed Aug 21 20:27:19 2013 +0400
----------------------------------------------------------------------
share/doc/ext/httpdomain.py | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/e3f4ee70/share/doc/ext/httpdomain.py
----------------------------------------------------------------------
diff --git a/share/doc/ext/httpdomain.py b/share/doc/ext/httpdomain.py
index 303e771..808a391 100644
--- a/share/doc/ext/httpdomain.py
+++ b/share/doc/ext/httpdomain.py
@@ -207,9 +207,24 @@ class HTTPResource(ObjectDescription):
TypedField('parameter', label='Parameters',
names=('param', 'parameter', 'arg', 'argument'),
typerolename='obj', typenames=('paramtype', 'type')),
- TypedField('jsonparameter', label='Json Parameters',
+ TypedField('jsonobject', label='JSON Object',
names=('jsonparameter', 'jsonparam', 'json'),
typerolename='obj', typenames=('jsonparamtype', 'jsontype')),
+ TypedField('requestjsonobject', label='Request JSON Object',
+ names=('reqjsonobj', 'reqjson', '<jsonobj', '<json'),
+ typerolename='obj', typenames=('reqjsontype', '<jsontype')),
+ TypedField('requestjsonarray', label='Request JSON Array of Objects',
+ names=('reqjsonarr', '<jsonarr'),
+ typerolename='obj',
+ typenames=('reqjsonarrtype', '<jsonarrtype')),
+ TypedField('responsejsonobject', label='Response JSON Object',
+ names=('resjsonobj', 'resjson', '>jsonobj', '>json'),
+ typerolename='obj', typenames=('resjsontype', '>jsontype')),
+
+ TypedField('responsejsonarray', label='Response JSON Array of Objects',
+ names=('resjsonarr', '>jsonarr'),
+ typerolename='obj',
+ typenames=('resjsonarrtype', '>jsonarrtype')),
TypedField('queryparameter', label='Query Parameters',
names=('queryparameter', 'queryparam', 'qparam', 'query'),
typerolename='obj', typenames=('queryparamtype',
@@ -219,10 +234,10 @@ class HTTPResource(ObjectDescription):
names=('formparameter', 'formparam', 'fparam', 'form')),
GroupedField('requestheader', label='Request Headers',
rolename='mailheader',
- names=('reqheader', 'requestheader')),
+ names=('<header', 'reqheader', 'requestheader')),
GroupedField('responseheader', label='Response Headers',
rolename='mailheader',
- names=('resheader', 'responseheader')),
+ names=('>header', 'resheader', 'responseheader')),
GroupedField('statuscode', label='Status Codes',
rolename='statuscode',
names=('statuscode', 'status', 'code'))