*RequestContextand*ResponseContextgeneric type aliases that wrap :class:`~scim2_models.SCIMValidator` and :class:`~scim2_models.SCIMSerializer` for each SCIM context (e.g.CreationRequestContext[User],CreationResponseContext[User]).
- :class:`~scim2_models.SCIMValidator` and :class:`~scim2_models.SCIMSerializer` Pydantic Annotated markers to inject a SCIM :class:`~scim2_models.Context` during validation and serialization. :issue:`130`
- :class:`~scim2_models.MutabilityException` handler in framework integration examples (FastAPI, Flask, Django).
- The
originalparameter of :meth:`~scim2_models.base.BaseModel.model_validate` is deprecated. Use :meth:`~scim2_models.Resource.replace` on the validated instance instead. Will be removed in 0.8.0.
- PATCH operations on :attr:`~scim2_models.Mutability.immutable` fields are now validated at runtime per :rfc:`RFC 7644 §3.5.2 <7644#section-3.5.2>`:
addis only allowed when the field has no previous value,replaceis only allowed with the same value, andremoveis only allowed on unset fields.
- :class:`~scim2_models.ListResponse`
model_dumpandmodel_dump_jsonnow acceptattributesandexcluded_attributesparameters. :issue:`59` - New :class:`~scim2_models.ResponseParameters` model for :rfc:`RFC7644 §3.9 <7644#section-3.9>`
attributesandexcludedAttributesquery parameters. :class:`~scim2_models.SearchRequest` inherits from it. - :class:`~scim2_models.ResponseParameters` and :class:`~scim2_models.SearchRequest` accept comma-separated strings for
attributesandexcludedAttributes.
- Fix ListResponse.totalResults validation when resources is none. :pr:`133`
- Fix extension serialization crash when an extension is declared but not populated on a resource serialized outside of SCIM context (e.g. FastAPI
response_model). :pr:`131`
- :class:`~scim2_models.SCIMException` now accepts an optional
scim_ctxparameter to indicate the SCIM context in which the exception occurred.
- Fix
model_json_schema()generation for models containing :class:`~scim2_models.Reference` or :class:`~scim2_models.Path` fields. :issue:`125` - Group
displayNameis required. RFC 7643 erratum 5368 :issue:`123` :pr:`128` - :class:`~scim2_models.GroupMembership`
$refonly referencesGroup. RFC 7643 erratum 8471 - :class:`~scim2_models.Manager`
valueis case-exact. RFC 7643 erratum 8472 - :class:`~scim2_models.ResourceType`
nameandendpointhave server uniqueness. RFC 7643 erratum 8475 - Complex attributes don't have
uniquenessin schema representation. RFC 7643 erratum 6004
- :meth:`SCIMException.from_error <scim2_models.SCIMException.from_error>` to create an exception from a SCIM :class:`~scim2_models.Error` object.
- Allow
Pathobjects in Pydantic validation methods.
- Resources define their schema URN with a
__schema__classvar instead of aschemasdefault value. :issue:`110` - :class:`~scim2_models.External` and :class:`~scim2_models.URI` marker classes for reference types.
- Introduce a :class:`~scim2_models.Path` object to handle paths. :issue:`111`
- :class:`~scim2_models.Reference` type parameters simplified:
Reference[ExternalReference]→Reference[External]Reference[URIReference]→Reference[URI]Reference[Literal["User"]]→Reference["User"]Reference[Literal["User"] | Literal["Group"]]→Reference[Union["User", "Group"]]
- :class:`~scim2_models.Reference` now validates URI format for
ExternalandURItypes. - :class:`~scim2_models.Reference` inherits from
strdirectly instead ofUserString.
- Only allow one primary complex attribute value to be true. :issue:`10`
- Defining
schemaswith a default value is deprecated. Use__schema__ = URN("...")instead. Error.make_*_error()methods are deprecated. Use<Exception>.to_error()instead.Reference[Literal["X"]]syntax is deprecated. UseReference["X"]instead. Will be removed in 0.7.0.ExternalReferencealias is deprecated. Use :class:`~scim2_models.External` instead. Will be removed in 0.7.0.URIReferencealias is deprecated. Use :class:`~scim2_models.URI` instead. Will be removed in 0.7.0.- Validation that the base schema is present in
schemasduring SCIM context validation. - Validation that extension schemas are known during SCIM context validation.
- Introduce SCIM exceptions hierarchy (:class:`~scim2_models.SCIMException` and subclasses) corresponding to RFC 7644 error types. :issue:`103`
- :meth:`Error.from_validation_error <scim2_models.Error.from_validation_error>` to convert Pydantic :class:`~pydantic.ValidationError` to SCIM :class:`~scim2_models.Error`.
- :meth:`PatchOp.patch <scim2_models.PatchOp.patch>` auto-excludes other
primaryvalues when setting one toTrue. :issue:`116`
- Sub-attributes of requested complex attributes are now included in responses. :issue:`114`
- Support for Python 3.14.
- Compile regexes.
- Support for Python 3.9.
- Validation that forbid :class:`~scim2_models.PatchOp` with zero
operations.
- Allow PATCH operations on resources and extensions root path.
- Multiple ComplexAttribute do not inherit from MultiValuedComplexAttribute by default. :issue:`72` :issue:`73`
- The library is 100% typed with mypy strict.
- Allow
TypeVaras type parameters for :class:`~scim2_models.PatchOp`.
- Proper path validation for :attr:`~scim2_models.SearchRequest.attributes`, :attr:`~scim2_models.SearchRequest.excluded_attributes` and :attr:`~scim2_models.SearchRequest.sort_by`.
- Implement :meth:`~scim2_models.PatchOp.patch`
- When using
model_dump, ignore invalidattributesandexcluded_attributesas suggested by RFC7644. - Don't normalize attributes typed with :data:`Any`. :issue:`20`
- All non strict mypy type annotations are fixed.
- Fix :meth:`ResourceType.from_resource <scim2_models.ResourceType.from_resource>` usage for resources with several extensions. :pr:`95`
- Fix dynamic schema generation for user defined classes with inheritance.
- Implement User and Group attributes types shortcuts to match dynamically created model types.
- User class typing. :pr:`92`
- Pydantic warning.
- Fix :attr:`~scim2_models.SearchRequest.start_index` and :attr:`~scim2_models.SearchRequest.count` limits. :issue:`84`
- :attr:`~scim2_models.ListResponse.total_resuls` is required. :issue:`88`
- :meth:`Attribute.get_attribute <scim2_models.Attribute.get_attribute>` can be called with brackets.
- Add a :paramref:`~scim2_models.BaseModel.model_validate.original` parameter to :meth:`~scim2_models.BaseModel.model_validate` mandatory for :attr:`~scim2_models.Context.RESOURCE_REPLACEMENT_REQUEST`. This original value is used to look if :attr:`~scim2_models.Mutability.immutable` parameters have mutated. :issue:`86`
- Implement :meth:`Schema.get_attribute <scim2_models.Schema.get_attribute>`.
- Implement :meth:`SearchRequest.start_index_0 <scim2_models.SearchRequest.start_index_0>` and :meth:`SearchRequest.start_index_1 <scim2_models.SearchRequest.start_index_1>`.
- The
schemaattribute is annotated with :attr:`~scim2_models.Required.true`.
Base64Bytescompatibility between pydantic 2.10+ and <2.10
- Support for Pydantic 2.10.
- Implement :meth:`~scim2_models.BaseModel.model_dump_json`.
- Temporarily set Pydantic 2.9 as the maximum supported version.
- Python 3.9 and 3.10 compatibility.
- Python 3.13 support.
- Proper Base64 serialization. :issue:`31`
- :meth:`~BaseModel.get_field_root_type` supports :data:`~typing.UnionType`.
- :attr:`SearchRequest.attributes <scim2_models.SearchRequest.attributes>` and :attr:`SearchRequest.attributes <scim2_models.SearchRequest.excluded_attributes>` are mutually exclusive. :issue:`19`
- :class:`~scim2_models.Schema` ids must be valid URIs. :issue:`26`
- :class:`~scim2_models.ListResponse` pydantic discriminator issue introduced with pydantic 2.9.0. :issue:`75`
- Extension payloads are not required on response contexts. :issue:`77`
- Fix the extension mechanism by introducing the :class:`~scim2_models.Extension` class. :issue:`60`, :issue:`63`
Note
schema.make_model() becomes Resource.from_schema(schema) or Extension.from_schema(schema).
- Enable pydantic :attr:`~pydantic.config.ConfigDict.validate_assignment` option. :issue:`54`
- Add a PEP561
py.typedfile to mark the package as typed.
- Remove :class:`~scim2_models.ListResponse`
ofmethod in favor of regular type parameters.
Note
ListResponse.of(User) becomes ListResponse[User] and ListResponse.of(User, Group)`` becomes ListResponse[Union[User, Group]].
Note
pet: Reference["Pet"] becomes pet: Reference[Literal["Pet"]]
- get_by_payload return :data:`None` on invalid payloads
- instance :meth:`~scim2_models.Resource.model_dump` with multiple extensions :issue:`57`
- Schema dump with context was broken.
- :attr:`scim2_models.PatchOperation.op` attribute is case insensitive to be compatible with Microsoft Entra. :issue:`55`
- Additional bugfixes about attribute case sensitivity :issue:`45`
- Dump was broken after sub-model assignments :issue:`48`
- Extension attributes dump were ignored :issue:`49`
- :class:`~scim2_models.ListResponse` tolerate any schema order :issue:`50`
- Attributes are case insensitive :issue:`39`
- Export resource models with :data:`~scim2_models.Resource.to_schema` :issue:`7`
- :data:`~scim2_models.Reference` type parameters represent SCIM ReferenceType
- :attr:`~scim2_models.SearchRequest.count` and :attr:`~scim2_models.SearchRequest.start_index` validators supports :data:`None` values.
- Dynamic pydantic model creation from SCIM schemas. :issue:`6`
- Use a custom :data:`~scim2_models.Reference` type instead of :class:`~pydantic.AnyUrl` as RFC7643 reference type.
- Allow relative URLs in :data:`~scim2_models.Reference`.
- Models with multiples extensions could not be initialized. :issue:`37`
- :attr:`~scim2_models.SearchRequest.count` value is floored to 1
- :attr:`~scim2_models.SearchRequest.start_index` value is floored to 0
- :attr:`~scim2_models.ListResponse.resources` must be set when :attr:`~scim2_models.ListResponse.totalResults` is non-null.
- Add missing default values. :issue:`33`
- Implement :class:`~scim2_models.CaseExact` attributes annotations.
- Implement :class:`~scim2_models.Required` attributes annotations validation.
- Refactor
get_field_mutabilityandget_field_returnabilityinget_field_annotation.
ServiceProviderConfigurationid is optional.
- Rename
ServiceProviderConfigurationtoServiceProviderConfigto match the RFCs naming convention.
- Pre-defined errors are not constants anymore
- Initial release