def depart_DataStructures(self, node):
        for desc in node.traverse(addnodes.desc):
            name = desc[0]['names'][-1]
            self.env.domaindata['js']['objects'][name] = (self.env.docname, 'data')

        node.insert(0, nodes.title(text='Data Structures'))
        replace_nodeclass(node, nodes.section)
    def depart_Resource(self, node):
        if node['identifier']:
            node.insert(0, nodes.title(text=node['identifier']))
        else:
            node.insert(0, nodes.title(text=node['uri']))

        replace_nodeclass(node, nodes.section)
    def depart_Response(self, node):
        title = nodes.paragraph()
        title += nodes.strong(text='Response')
        title += nodes.Text(' ')
        title += nodes.literal(text=node['status_code'])
        node.insert(0, title)

        replace_nodeclass(node, nodes.container)
    def depart_Request(self, node):
        title = nodes.paragraph()
        title += nodes.strong(text='Request')
        if node['identifier']:
            title += nodes.Text(' ' + node['identifier'])
        node.insert(0, title)

        replace_nodeclass(node, nodes.container)
    def depart_Schema(self, node):
        title = nodes.paragraph(text='Schema:')
        node.insert(0, title)

        replace_nodeclass(node, nodes.container)
 def depart_Model(self, node):
     model = replace_nodeclass(node, nodes.section)
     model['ids'].append(nodes.make_id(model[0].astext()))
    def depart_ResourceGroup(self, node):
        title = nodes.title(text=node['identifier'])
        node.insert(0, title)

        replace_nodeclass(node, nodes.section)
 def depart_Headers(self, node):
     node.append(nodes.paragraph(text='Headers:'))
     node.append(nodes.literal_block(text="\n".join(sorted(node.headers))))
     replace_nodeclass(node, nodes.container)
    def depart_Parameters(self, node):
        title = nodes.paragraph(text='Parameters:')
        node.insert(0, title)

        replace_nodeclass(node, nodes.container)