From f60d86e91d5f138777a902ef29c08d34ba56fdff Mon Sep 17 00:00:00 2001 From: luxferre Date: Thu, 28 May 2026 16:03:33 +0100 Subject: [PATCH] docs: doc guidelines in router template --- src/_module_template/router.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/_module_template/router.py b/src/_module_template/router.py index d96d7ee..c81fc26 100644 --- a/src/_module_template/router.py +++ b/src/_module_template/router.py @@ -3,6 +3,19 @@ Router endpoints for the module Exports: - router: fastapi.APIRouter + +### Router Guidelines ### +- Add responses to decorators +- Add status_codes to decorators +- All endpoints should either return a response object or 204 +- Ensure response_model is declared in the decorator +- All query and path params should have validation and descriptions +- All endpoints should have a docstring (this is used in place of a description) +- All endpoints should have a summary +- All modules should have metadata in main.py +- All exceptions should have a custom definition in exceptions.py +- Dependencies should be used for db model get and validation where possible +- Verify module level docstring is still accurate after updates """ from fastapi import APIRouter