File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -65,23 +65,23 @@ def test_allOf_resolution(petstore_expanded):
6565 pass
6666 items = pet .model_fields
6767
68- assert sorted (items .keys ()) == ["id" , "name" , "tag" ]
68+ assert sorted (items .keys ()) == ["created" , " id" , "name" , "tag" ]
6969
7070 def is_nullable (x ):
7171 # Optional[…] or | None
7272 return typing .get_origin (x .annotation ) == typing .Union and type (None ) in typing .get_args (x .annotation )
7373
7474 assert sorted (map (lambda x : x [0 ], filter (lambda y : is_nullable (y [1 ]), items .items ()))) == sorted (
75- ["tag" ]
76- ), ref .schema ()
75+ ["created" , " tag" ]
76+ ), ref .model_json_schema ()
7777
7878 def is_required (x ):
7979 # not assign a default '= Field(default=…)' or '= …'
8080 return x .default == pydantic_core .PydanticUndefined
8181
8282 assert sorted (map (lambda x : x [0 ], filter (lambda y : is_required (y [1 ]), items .items ()))) == sorted (
8383 ["id" , "name" ]
84- ), ref .schema ()
84+ ), ref .model_json_schema ()
8585
8686 assert items ["id" ].annotation == int
8787 assert items ["name" ].annotation == str
You can’t perform that action at this time.
0 commit comments