Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Document custom types #3603

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

stewit
Copy link

@stewit stewit commented Jun 27, 2024

Description

@stewit stewit requested review from a team as code owners June 27, 2024 08:23
@github-actions github-actions bot added area/docs This PR involves changes to the documentation size: small type/docs pr/external Triage Required 🏥 This requires triage labels Jun 27, 2024
docs/usage/custom-types.rst Outdated Show resolved Hide resolved
docs/usage/custom-types.rst Outdated Show resolved Hide resolved

Data serialization / deserialization (encoding / decoding) and validation are important parts of any API framework.

Among others, litestar supports Python's builtin dataclasses, Pydantic and msgspec for these tasks, defaulting to msgspec with json as serialization protocol.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think "defaulting to msgspec" is the correct phrasing here. Litestar only uses msgspec for serialisation to JSON. It can integrate with Pydantic and others, but doesn't use those to encode anything to JSON directly; It all goes through msgspec eventually.

I'm not sure msgspec needs to be mentioned in this part of the documentation in general, as it's more of an implementation detail. We should mention that that's how it works, but perhaps we can find a better place for that

Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3603

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs This PR involves changes to the documentation pr/external size: medium size: small Triage Required 🏥 This requires triage type/docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants