Path Operation Configuration
Basic Configuration
Section titled “Basic Configuration”from justapi import JustAPIApp
app = JustAPIApp()
@app.get( "/items/{item_id}", summary="Get an item", description="Retrieve a single item by its ID.", tags=["items"], response_description="The item",)def get_item(item_id: int): return {"item_id": item_id}Tags group endpoints in the docs:
@app.get("/users/", tags=["users"])def list_users(): return []
@app.post("/items/", tags=["items"])def create_item(): return {}Deprecating Endpoints
Section titled “Deprecating Endpoints”@app.get("/old-endpoint", deprecated=True)def old_endpoint(): return {"message": "this endpoint is deprecated"}Controlling Doc Visibility
Section titled “Controlling Doc Visibility”@app.get("/internal", include_in_schema=False)def internal_only(): return {"secret": "data"}This hides the endpoint from OpenAPI documentation entirely.
See Also
Section titled “See Also”- Metadata & Docs URLs — app-level metadata
- OpenAPI Callbacks & Webhooks — advanced OpenAPI