@access.public
    def describeResource(self, resource, params):
        if resource not in docs.routes:
            raise RestException('Invalid resource: %s' % resource)
        return {
            'apiVersion': API_VERSION,
            'swaggerVersion': SWAGGER_VERSION,
            'basePath': getApiUrl(),
            'models': dict(docs.models[resource], **docs.models[None]),
            'apis': [{
                'path': route,
                'operations': sorted(
                    op, key=functools.cmp_to_key(self._compareOperations))
                } for route, op in sorted(
                    six.viewitems(docs.routes[resource]),
                    key=functools.cmp_to_key(self._compareRoutes))
            ]
        }
dataset/ETHPy150Open girder/girder/girder/api/describe.py/Describe.describeResource/original