Skip to content

Commit 5799b25

Browse files
author
Natarajan Krishnaswami
committed
Incorporate review comments:
* Remove `print` statements * add example verifying new behavior to E2E test
1 parent 19a1725 commit 5799b25

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

end_to_end_tests/baseline_openapi_3.0.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,16 @@
394394
"content": {
395395
"multipart/form-data": {
396396
"schema": {
397-
"$ref": "#/components/schemas/Body_upload_file_tests_upload_post"
397+
"$ref": "#/components/schemas/Body_upload_file_tests_upload_post",
398+
"title": "Body_upload_file_tests_upload_post",
399+
"required": [
400+
"some_file",
401+
"some_object",
402+
"some_nullable_object",
403+
"some_required_number"
404+
],
405+
"properties": {
406+
}
398407
}
399408
}
400409
},

tests/test_schema/test_noisy_refs.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040

4141
def get_example(base_type):
4242
schema = base_type.model_json_schema()
43-
print(json.dumps(schema.get("examples", []), indent=4))
4443
if "examples" in schema:
4544
return schema["examples"][0]
4645
if "$defs" in schema:
@@ -71,7 +70,6 @@ def deannotate_type(t):
7170
])
7271
def test_type(ref_or_type, get_example_fn):
7372
base_type = None
74-
print(deannotate_type(ref_or_type))
7573
for maybe_annotated_type in get_args(deannotate_type(ref_or_type)):
7674
each_type = deannotate_type(maybe_annotated_type)
7775
if each_type is not Reference:

0 commit comments

Comments
 (0)