Commits

chuckharmston  committed 4a88b0a

Allow jsonparameter to be typed

  • Participants
  • Parent commits a00876a

Comments (0)

Files changed (1)

File 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."""
 
                      names=('queryparameter', 'queryparam', 'qparam', 'query')),
         GroupedField('formparameter', label='Form Parameters',
                      names=('formparameter', 'formparam', 'fparam', 'form')),
-        GroupedField('jsonparameter', label='Json Parameters',
-                     names=('jsonparameter', 'jsonparam', 'json')),
+        GroupedTypedField('jsonparameter', label='Json Parameters',
+                          names=('jsonparameter', 'jsonparam', 'json'),
+                          typerolename='obj', typenames=('paramtype', 'type')),
         GroupedField('requestheader', label='Request Headers',
                      rolename='mailheader',
                      names=('reqheader', 'requestheader')),