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

PYD-164: Rework custom types docs #6490

Merged
merged 10 commits into from Jul 7, 2023
Merged

PYD-164: Rework custom types docs #6490

merged 10 commits into from Jul 7, 2023

Conversation

adriangb
Copy link
Member

@adriangb adriangb commented Jul 6, 2023

Selected Reviewer: @Kludex

skip change file check

@adriangb adriangb changed the title Custom type docs PYD-164: Rework custom types docs Jul 6, 2023
@linear
Copy link

linear bot commented Jul 6, 2023

PYD-164 Add docs about GetPydanticSchema in usage/types/custom.md

While doing this, I think it might be good to make a few other tweaks to custom.md (these are just suggestions, not required):

  • Rename Composing types via Annotated to Augmenting types with `Annotated`
  • Rename Creating custom classes using __get_pydantic_core_schema__ to Using __get_pydantic_core_schema__
    • Make the following subsections of Using __get_pydantic_core_schema__:
      • As a method(or similar)
      • As an annotation(or similar)
      • Handling third party types (move from where it currently is)
      • With `GetPydanticSchema`
  • Rename Generic classes as typesto Handling custom generic classes

@adriangb
Copy link
Member Author

adriangb commented Jul 6, 2023

skip change file check

@adriangb
Copy link
Member Author

adriangb commented Jul 6, 2023

please review cc @dmontagu

@cloudflare-pages
Copy link

cloudflare-pages bot commented Jul 6, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5289ca0
Status: ✅  Deploy successful!
Preview URL: https://0de76fc9.pydantic-docs2.pages.dev
Branch Preview URL: https://custom-type-docs.pydantic-docs2.pages.dev

View logs

@Kludex Kludex requested a review from tpdorsey July 6, 2023 21:01
docs/usage/types/custom.md Outdated Show resolved Hide resolved
docs/usage/types/custom.md Outdated Show resolved Hide resolved
docs/usage/types/custom.md Outdated Show resolved Hide resolved
docs/usage/types/custom.md Outdated Show resolved Hide resolved
docs/usage/types/custom.md Outdated Show resolved Hide resolved
docs/usage/types/custom.md Outdated Show resolved Hide resolved
docs/usage/types/custom.md Outdated Show resolved Hide resolved
adriangb and others added 6 commits July 6, 2023 16:13
Co-authored-by: Terrence Dorsey <terrend@mishu.com>
Co-authored-by: Terrence Dorsey <terrend@mishu.com>
Co-authored-by: Terrence Dorsey <terrend@mishu.com>
Co-authored-by: Terrence Dorsey <terrend@mishu.com>
Co-authored-by: Terrence Dorsey <terrend@mishu.com>
Co-authored-by: Terrence Dorsey <terrend@mishu.com>
@adriangb adriangb enabled auto-merge (squash) July 6, 2023 21:14
@adriangb adriangb merged commit b11c625 into main Jul 7, 2023
44 of 48 checks passed
@adriangb adriangb deleted the custom-type-docs branch July 7, 2023 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants