docs: def build_swagger_12_resource_listing(resource_listing):
      """
      :param resource_listing: JSON representing a Swagger 1.2 resource listing
      :type resource_listing: dict
      :rtype: :class:`pyramid_swagger.model.PyramidEndpoint`
      """
      def view_for_resource_listing(request):
          # Thanks to the magic of closures, this means we gracefully return JSON
          # without file IO at request time.
          return resource_listing
  
      return PyramidEndpoint(
          path='',
          route_name='pyramid_swagger.swagger12.api_docs',
          view=view_for_resource_listing,
          renderer='json')