'Generate a `coreapi.Document` representing the API schema.'

def get_schema(self, request=None, public=False):

    if (self.endpoints is None):
        inspector = self.endpoint_inspector_cls(self.patterns, self.urlconf)
        self.endpoints = inspector.get_api_endpoints()
    links = self.get_links((None if public else request))
    if (not links):
        return None
    url = self.url
    if ((not url) and (request is not None)):
        url = request.build_absolute_uri()
    return coreapi.Document(title=self.title, description=self.description, url=url, content=links)
