fix: Update test to match Pydantic's JSON schema output for model references with defaults

Pydantic now uses allOf to combine model references with default values in JSON schema output.
This commit is contained in:
David Soria Parra 2024-12-18 14:02:51 +00:00
commit fe75f43ee6
No known key found for this signature in database

View file

@ -316,7 +316,11 @@ def test_complex_function_json_schema():
"type": "string",
},
"my_model_a_with_default": {
"$ref": "#/$defs/SomeInputModelA",
"allOf": [
{
"$ref": "#/$defs/SomeInputModelA"
}
],
"default": {},
},
"an_int_with_default": {