async def METHOD_NAME(body: input_model, response: Response):
    req = DataRequest()
    if body.header is not None:
        req.header.request_id = body.header.request_id
    if body.parameters is not None:
        req.parameters = body.parameters
    req.header.exec_endpoint = endpoint_path
    data = body.data
    if isinstance(data, list):
        if not docarray_v2:
            req.data.docs = DocumentArray.from_pydantic_model(data)
        else:
            req.document_array_cls = DocList[input_doc_model]
            req.data.docs = DocList[input_doc_list_model](data)
    else:
        if not docarray_v2:
            req.data.docs = DocumentArray([Document.from_pydantic_model(data)])
        else:
            req.document_array_cls = DocList[input_doc_model]
            req.data.docs = DocList[input_doc_list_model]([data])
        if body.header is None:
            req.header.request_id = req.docs[0].id
    resp = await caller(req)
    status = resp.header.status
    if status.code == jina_pb2.StatusProto.ERROR:
        raise HTTPException(status_code=499, detail=status.description)
    else:
        if not docarray_v2:
            docs_response = resp.docs.to_dict()
        else:
            docs_response = resp.docs
        ret = output_model(data=docs_response, parameters=resp.parameters)
        return ret