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

[pydantic > 2] [api] Add URL validation to openid field #557

Open
Leobouloc opened this issue Jan 24, 2024 · 0 comments
Open

[pydantic > 2] [api] Add URL validation to openid field #557

Leobouloc opened this issue Jan 24, 2024 · 0 comments

Comments

@Leobouloc
Copy link
Contributor

Leobouloc commented Jan 24, 2024

Feature Request

After migration, openid field of BaseXapiOpenIdIFI is of type str (no longer AnyStr). The reason is that AnyUrl in pydantic V2 modifies input strings (adding trailing slashes). This might be correct on a URL standpoint but not necessarily right when using it as an ID, where you would expect strings to be untouched.

It would be nice to add back the initial validation of the URL format (without modifying the string).

@Leobouloc Leobouloc changed the title [pydantic > 2] [api] Constrain openid type [pydantic > 2] [api] Add URL validation to openid field Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant