What is the point of DTOs? #2908
-
I've seen that Litestar implements DTO. However, I don't quite grasp why one would need it in their application. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Short answer: you don't need them and there is no requirement for you to use them. Longer answer is that DTOs can save a lot of repetition by removing the need to define explicit request and response schemas.
You wouldn't - they are an alternative to defining explicit request and response schemas. |
Beta Was this translation helpful? Give feedback.
Short answer: you don't need them and there is no requirement for you to use them.
Longer answer is that DTOs can save a lot of repetition by removing the need to define explicit request and response schemas.
You wouldn't - they are an alternative to defining explicit request and response schemas.