Skip to content

docs: Document URL field normalization in typed models - #1005

Merged
vdusek merged 1 commit into
masterfrom
docs/url-field-normalization
Aug 12, 2026
Merged

docs: Document URL field normalization in typed models#1005
vdusek merged 1 commit into
masterfrom
docs/url-field-normalization

Conversation

@vdusek

@vdusek vdusek commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

URL fields on the returned models are pydantic.AnyUrl, which normalizes the value during validation, so the string read back can differ from the one the API sent. The trailing slash is the most visible case; normalization also lowercases the host, drops default ports, punycodes internationalized hosts, and percent-encodes unsafe characters. The behavior is intended, it just wasn't documented.

  • docs/02_concepts/12_typed_models.mdx gets a "URL fields" section covering the normalization cases, comparing URLs as AnyUrl rather than raw strings, and building longer URLs with urljoin.
  • docs/04_upgrading/upgrading_to_v3.mdx gets a "URL fields are normalized" section framing it as the v2 to v3 change, with the affected field names.

Closes #999

✍️ Drafted by Claude Code

@vdusek vdusek added the t-tooling Issues with this label are in the ownership of the tooling team. label Aug 12, 2026
@vdusek vdusek self-assigned this Aug 12, 2026
@github-actions github-actions Bot added this to the 147th sprint - Tooling team milestone Aug 12, 2026
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.84%. Comparing base (4281530) to head (6e47df3).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1005      +/-   ##
==========================================
- Coverage   94.86%   94.84%   -0.02%     
==========================================
  Files          58       58              
  Lines        5357     5357              
==========================================
- Hits         5082     5081       -1     
- Misses        275      276       +1     
Flag Coverage Δ
integration 91.97% <ø> (-0.30%) ⬇️
unit 84.63% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek
vdusek requested a review from Pijukatel August 12, 2026 08:34
@vdusek
vdusek marked this pull request as ready for review August 12, 2026 08:34
@vdusek
vdusek requested a review from szaganek as a code owner August 12, 2026 08:34

@Pijukatel Pijukatel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice with all the examples

@vdusek
vdusek merged commit 1fc037f into master Aug 12, 2026
56 of 57 checks passed
@vdusek
vdusek deleted the docs/url-field-normalization branch August 12, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

URL fields get an extra trailing slash in v3, changing the value the API sent

3 participants