litestar icon indicating copy to clipboard operation
litestar copied to clipboard

Native support for `TypedDict`.

Open peterschutt opened this issue 3 years ago • 2 comments

Allow using instances of TypedDict as a type for data kwarg.

Support openapi docs, and Partial.

Closes #591

PR Checklist

  • [x] Have you followed the guidelines in CONTRIBUTING.md?
  • [x] Have you got 100% test coverage on new code?
  • [x] Have you updated the prose documentation?
  • [x] Have you updated the reference documentation?

peterschutt avatar Oct 16 '22 03:10 peterschutt

~I don't think DTO.from_model_instance() can be supported for TypedDict - correct me if I'm wrong - there is no typing info retained when a dict is constructed from a TypedDict.~

~It doesn't look like we actually use that method internally for anything though:~

nvm.. off my head

peterschutt avatar Oct 17 '22 02:10 peterschutt