from fastapi import APIRouter, Depends, HTTPException router = APIRouter() @router.put("/new-endpoint") async def new_endpoint_handler(text: str): """Echo the value of a text parameter""" return { "message": "Text echoed successfully", "data": { "text": text } }