Skip to content

Commit e9e7d40

Browse files
committed
log warning for attribute path of typeset
1 parent 5224b5e commit e9e7d40

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

helper/schema/schema.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2057,11 +2057,9 @@ func (m schemaMap) validateType(
20572057
diags = m.validateList(k, raw, schema, c, path)
20582058
case TypeSet:
20592059
// indexing into sets is not representable in the current protocol
2060-
// best we can do is associate the path up to this attribute
2061-
// we may be able to try and enhance the rendered text with the rest of
2062-
// the path ie "error in TypeSet element { 'foo' : 'bar' }",
2063-
// but it will not be a perfect UX
2060+
// best we can do is associate the path up to this attribute.
20642061
diags = m.validateList(k, raw, schema, c, path)
2062+
log.Printf("[WARN] Truncating attribute path of %d diagnostics for TypeSet", len(diags))
20652063
for i := range diags {
20662064
diags[i].AttributePath = path
20672065
}

0 commit comments

Comments
 (0)