In FastAPI, a path operation is a route — a function decorated with an HTTP method decorator (@app.get, @app.post, etc.) that handles requests to a path. The function's return value is automatically serialized to JSON.
Defining routes for each HTTP method
fastapi FastAPI
app = FastAPI()
():
[{: }, {: }]
():
{: item_id}
():
item
():
{: item_id}
