yaal-coop / scim2-models

SCIM resources serialization and validation with Pydantic
https://scim2-models.readthedocs.io
Apache License 2.0
5 stars 2 forks source link

Mark complex sub-attributes URNs at model definition #42

Open azmeuk opened 2 days ago

azmeuk commented 2 days ago

Currently, complex sub-attributes are given a private URN on model validation.

https://github.com/yaal-coop/scim2-models/blob/d32a5c2a4b62c27eddba12c94d6ab53bc0de1974/scim2_models/base.py#L518-L523

Those URNs are used later in model validation:

https://github.com/yaal-coop/scim2-models/blob/d32a5c2a4b62c27eddba12c94d6ab53bc0de1974/scim2_models/base.py#L595-L600

We should investigate how to mark URNs at model definition instead, for example by using things like __setname_\?