10BC0 Patch for serialized json schema defaults by sydney-runkle · Pull Request #9624 · pydantic/pydantic · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@sydney-runkle
Copy link
Contributor

Fix #9352

@github-actions github-actions bot added the relnotes-fix Used for bugfixes. label Jun 10, 2024
@sydney-runkle sydney-runkle added ready for review relnotes-change Used for changes to existing functionality which don't have a better categorization. and removed relnotes-fix Used for bugfixes. labels Jun 10, 2024
@cloudflare-workers-and-pages
Copy link
cloudflare-workers-and-pages bot commented Jun 10, 2024

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: f525f16
Status: ✅  Deploy successful!
Preview URL: https://69a8e6eb.pydantic-docs.pages.dev
Branch Preview URL: https://serializer-json-schema.pydantic-docs.pages.dev

View logs

@codspeed-hq
Copy link
codspeed-hq bot commented Jun 10, 2024

CodSpeed Performance Report

Merging #9624 will not alter performance

Comparing serializer-json-schema (f525f16) with main (13dc7c3)

Summary

✅ 13 untouched benchmarks

Copy link
Member
@adriangb adriangb left a comment

Choose a reason for hiding this comment

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

It seems better than nothing, but no guarantee we'll even try to handle anything more complex.

@sydney-runkle
Copy link
Contributor Author

Going to merge this as is for now, marking this as a change.

Like @adriangb said, I think this is better than our current behavior, but this feature could very well be limited to plain serializers due to the complexity of calling serialization functions during the json schema generation process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review relnotes-change Used for changes to existing functionality which don't have a better categorization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Annotated PlainSerializer is ignored by model_json_schema for default field

3 participants

0