Home / Function/ test_dereference_refs_multiple_refs() — langchain Function Reference

test_dereference_refs_multiple_refs() — langchain Function Reference

Architecture documentation for the test_dereference_refs_multiple_refs() function in test_json_schema.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  3d3418e2_20d7_6398_4849_db8ec13da9f2["test_dereference_refs_multiple_refs()"]
  5d9c8eae_7a4a_0ffa_fa7c_a89825bcf1fa["test_json_schema.py"]
  3d3418e2_20d7_6398_4849_db8ec13da9f2 -->|defined in| 5d9c8eae_7a4a_0ffa_fa7c_a89825bcf1fa
  style 3d3418e2_20d7_6398_4849_db8ec13da9f2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/utils/test_json_schema.py lines 42–66

def test_dereference_refs_multiple_refs() -> None:
    schema = {
        "type": "object",
        "properties": {
            "first_name": {"$ref": "#/$defs/name"},
            "other": {"$ref": "#/$defs/other"},
        },
        "$defs": {
            "name": {"type": "string"},
            "other": {"type": "object", "properties": {"age": "int", "height": "int"}},
        },
    }
    expected = {
        "type": "object",
        "properties": {
            "first_name": {"type": "string"},
            "other": {"type": "object", "properties": {"age": "int", "height": "int"}},
        },
        "$defs": {
            "name": {"type": "string"},
            "other": {"type": "object", "properties": {"age": "int", "height": "int"}},
        },
    }
    actual = dereference_refs(schema)
    assert actual == expected

Domain

Subdomains

Frequently Asked Questions

What does test_dereference_refs_multiple_refs() do?
test_dereference_refs_multiple_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_multiple_refs() defined?
test_dereference_refs_multiple_refs() is defined in libs/core/tests/unit_tests/utils/test_json_schema.py at line 42.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free