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

Use Annotated[pydantic.AnyUrl, pydantic.UrlConstraints(host_required=False)] instead of AnyUrl #86

Open
dsp-ant opened this issue Dec 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@dsp-ant
Copy link
Member

dsp-ant commented Dec 3, 2024

Pydantic's AnyUrl requires a host to be specified. For file resources this means that a triple slash such as file:///foo.txt is required because there is no host. We should likely be using Annotated[pydantic.AnyUrl, pydantic.UrlConstraints(host_required=False)] or something along these lines.

@dsp-ant dsp-ant changed the title Use Annotated[pydantic.AnyUrl, pydantic.UrlConstraints(host_required=False)] instead of AnyUrk Use Annotated[pydantic.AnyUrl, pydantic.UrlConstraints(host_required=False)] instead of AnyUrl Dec 3, 2024
@dsp-ant dsp-ant added the enhancement New feature or request label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant