(errorMsg, schemaJSON, filePath string, ctx frontmatterContextData)
| 471 | } |
| 472 | |
| 473 | func 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 |
no test coverage detected