(schema *hcl.BodySchema)
| 33 | } |
| 34 | |
| 35 | func (b *expandBody) Content(schema *hcl.BodySchema) (*hcl.BodyContent, hcl.Diagnostics) { |
| 36 | extSchema := b.extendSchema(schema) |
| 37 | rawContent, diags := b.original.Content(extSchema) |
| 38 | |
| 39 | blocks, blockDiags := b.expandBlocks(schema, rawContent.Blocks, false) |
| 40 | diags = append(diags, blockDiags...) |
| 41 | attrs := b.prepareAttributes(rawContent.Attributes) |
| 42 | |
| 43 | content := &hcl.BodyContent{ |
| 44 | Attributes: attrs, |
| 45 | Blocks: blocks, |
| 46 | MissingItemRange: b.original.MissingItemRange(), |
| 47 | } |
| 48 | |
| 49 | return content, diags |
| 50 | } |
| 51 | |
| 52 | func (b *expandBody) PartialContent(schema *hcl.BodySchema) (*hcl.BodyContent, hcl.Body, hcl.Diagnostics) { |
| 53 | extSchema := b.extendSchema(schema) |
nothing calls this directly
no test coverage detected