Hong Minhee avatar Hong Minhee committed 22c7572

Changelog for pull request #31

Comments (0)

Files changed (2)

httpdomain/doc/index.rst

 
    .. versionadded:: 1.1.8
 
+   .. versionchanged:: 1.1.9
+
+      It can be typed e.g.:
+      
+      .. sourcecode:: rst
+         
+         :jsonparam string title: the post title
+         :jsonparam string body: the post body
+         :jsonparam boolean sticky: whether it's sticky or not
+
 ``requestheader``, ``reqheader``
    Description of request header field.
 
   See :mod:`sphinxcontrib.autohttp.bottle` module.
   [patch_ by Jameel Al-Aziz]
 - Added ``:reqheader:`` and ``:resheader:`` option flags.
+- ``:jsonparameter:`` can be typed.  [:pull:`31` by Chuck Harmston]
 
 .. _patch: https://github.com/jalaziz/sphinxcontrib-httpdomain
 

httpdomain/sphinxcontrib/httpdomain.py

 from sphinx.util.docfields import GroupedField, TypedField
 
 
-GroupedTypedField = type('GroupedTypedField', (TypedField, GroupedField), {})
-
-
 class DocRef(object):
     """Represents a link to an RFC which defines an HTTP method."""
 
         TypedField('parameter', label='Parameters',
                    names=('param', 'parameter', 'arg', 'argument'),
                    typerolename='obj', typenames=('paramtype', 'type')),
+        TypedField('jsonparameter', label='Json Parameters',
+                   names=('jsonparameter', 'jsonparam', 'json'),
+                   typerolename='obj', typenames=('jsonparamtype', 'jsontype')),
         GroupedField('queryparameter', label='Query Parameters',
                      names=('queryparameter', 'queryparam', 'qparam', 'query')),
         GroupedField('formparameter', label='Form Parameters',
                      names=('formparameter', 'formparam', 'fparam', 'form')),
-        GroupedTypedField('jsonparameter', label='Json Parameters',
-                          names=('jsonparameter', 'jsonparam', 'json'),
-                          typerolename='obj', typenames=('paramtype', 'type')),
         GroupedField('requestheader', label='Request Headers',
                      rolename='mailheader',
                      names=('reqheader', 'requestheader')),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.