dart_swagger_to_api_client 1.1.1
dart_swagger_to_api_client: ^1.1.1 copied to clipboard
Generate type-safe HTTP API clients from OpenAPI/Swagger specs for Dart and Flutter.
1.1.1 #
Added #
- Response headers support: Added support for response headers from OpenAPI specification
- Automatic parsing of response headers from
responses[statusCode].headersin OpenAPI spec - Generation of
ApiResponse<T>wrapper class when headers are defined - Type-safe access to response headers via
response.headersmap - Support for required and optional headers (nullable types)
- Backward compatibility: methods without headers return data directly (no wrapper)
- Automatic parsing of response headers from
Changed #
- Methods with response headers now return
ApiResponse<T>instead ofTdirectly ApiResponse<T>class provides access to bothdataandheadersfields
1.1.0 #
Added #
- Multiple content types support for requestBody: Added support for multiple content types in requestBody with automatic priority-based selection
- Support for
text/plaincontent type (body type:String) - Support for
text/htmlcontent type (body type:String) - Support for
application/xmlcontent type (body type:Stringfor simple types,Map<String, dynamic>for complex types) - Support for custom content types (fallback to
StringorMap<String, dynamic>) - Priority order for content type selection:
multipart/form-data>application/x-www-form-urlencoded>application/json>text/plain>text/html>application/xml> others
- Support for
Changed #
- Improved requestBody type resolution to handle multiple content types correctly
- Enhanced body serialization logic to support text and XML content types
1.0.0 #
- Initial version.
