Skip to content

Commit 17c7434

Browse files
committed
Updated failing tests and flatten logic
1 parent 5144675 commit 17c7434

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pydantic_ai_slim/pydantic_ai/profiles/openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class OpenAIJsonSchemaTransformer(JsonSchemaTransformer):
143143
"""
144144

145145
def __init__(self, schema: JsonSchema, *, strict: bool | None = None):
146-
super().__init__(schema, strict=strict)
146+
super().__init__(schema, strict=strict, flatten_allof=True)
147147
self.root_ref = schema.get('$ref')
148148

149149
def walk(self) -> JsonSchema:

tests/test_json_schema_flattener.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def test_flatten_allof_nested_objects_and_pass_through_keywords() -> None:
9393
},
9494
'age': {'type': 'integer'},
9595
},
96-
'required': ['user', 'age'],
96+
'required': ['age', 'user'],
9797
}
9898
)
9999

0 commit comments

Comments
 (0)