test_dereference_refs_mixed_ref_with_properties() — langchain Function Reference
Architecture documentation for the test_dereference_refs_mixed_ref_with_properties() function in test_json_schema.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD dd4f390b_ef2a_d0cf_eb22_e2b18db59d4c["test_dereference_refs_mixed_ref_with_properties()"] 5d9c8eae_7a4a_0ffa_fa7c_a89825bcf1fa["test_json_schema.py"] dd4f390b_ef2a_d0cf_eb22_e2b18db59d4c -->|defined in| 5d9c8eae_7a4a_0ffa_fa7c_a89825bcf1fa style dd4f390b_ef2a_d0cf_eb22_e2b18db59d4c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/utils/test_json_schema.py lines 533–562
def test_dereference_refs_mixed_ref_with_properties() -> None:
"""Test dereferencing refs that have $ref plus other properties."""
# This pattern can cause infinite recursion if not handled correctly
schema = {
"type": "object",
"properties": {
"data": {
"$ref": "#/$defs/BaseType",
"description": "Additional description",
"example": "some example",
}
},
"$defs": {"BaseType": {"type": "string", "minLength": 1}},
}
expected = {
"type": "object",
"properties": {
"data": {
"type": "string",
"minLength": 1,
"description": "Additional description",
"example": "some example",
}
},
"$defs": {"BaseType": {"type": "string", "minLength": 1}},
}
actual = dereference_refs(schema)
assert actual == expected
Domain
Subdomains
Source
Frequently Asked Questions
What does test_dereference_refs_mixed_ref_with_properties() do?
test_dereference_refs_mixed_ref_with_properties() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/utils/test_json_schema.py.
Where is test_dereference_refs_mixed_ref_with_properties() defined?
test_dereference_refs_mixed_ref_with_properties() is defined in libs/core/tests/unit_tests/utils/test_json_schema.py at line 533.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free