Module schema_diff

Module schema_diff 

Source
Expand description

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§

FieldError
Legacy field error structure for backward compatibility
SchemaInfo
Detailed schema constraint information for validation errors
ValidationError
Enhanced validation error with detailed schema information

Functions§

diff
Compute the difference between expected schema and actual JSON value
to_422_json
Convert validation errors to 422 JSON response format
to_enhanced_422_json
Generate enhanced 422 error response with detailed schema information
validation_diff
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