You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you try to use a path for audio_path, video_path, etc, then you get a very unfriendly validation error:
data.list[function-after[data_is_valid(), DataSource]].0.manifest.audio_path
Input should be a valid URL, relative URL without a base [type=url_parsing, input_value='/assets/', input_type=str]
For further information visit https://errors.pydantic.dev/2.4/v/url_parsing
Pydantic's validation definitely wants these to be URLs with a scheme, host, etc. I wonder about the wisdom of making these HttpUrl since in reality they are nearly always going to be relative (or absolute to the deployment root) paths. Plus it's in the name!
The text was updated successfully, but these errors were encountered:
It looks like you can get around this by making them Union[HttpUrl, str] but then you don't actually get any validation since Pydantic will always fall back to str (and they end up being strings in the JSON anyway).
If you try to use a path for
audio_path
,video_path
, etc, then you get a very unfriendly validation error:Pydantic's validation definitely wants these to be URLs with a scheme, host, etc. I wonder about the wisdom of making these
HttpUrl
since in reality they are nearly always going to be relative (or absolute to the deployment root) paths. Plus it's in the name!The text was updated successfully, but these errors were encountered: