def detail_route(methods=None, **kwargs):
    methods = ['get'] if (methods is None) else methods

    def decorator(func):
        func.bind_to_methods = methods
        func.detail = True
        func.kwargs = kwargs
        return func
    return decorator
validate and generate the skeleton of the document
dataset/ETHPy150Open tomchristie/django-rest-framework/rest_framework/decorators.py/detail_route--crossover with--dataset/ETHPy150Open namlook/mongokit/mongokit/schema_document.py/SchemaDocument.generate_skeleton