File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88^^^^^
99- Fix ``model_json_schema() `` generation for models containing :class: `~scim2_models.Reference ` or :class: `~scim2_models.Path ` fields. :issue: `125 `
1010- Group ``displayName `` is required. :rfc: `7643 ` `erratum 5368 <https://www.rfc-editor.org/errata/eid5368 >`_ :issue: `123 ` :pr: `128 `
11+ - :class: `~scim2_models.GroupMembership ` ``$ref `` only references ``Group ``. :rfc: `7643 ` `erratum 8471 <https://www.rfc-editor.org/errata/eid8471 >`_
1112
1213[0.6.2] - 2026-01-25
1314--------------------
Original file line number Diff line number Diff line change 572572 "name" : " $ref" ,
573573 "type" : " reference" ,
574574 "referenceTypes" : [
575- " User" ,
576575 " Group"
577576 ],
578577 "multiValued" : false ,
Original file line number Diff line number Diff line change 22from typing import TYPE_CHECKING
33from typing import Annotated
44from typing import ClassVar
5- from typing import Union
65
76from pydantic import Base64Bytes
87from pydantic import EmailStr
@@ -202,8 +201,8 @@ class GroupMembership(ComplexAttribute):
202201 value : Annotated [str | None , Mutability .read_only ] = None
203202 """The identifier of the User's group."""
204203
205- ref : Annotated [ # type: ignore[type-arg]
206- Reference [Union [ "User" , " Group"] ] | None ,
204+ ref : Annotated [
205+ Reference [" Group" ] | None ,
207206 Mutability .read_only ,
208207 ] = Field (None , serialization_alias = "$ref" )
209208 """The reference URI of a target resource, if the attribute is a
Original file line number Diff line number Diff line change @@ -857,9 +857,7 @@ def test_make_user_model_from_schema(load_sample):
857857 assert Groups .get_field_annotation ("value" , Uniqueness ) == Uniqueness .none
858858
859859 # group.ref
860- assert (
861- Groups .get_field_root_type ("ref" ) == Reference [Union ["User" , "Group" ]] # noqa: F821
862- )
860+ assert Groups .get_field_root_type ("ref" ) == Reference ["Group" ] # noqa: F821
863861 assert not Groups .get_field_multiplicity ("ref" )
864862 assert (
865863 Groups .model_fields ["ref" ].description
You can’t perform that action at this time.
0 commit comments