test_dereference_refs_array_with_mixed_refs() — langchain Function Reference
Architecture documentation for the test_dereference_refs_array_with_mixed_refs() function in test_json_schema.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD eb63588a_a479_9142_7bf7_0af7f31b50d0["test_dereference_refs_array_with_mixed_refs()"] 5d9c8eae_7a4a_0ffa_fa7c_a89825bcf1fa["test_json_schema.py"] eb63588a_a479_9142_7bf7_0af7f31b50d0 -->|defined in| 5d9c8eae_7a4a_0ffa_fa7c_a89825bcf1fa style eb63588a_a479_9142_7bf7_0af7f31b50d0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/utils/test_json_schema.py lines 732–761
def test_dereference_refs_array_with_mixed_refs() -> None:
"""Test arrays containing mixed $ref objects."""
schema = {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {"$ref": "#/$defs/Item", "description": "An item"},
}
},
"$defs": {"Item": {"type": "string", "enum": ["a", "b", "c"]}},
}
expected = {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string",
"enum": ["a", "b", "c"],
"description": "An item",
},
}
},
"$defs": {"Item": {"type": "string", "enum": ["a", "b", "c"]}},
}
actual = dereference_refs(schema)
assert actual == expected
Domain
Subdomains
Source
Frequently Asked Questions
What does test_dereference_refs_array_with_mixed_refs() do?
test_dereference_refs_array_with_mixed_refs() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/utils/test_json_schema.py.
Where is test_dereference_refs_array_with_mixed_refs() defined?
test_dereference_refs_array_with_mixed_refs() is defined in libs/core/tests/unit_tests/utils/test_json_schema.py at line 732.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free