Skip to content

Commit 56c4677

Browse files
committed
fixed allOf removal latest pydantic pydantic/pydantic#10029
1 parent f8264c3 commit 56c4677

File tree

9 files changed

+11
-28
lines changed

9 files changed

+11
-28
lines changed

tests/test_openapi/test_open_api_route_documentation.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,8 @@ def test_open_api_route__get_openapi_path_object_works_for_routes_with_multiple_
461461
"content": {
462462
"application/json": {
463463
"schema": {
464-
"allOf": [{"$ref": "#/$defs/CreateCarSchema"}],
464+
"$ref": "#/$defs/CreateCarSchema",
465465
"default": None,
466-
"title": "Car",
467466
}
468467
}
469468
}
@@ -497,9 +496,8 @@ def test_open_api_route__get_openapi_path_object_works_for_routes_with_multiple_
497496
"content": {
498497
"application/json": {
499498
"schema": {
500-
"allOf": [{"$ref": "#/$defs/CreateCarSchema"}],
499+
"$ref": "#/$defs/CreateCarSchema",
501500
"default": None,
502-
"title": "Car",
503501
}
504502
}
505503
}

tests/test_routing/document_results.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,7 @@
118118
"content": {
119119
"multipart/form-data": {
120120
"schema": {
121-
"allOf": [
122-
{
123-
"$ref": "#/components/schemas/body_form_upload_multiple_case_2_mixed_optional_post"
124-
}
125-
],
126-
"title": "Body",
121+
"$ref": "#/components/schemas/body_form_upload_multiple_case_2_mixed_optional_post"
127122
}
128123
}
129124
}
@@ -236,7 +231,7 @@
236231
"repr": True,
237232
},
238233
"range": {
239-
"allOf": [{"$ref": "#/components/schemas/Range"}],
234+
"$ref": "#/components/schemas/Range",
240235
"default": 20,
241236
"repr": True,
242237
},

tests/test_routing/test_body_union_schema.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,7 @@ def alias_qty(
131131
"content": {
132132
"application/json": {
133133
"schema": {
134-
"allOf": [
135-
{
136-
"$ref": "#/components/schemas/body_embed_qty_items_embed_post"
137-
}
138-
],
139-
"title": "Body",
134+
"$ref": "#/components/schemas/body_embed_qty_items_embed_post",
140135
}
141136
}
142137
}

tests/test_routing/test_cookie_schema.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,7 @@ def test_cookie_schema():
154154
{
155155
"required": False,
156156
"schema": {
157-
"allOf": [{"$ref": "#/components/schemas/Range"}],
158-
"title": "Range",
157+
"$ref": "#/components/schemas/Range",
159158
"default": 20,
160159
"repr": True,
161160
},

tests/test_routing/test_extra_args.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ def query_params_extra(
125125
{
126126
"required": False,
127127
"schema": {
128-
"allOf": [{"$ref": "#/components/schemas/Range"}],
129-
"title": "Range",
128+
"$ref": "#/components/schemas/Range",
130129
"default": 20,
131130
"repr": True,
132131
},

tests/test_routing/test_form_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def test_schema():
147147
"repr": True,
148148
},
149149
"range": {
150-
"allOf": [{"$ref": "#/components/schemas/Range"}],
150+
"$ref": "#/components/schemas/Range",
151151
"default": 20,
152152
"repr": True,
153153
},

tests/test_routing/test_header_schema.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,7 @@ def test_header_schema():
154154
{
155155
"required": False,
156156
"schema": {
157-
"allOf": [{"$ref": "#/components/schemas/Range"}],
158-
"title": "Range",
157+
"$ref": "#/components/schemas/Range",
159158
"default": 20,
160159
"repr": True,
161160
},

tests/test_routing/test_path_with_schema.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ def test_schema():
7070
{
7171
"required": False,
7272
"schema": {
73-
"allOf": [{"$ref": "#/components/schemas/Range"}],
74-
"title": "Range",
73+
"$ref": "#/components/schemas/Range",
7574
"default": 20,
7675
"repr": True,
7776
},

tests/test_routing/test_query_schema.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ def test_schema():
156156
{
157157
"required": False,
158158
"schema": {
159-
"allOf": [{"$ref": "#/components/schemas/Range"}],
160-
"title": "Range",
159+
"$ref": "#/components/schemas/Range",
161160
"default": 20,
162161
"repr": True,
163162
},

0 commit comments

Comments
 (0)