MCPcopy Create free account
hub / github.com/github/gh-aw / buildFallbackSchemaValidationError

Function buildFallbackSchemaValidationError

pkg/parser/schema_compiler.go:473–480  ·  view source on GitHub ↗
(errorMsg, schemaJSON, filePath string, ctx frontmatterContextData)

Source from the content-addressed store, hash-verified

471}
472
473func buildFallbackSchemaValidationError(errorMsg, schemaJSON, filePath string, ctx frontmatterContextData) error {
474 message := rewriteAdditionalPropertiesError(errorMsg)
475 suggestions := generateSchemaBasedSuggestions(schemaJSON, errorMsg, "", ctx.frontmatterContent)
476 if suggestions != "" {
477 message = message + ". " + suggestions
478 }
479 return formatCompilerErrorWithLocation(filePath, ctx.frontmatterStart, 1, message, ctx.contextLines)
480}
481
482// formatSchemaFailureDetail builds a single line of schema error detail for one JSONPathInfo.
483// It is called once per failing schema constraint in validateWithSchemaAndLocation, which

Callers 1

Tested by

no test coverage detected