Skip to content

Normalize URL fields in responses #1028

Description

@vdusek

URL fields in responses are plain strings that pass through untouched — the generated zod schemas deliberately do not enforce format: uri. The Python client types them as pydantic.AnyUrl, which normalizes during validation (trailing slash on an empty path, lowercased host, dropped default port, punycode, percent-encoding), so the two clients return different strings for the same field.

See apify/apify-client-python#999 for the full context and apify/apify-client-python#1005 for how it was resolved there.

Decide whether the JS client should normalize as well. If yes, it belongs in 3.0 — it changes the values callers get back.

✍️ Drafted by Claude Code

Activity

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

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions