Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@wssheldon
Copy link
Contributor

Initial commit uses Annotated types for DispatchUser and Session in Case view as an example. If the approach looks good to folks (namely where the annotated types live in the codebase) I will add this approach to all the views for consistency.

Reference: https://www.reddit.com/r/Python/comments/11v0kcb/fastapi_0950_supports_and_recommends_annotated/

@wssheldon wssheldon added the enhancement New feature or request label Mar 30, 2023
@wssheldon wssheldon requested review from kevgliss and mvilanova March 30, 2023 17:09
@wssheldon
Copy link
Contributor Author

Looks like the * symbol at the beginning of the view functions can also be removed if we use Annotated types

https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#order-the-parameters-as-you-need-tricks

@wssheldon

This comment was marked as resolved.

Copy link
Contributor

@mvilanova mvilanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks for working on it.

@wssheldon wssheldon merged commit 3d1ffb4 into master Mar 31, 2023
@wssheldon wssheldon deleted the enhancement/annotated-types-fastapi branch March 31, 2023 18:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants