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
feat: support "+json"-suffixed response media types #3096
feat: support "+json"-suffixed response media types #3096
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3096 +/- ##
===========================================
+ Coverage 98.23% 98.25% +0.02%
===========================================
Files 312 320 +8
Lines 14121 14363 +242
Branches 2430 2307 -123
===========================================
+ Hits 13872 14113 +241
- Misses 107 109 +2
+ Partials 142 141 -1 ☔ View full report in Codecov by Sentry. |
2ad1aad
to
75f8c78
Compare
75f8c78
to
6e444bb
Compare
The documentation preview does not have my changes. Am I supposed to build it manually somehow? |
Seems to be there? https://litestar-org.github.io/litestar-docs-preview/3096/usage/responses.html#json-responses |
"build docs" failed for the commit with
I can't see how I could have caused this or what I can do about it? |
fad2653
to
a83a8b5
Compare
This was fixed in |
But this is not based on |
Yeah, that was the issue. |
Some checks failed with docker compose errors now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got one comment about the example, other than that this is good to go in!
pydantic is not a base dependency of litestar
A test failed mysteriously, but I think it is marked as "flaky". |
Huh. I guess |
Using built-in types as generics only became possible in 3.9
Head branch was pushed to by a user without write access
All checks are passing now. I am not sure what "update branch" strategy is preferred (merge vs rebase) so I will leave that to you. |
Do whatever you prefer. Personally, I like rebase more, but it doesn't really make a difference here since we squash merge PRs anyway. |
Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3096 |
Should I have been added to some "all contributors" file? I see that happening in other PRs but I don't know how this works. |
Yes, you should have! You can just request that yourself by making a comment like this: @all-contributors add @bunny-therapist for code. |
I've put up a pull request to add @bunny-therapist! 🎉 |
Giving route handlers a response media type of the form "application/+json" automatically uses json encoding for the response.
Closes #3088