Smart schema validation
How DiffMon classifies API diffs into schema vs value changes, with severity, fingerprints, and troubleshooting.
Smart schema validation
Smart schema validation (SSV) helps you separate real API contract drift from normal value churn.
Plan availability: Pro and above.
Instead of only saying "hash changed", DiffMon classifies JSON changes into:
schema_change(shape/type drift)value_change(content changed, shape stable)mixed(both)
When SSV runs
SSV runs automatically when all of these are true:
- Monitor target type is
api. - Fetch mode is
content. - Response body can be parsed as JSON.
- JSON select/ignore rules are applied first.
If these conditions are not met, DiffMon falls back to legacy hash diffing.
What users see in the app
On monitor history and incidents, you get:
- classification badge (
schema_change,value_change,mixed,unchanged) - schema hash transition (
fromSchemaHash -> toSchemaHash) - schema/value change counters
- top changed JSON paths
- per-change severity (
critical,high,medium,info)
This helps triage quickly:
- prioritize
schema_changeandmixed - treat
value_changeas lower-risk unless business-critical
Severity model
SSV emits severity on every change record:
| Category | Operation | Severity |
|---|---|---|
schema | replace | critical |
schema | remove | high |
schema | add | medium |
value | replace | info |
value | add / remove | info |
Webhook behavior
For diff.detected, webhook payloads include:
diff_summarywithclassification,schema_changes,value_changeschanges[]withpath,category,op,severitydiff_fingerprintfor dedupe/grouping
This allows stable downstream routing and automation without re-implementing diff logic.
Configuration best practices
- Keep API monitors on
contentmode when you need contract drift detection. - Use
selectJsonPathsto focus monitoring on a stable subset (for example, onlydata.items). - Use
ignoreJsonPathsfor known volatile fields (timestamps, IDs, rotating tokens). - Review top changed paths before broadening ignore rules.
Troubleshooting
Common monitor errors/warnings you may see:
| Code | Meaning | Action |
|---|---|---|
SELECT_RULES_INVALID_JSON_PATH | Invalid select JSON path syntax | Fix selectJsonPaths format |
IGNORE_RULES_INVALID_JSON_PATH | Invalid ignore JSON path syntax | Fix ignoreJsonPaths format |
SELECT_RULES_INVALID_JSON | Response is not valid JSON while select rules are configured | Verify endpoint response format |
IGNORE_RULES_INVALID_JSON | Response is not valid JSON while ignore rules are configured | Verify endpoint response format |
SELECT_OR_IGNORE_RULES_INVALID_JSON | Response is not valid JSON while both rule sets are configured | Verify endpoint response format |
UNEXPECTED_MIME | Response format does not match expected type and body is not parseable as JSON | Check upstream response/content type |
mime_mismatch_json (warning) | Body parsed as JSON, but Content-Type is not JSON | Ask provider to fix content-type header |
schema_analysis_failed (warning) | Schema extraction failed; hash diff still available | Check payload shape and logs, then retry |