Carry collection selections through configuration

This commit is contained in:
2026-11-29 17:53:36 +00:00
parent a0c5ca8761
commit 10221b0624
10 changed files with 172 additions and 6 deletions

View File

@@ -403,6 +403,14 @@ func validateDocumentReferences(references map[string]ReferenceDocument, path co
sourcePath := path.Key(name)
hasPath := source.Path != nil
hasArtifact := source.Artifact != nil
for index, collection := range source.Collections {
if collection == "" {
validation.Error(sourcePath.Key("collections").Index(index), "must not be empty")
}
}
if hasArtifact && source.Collections != nil {
validation.Error(sourcePath.Key("collections"), "is only supported with an external path")
}
if hasPath == hasArtifact {
validation.Error(sourcePath, "must select exactly one reference source")
continue