Skip to main content

Module schema_diff

Module schema_diff 

Source
👎Deprecated:

Will be extracted to mockforge-contracts crate

Expand description

Pillars: [Contracts]

JSON schema diff utilities for 422 responses.

This module provides comprehensive schema validation diffing capabilities for generating informative 422 error responses that help developers understand exactly what schema validation issues exist in their API requests.

Structs§

FieldErrorDeprecated
Legacy field error structure for backward compatibility
SchemaInfoDeprecated
Detailed schema constraint information for validation errors
ValidationErrorDeprecated
Enhanced validation error with detailed schema information

Functions§

diffDeprecated
Compute the difference between expected schema and actual JSON value
to_422_jsonDeprecated
Convert validation errors to 422 JSON response format
to_enhanced_422_jsonDeprecated
Generate enhanced 422 error response with detailed schema information
validation_diffDeprecated
Enhanced validation diff with comprehensive error analysis This function performs detailed validation between expected and actual JSON and provides rich schema context for better error reporting