python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

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

Open dsp-ant opened this issue 1 year ago • 0 comments

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 avatar Dec 03 '24 17:12 dsp-ant