(path string, raw json.RawMessage)
| 325 | } |
| 326 | |
| 327 | func 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 | |
| 340 | func schemaTypes(raw json.RawMessage) ([]string, error) { |
| 341 | if len(bytes.TrimSpace(raw)) == 0 { |
no test coverage detected