fix: bound recursive authoring schema traversal

This commit is contained in:
lda
2026-08-14 14:42:58 +07:00 Verified
parent dc4682992b
commit 696a45c3c0
3 changed files with 77 additions and 0 deletions
+22
View File
@@ -194,6 +194,28 @@ def test_schema_path_options_resolves_local_definition_metadata() -> None:
]
def test_schema_path_options_stops_expanding_recursive_local_definition() -> None:
options = schema_path_options(
{
"type": "object",
"properties": {"node": {"$ref": "#/$defs/Node"}},
"$defs": {
"Node": {
"type": "object",
"properties": {"child": {"$ref": "#/$defs/Node"}},
}
},
},
root="input",
uses=["step_input"],
)
assert [option["path"] for option in options] == [
"input.node",
"input.node.child",
]
def test_schema_path_options_returns_empty_schema_for_unconstrained_property() -> None:
options = schema_path_options(
{