chalk-ai / pydantic-scim

Apache License 2.0
2 stars 1 forks source link

ListResponse.Resources discriminator #8

Closed azmeuk closed 1 month ago

azmeuk commented 1 month ago

This allows pydantic to guess the models to use when parsing a ListResponse payload. For the moment only User and Group are in the union, but there should also be EnterpriseUser and ResourceType etc.

I could not implement EnterpriseUser partly because of #9 which makes it uncompatible with pydantic >2.1 and this version needs pydantic>=2.5 (because of pydantic.Discriminator).

I could not implement ResourceType yet because of #12

This also needs python 3.9+ because of typing.Annotated

This also adds a minimal test suite and loads the examples from the SCIM specifications as test fixtures for future tests.

Fixes #6