Content returns the content produced by applying the given schema to all of the merged bodies and merging the result. Although required attributes _are_ supported, they should be used sparingly with merged bodies since in this case there is no contextual information with which to return good diagno
(schema *BodySchema)
| 86 | // bodies may wish to mark all attributes as optional and then check for |
| 87 | // required attributes afterwards, to produce better diagnostics. |
| 88 | func (mb mergedBodies) Content(schema *BodySchema) (*BodyContent, Diagnostics) { |
| 89 | // the returned body will always be empty in this case, because mergedContent |
| 90 | // will only ever call Content on the child bodies. |
| 91 | content, _, diags := mb.mergedContent(schema, false) |
| 92 | return content, diags |
| 93 | } |
| 94 | |
| 95 | func (mb mergedBodies) PartialContent(schema *BodySchema) (*BodyContent, Body, Diagnostics) { |
| 96 | return mb.mergedContent(schema, true) |
nothing calls this directly
no test coverage detected