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

Add a convenience type for transforming a core schema via annotation #5819

Merged
merged 2 commits into from
May 23, 2023

Conversation

dmontagu
Copy link
Contributor

@dmontagu dmontagu commented May 22, 2023

The added tests show how this can be used to transform both first- and third-party defined custom types that are basically minor extensions of non-custom types, and make them compatible with FieldInfo- and annotated_types-style constraints.

Note: these tests were specifically inspired by:

@cloudflare-pages
Copy link

cloudflare-pages bot commented May 22, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 15398c4
Status: ✅  Deploy successful!
Preview URL: https://7386872b.pydantic-docs2.pages.dev
Branch Preview URL: https://transform-schema.pydantic-docs2.pages.dev

View logs

Copy link
Member

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

🤷 okay, this is risking getting beyond me.

But I don't think that's because of this.

@dmontagu dmontagu merged commit fe9cd8c into main May 23, 2023
43 checks passed
@dmontagu dmontagu deleted the transform-schema branch May 23, 2023 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants