def build_swagger_12_resource_listing(resource_listing):
    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')
:param resource_listing: JSON representing a Swagger 1.2 resource listing
dataset/ETHPy150Open striglia/pyramid_swagger/pyramid_swagger/api.py/build_swagger_12_resource_listing