From e31d39d3350c4e9aa7b08df392f8254cf731f22a Mon Sep 17 00:00:00 2001 From: "luca.gobbi" Date: Tue, 10 Dec 2024 08:52:20 +0100 Subject: [PATCH] labor limae --- mkdocs/production/network/custom-endpoints.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mkdocs/production/network/custom-endpoints.md b/mkdocs/production/network/custom-endpoints.md index d5f3ec1e9..7bbce79d4 100644 --- a/mkdocs/production/network/custom-endpoints.md +++ b/mkdocs/production/network/custom-endpoints.md @@ -25,6 +25,8 @@ curl http://localhost:1865/custom/hello !!! note FastAPI under the hood Since there's FastAPI under the hood, you can use every FastAPI operation parameters like `path`, `tags`, `response_model`, etc. +Here's a more complex example: + ```python from cat.mad_hatter.decorators import endpoint @@ -47,7 +49,10 @@ def custom_ingestion(document: CustomDocument, stray=Depends(HTTPAuth(AuthResour ``` -## Further Examples +Once you activate your plugin the Cheshire Cat will add the custom endpoints to the FastAPI routes and will clear the +`/docs` cache to reflect the new endpoints and their OpenAPI documentation. + +## Available Decorators You have three different decorators available to declare custom endpoints: