Skip to content

Commit

Permalink
Merge pull request #6 from lsst-sqre/tickets/DM-44230
Browse files Browse the repository at this point in the history
DM-44230: Small fixes
  • Loading branch information
jonathansick authored May 8, 2024
2 parents 161bed4 + 557476f commit ff43691
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ Find changes for the upcoming release in the project's [changelog.d directory](h

<!-- scriv-insert-here -->

<a id='changelog-2.0.1'></a>
## 2.0.1 (2024-05-07)

### Bug fixes

- Remove the unwanted query parameter from the `GET /fastapi-bootcamp/en-greeting` endpoint.

<a id='changelog-2.0.0'></a>
## 2.0.0 (2024-05-07)

Expand Down
8 changes: 3 additions & 5 deletions src/fastapibootcamp/handlers/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,9 @@ class GreetingResponseModel(BaseModel):
summary="Get a greeting in English.",
response_model=GreetingResponseModel,
)
async def get_english_greeting(
language: Annotated[Language, Query()] = Language.en,
) -> GreetingResponseModel:
async def get_english_greeting() -> GreetingResponseModel:
return GreetingResponseModel(
greeting="Hello, SQuaRE Services Bootcamp!", language=language
greeting="Hello, SQuaRE Services Bootcamp!", language=Language.en
)


Expand Down Expand Up @@ -382,7 +380,7 @@ class ErrorRequestModel(BaseModel):
"/error-demo", summary="Raise an internal service exception."
)
async def post_error_demo(data: ErrorRequestModel) -> JSONResponse:
"""Use the custom_error field to compare the different between raising
"""Use the custom_error field to compare the difference between raising
a custom SlackException and a generic exception.
"""
if data.custom_error:
Expand Down

0 comments on commit ff43691

Please sign in to comment.