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
parent 557e90d2e7
commit fe75f43ee6

View File

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