File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 99 "type" : " string" ,
1010 "multiValued" : false ,
1111 "description" : " A human-readable name for the Group. REQUIRED." ,
12- "required" : false ,
12+ "required" : true ,
1313 "caseExact" : false ,
1414 "mutability" : " readWrite" ,
1515 "returned" : " default" ,
Original file line number Diff line number Diff line change 77from pydantic import Field
88
99from ..annotations import Mutability
10+ from ..annotations import Required
1011from ..attributes import ComplexAttribute
1112from ..path import URN
1213from ..reference import Reference
@@ -38,7 +39,7 @@ class GroupMember(ComplexAttribute):
3839class Group (Resource [Any ]):
3940 __schema__ = URN ("urn:ietf:params:scim:schemas:core:2.0:Group" )
4041
41- display_name : str | None = None
42+ display_name : Annotated [ str | None , Required . true ] = None
4243 """A human-readable name for the Group."""
4344
4445 members : list [GroupMember ] | None = None
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ def test_make_group_model_from_schema(load_sample):
3232 Group .model_fields ["display_name" ].description
3333 == "A human-readable name for the Group. REQUIRED."
3434 )
35- assert Group .get_field_annotation ("display_name" , Required ) == Required .false
35+ assert Group .get_field_annotation ("display_name" , Required ) == Required .true
3636 assert Group .get_field_annotation ("display_name" , CaseExact ) == CaseExact .false
3737 assert (
3838 Group .get_field_annotation ("display_name" , Mutability ) == Mutability .read_write
@@ -2712,7 +2712,7 @@ def test_make_schema_model_from_schema(load_sample):
27122712 assert obj .attributes [0 ].description == (
27132713 "A human-readable name for the Group. REQUIRED."
27142714 )
2715- assert not obj .attributes [0 ].required
2715+ assert obj .attributes [0 ].required
27162716 assert not obj .attributes [0 ].case_exact
27172717 assert obj .attributes [0 ].mutability == Mutability .read_write
27182718 assert obj .attributes [0 ].returned == Returned .default
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ def test_group_schema(load_sample):
2121 assert obj .attributes [0 ].description == (
2222 "A human-readable name for the Group. REQUIRED."
2323 )
24- assert not obj .attributes [0 ].required
24+ assert obj .attributes [0 ].required
2525 assert not obj .attributes [0 ].case_exact
2626 assert obj .attributes [0 ].mutability == Mutability .read_write
2727 assert obj .attributes [0 ].returned == Returned .default
You can’t perform that action at this time.
0 commit comments