json: Respect hiddenAttrs in JustAttributes
Previously it was leaking out hidden attributes.
This commit is contained in:
parent
a291478c78
commit
4fcad1f493
@ -128,6 +128,9 @@ func (b *body) PartialContent(schema *zcl.BodySchema) (*zcl.BodyContent, zcl.Bod
|
||||
func (b *body) JustAttributes() (map[string]*zcl.Attribute, zcl.Diagnostics) {
|
||||
attrs := make(map[string]*zcl.Attribute)
|
||||
for name, jsonAttr := range b.obj.Attrs {
|
||||
if _, hidden := b.hiddenAttrs[name]; hidden {
|
||||
continue
|
||||
}
|
||||
attrs[name] = &zcl.Attribute{
|
||||
Name: name,
|
||||
Expr: &expression{src: jsonAttr.Value},
|
||||
|
Loading…
Reference in New Issue
Block a user