MCPcopy Create free account
hub / github.com/compozy/agh / validateJSONSchemaDocumentArray

Function validateJSONSchemaDocumentArray

internal/tools/schema.go:327–338  ·  view source on GitHub ↗
(path string, raw json.RawMessage)

Source from the content-addressed store, hash-verified

325}
326
327func validateJSONSchemaDocumentArray(path string, raw json.RawMessage) error {
328 nodes, err := schemaNodeArray(raw)
329 if err != nil {
330 return fmt.Errorf("%s: %w", path, err)
331 }
332 for idx, node := range nodes {
333 if err := validateJSONSchemaDocument(fmt.Sprintf("%s[%d]", path, idx), node); err != nil {
334 return err
335 }
336 }
337 return nil
338}
339
340func schemaTypes(raw json.RawMessage) ([]string, error) {
341 if len(bytes.TrimSpace(raw)) == 0 {

Callers 1

Calls 2

schemaNodeArrayFunction · 0.85

Tested by

no test coverage detected