Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernelci.api.models: fix pydantic warnings for url fields
Fix the below pydantic v2 warnings: ``` Expected `url` but got `str` with value - serialized value may not be as expected ``` This is due to fields such as `artifacts` and `revision.url` expect pydantic `Url` type and afterwards convert the values to `str` to store it in mongo DB and for json response. Change field types to `str` and use `TypeAdapter` to validate `Url` values before validating them as strings. Discussion thread for the issue: pydantic/pydantic#6395 Signed-off-by: Jeny Sadadia <[email protected]>
- Loading branch information