From 52f06a3a24f87e5525e22800b7e0a4ff739be4eb Mon Sep 17 00:00:00 2001 From: Adam Thornton Date: Fri, 3 May 2024 10:22:59 -0700 Subject: [PATCH 1/2] Improve API docs --- src/fastapibootcamp/handlers/astroplan/endpoints.py | 2 +- src/fastapibootcamp/handlers/external.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/fastapibootcamp/handlers/astroplan/endpoints.py b/src/fastapibootcamp/handlers/astroplan/endpoints.py index 2a9b565..5914a8c 100644 --- a/src/fastapibootcamp/handlers/astroplan/endpoints.py +++ b/src/fastapibootcamp/handlers/astroplan/endpoints.py @@ -87,7 +87,7 @@ async def get_observer( @astroplan_router.get( "/observers", - summary="Get all observering sites.", + summary="Get all observing sites.", response_model=list[ObserverModel], ) async def get_observers( diff --git a/src/fastapibootcamp/handlers/external.py b/src/fastapibootcamp/handlers/external.py index 0c75967..c803d68 100644 --- a/src/fastapibootcamp/handlers/external.py +++ b/src/fastapibootcamp/handlers/external.py @@ -132,7 +132,7 @@ class GreetingResponseModel(BaseModel): @external_router.get( "/en-greeting", - summary="Get a greeting in engish.", + summary="Get a greeting in English.", response_model=GreetingResponseModel, ) async def get_english_greeting( @@ -156,7 +156,7 @@ async def get_english_greeting( @external_router.get( "/greeting", - summary="Get a greeting in several languages.", + summary="Get a greeting in several languages by using a query parameter.", response_model=GreetingResponseModel, ) async def get_multilingual_greeting( @@ -200,7 +200,7 @@ async def get_multilingual_greeting( @external_router.get( "/greeting/{language}", - summary="Get a greeting in several languages.", + summary="Get a greeting in several languages by using a path parameter.", response_model=GreetingResponseModel, ) async def get_multilingual_greeting_path( @@ -252,7 +252,7 @@ class GreetingRequestModel(BaseModel): @external_router.post( "/greeting", - summary="Get a greeting in several languages.", + summary="Get a greeting in several languages using an HTTP POST.", response_model=GreetingResponseModel, ) async def post_greeting( From ef965da16fd628c5b50e2374aa76d613ae022917 Mon Sep 17 00:00:00 2001 From: Adam Thornton Date: Fri, 3 May 2024 10:24:56 -0700 Subject: [PATCH 2/2] Add changelog fragment for handler doc improvements --- changelog.d/20240503_102318_athornton_DM_44204.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog.d/20240503_102318_athornton_DM_44204.md diff --git a/changelog.d/20240503_102318_athornton_DM_44204.md b/changelog.d/20240503_102318_athornton_DM_44204.md new file mode 100644 index 0000000..82f7bf0 --- /dev/null +++ b/changelog.d/20240503_102318_athornton_DM_44204.md @@ -0,0 +1,5 @@ + + +### Other changes + +Minor improvements to handler docs.