You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here we demonstrate how to declare DTO types to your route handlers.
For demonstration purposes, we assume that we are working with a data model User, and already have two DTO types created in our application, UserDTO, and UserReturnDTO.
So, do we demonstrate how to declare them? Or do we have them already declared?
Summary
Right now https://docs.litestar.dev/latest/usage/dto/0-basic-use.html starts with:
and I was like: wait a second!
So, do we demonstrate how to declare them? Or do we have them already declared?
Let's go further: https://docs.litestar.dev/latest/usage/dto/0-basic-use.html#defining-dtos-on-handlers
What does this example show users?
When I was reading it - I had no idea what
User
is, whatUserDTO
is, why do I need to usedto=
at all.I propose to refactor the first half of this guide, because right now it is really hard to understand.
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered: