fix: validate workflow output target references

This commit is contained in:
lda
2026-07-26 21:46:42 +07:00 Verified
parent 0f11773611
commit b3ac92d8cb
5 changed files with 39 additions and 20 deletions
+8
View File
@@ -129,6 +129,14 @@ def project_schema_path_to_schema_path(
)
leaf = target_parts[-1]
if leaf in properties:
# Validate an existing target reference against the target document
# before source definitions are merged. Otherwise an unresolved target
# could be silently repaired by an equivalent source-side definition.
_resolve_local_reference(
projected,
properties[leaf],
label=".".join(target_parts),
)
if allow_existing_equivalent and properties[leaf] == source_value:
_merge_definition_block(projected, source_schema, "$defs")
_merge_definition_block(projected, source_schema, "definitions")