diff --git a/zcl/json/structure.go b/zcl/json/structure.go index 54f5651..020198b 100644 --- a/zcl/json/structure.go +++ b/zcl/json/structure.go @@ -112,6 +112,7 @@ func (b *body) PartialContent(schema *zcl.BodySchema) (*zcl.BodyContent, zcl.Bod } v := jsonAttr.Value diags = append(diags, b.unpackBlock(v, blockS.Type, &jsonAttr.NameRange, blockS.LabelNames, nil, nil, &content.Blocks)...) + usedNames[blockS.Type] = struct{}{} } unusedBody := &body{