Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: modernize python type signature in schemas guide#1573

Open
Evarline wants to merge 3 commits into
fastapi-users:masterfrom
Evarline:Eve
Open

docs: modernize python type signature in schemas guide#1573
Evarline wants to merge 3 commits into
fastapi-users:masterfrom
Evarline:Eve

Conversation

@Evarline

Copy link
Copy Markdown

##Modern Python type signature
-This pr modernizes the python type signature in the 'schemas.md' configuration guide to use standard pipe operator union types

Copilot AI review requested due to automatic review settings June 15, 2026 03:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the configuration docs’ example FastAPI Users schemas to use modern Python union syntax for optional fields.

Changes:

  • Replaced Optional[T] with T | None in the documented UserRead and UserCreate schemas
  • Updated the documented UserUpdate schema fields to union syntax and added a default for one field

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/configuration/schemas.md Outdated
Comment on lines +68 to +69
first_name: str | None
birtdate: datetime.date | None = None

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

solved

Comment thread docs/configuration/schemas.md Outdated
Comment on lines +68 to +69
first_name: str | None
birtdate: datetime.date | None = None

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

solved

@Evarline

Copy link
Copy Markdown
Author

Solved all the typos and updated the modern optional string syntax with defaults to fix the update schema

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.

2 participants