smart_api_errors_parser 1.0.0
smart_api_errors_parser: ^1.0.0 copied to clipboard
Maps inconsistent API error payloads into typed exceptions, form errors, and localized messages.
Changelog #
1.0.0 #
- Added a rich
ApiDecodedResponsemodel with separate HTTP/body statuses, Problem Details metadata, request/trace IDs, Retry-After data, selected decoder/schema, and parse warnings. - Replaced first-match automatic decoding with deterministic confidence scoring and ambiguity diagnostics.
- Added GraphQL, OAuth 2.0, Spring Boot, Rails ActiveModel, and Firebase callable decoders.
- Added composable field transforms for aliases, indexes, prefixes, case conversion, and JSON pointers.
- Added sourced Laravel, Django REST Framework, ASP.NET, and JSON:API fixtures.
- Added deterministic fuzz tests and bounded parsing for malformed and deeply nested payloads.
- Preserved compatibility with existing custom
ApiErrorDecoderimplementations.
0.2.0 #
- Added pluggable
ApiErrorDecoderarchitecture. - Added automatic RFC 9457 Problem Details and ASP.NET validation decoding.
- Added automatic JSON:API and Django REST Framework decoding.
- Preserved Laravel nested maps and details-list compatibility.
- Added configurable field-path normalization with JSON-pointer helpers.
- Added configurable
ApiExceptionClassifierandApiExceptionFactory. - Made
ApiExceptionextensible for application-defined exception types. - Moved Dio APIs to dedicated
smart_api_errors_parser_dio.dartentrypoint. - Expanded Flutter example to demonstrate all built-in response formats.
0.1.1 #
- Fixed exception classification so authoritative HTTP statuses take priority over field-shaped payloads.
- Preserved cancelled Dio requests as
DioExceptionvalues. - Added safe fallback when localization returns an empty message.
- Improved malformed-payload handling and string normalization.
- Enhanced
ApiErrorMessage.copyWithwith nullable-field clearing and argument replacement. - Added regression coverage for status classification, cancellation, timeout, coded nested messages, malformed payloads, and localization fallback.
- Expanded public API documentation and added CI validation.
0.1.0 #
- Added API error normalization with automatic schema detection.
- Added field-level, global, and localized error messages.
- Added typed API exceptions and Dio integration.
- Added custom response parser support.
- Added mapper and interceptor test coverage.
- Added complete runnable Flutter example app.
- Added Android, iOS, web, macOS, Windows, and Linux runners.
- Demonstrated nested-map and details-list responses in interactive form.
- Demonstrated Dio interception, typed exceptions, localization, and field errors.
- Added widget tests for validation-error and successful-registration flows.
- Expanded package and example documentation.