NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #1527 most downloaded on pub.dev
Package that generates REST clients and data classes from OpenApi definition file
Last release 13 days ago
25 Sep 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
151 releases · first in 2022
One column per quarter.
Adds freezed_json_serialization (default true ) to generate Freezed models without .g.dart and fromJson when JSON serialization is not needed. Existin
freezed_json_serialization (default true) to generate Freezed models.g.dart and fromJson when JSON serialization is not needed.Fixes infer_required_from_nullable treating OpenAPI 3.1 type lists containing "null" as non-nullable, which generated them as required T? ( #472 ).
infer_required_from_nullable treating OpenAPI 3.1 type lists containing "null"required T?Fixes schema filtering for component schemas referenced by endpoint parameters ( #470 ).
Fixes dart_mappable enum generation for JSON Schema type lists by quoting non-numeric JSON values ( #468 ).
dart_mappable enum generation for JSON Schema type lists by quotingAdd preserve_schema_casing option to preserve original casing of schema-derived identifiers, defaults to false for backwards compatibility, which norm
preserve_schema_casing option to preserve original casing of schema-derived identifiers, defaults to false for backwards compatibility, which normalises to PascalCasemultipart/form-data request body references a schema without propertiesallOf, oneOf, and anyOf schemas with sibling nullable: truepreserve_schema_casing option to preserve original casing of schema-derived identifiers,
defaults to false for backwards compatibility, which normalises to PascalCase.multipart/form-datarequest body references a schema withoutproperties.allOf, oneOf, and anyOf schemas with sibling
nullable: true.Fix escaping $unknown in generated enum toJson error messages
$unknown in generated enum toJson error messagesjson_serializabledart_mappable$unknownin generated enumtoJson error messages.json_serializable.dart_mappable.Allow standard dart_mappable serializer method naming convention
Fix preserve property names and required modifiers in properties blocks
Add field_parsers option for setting field parsers for JSON serializable
field_parsers option for setting field parsers for JSON serializablefield_parsers option for setting field parsers for JSON serializable.Add include_paths option for filtering endpoints by paths
include_paths option for filtering endpoints by pathsgenerate_urls_constants option for generating URL constants for all endpointsinclude_paths option for filtering endpoints by paths.generate_urls_constants option for generating URL constants for all endpoints.Fixes client methods returning ModelNameUnioninstead ofModelNameSealed for oneOf types (#393).
ModelNameUnioninstead ofModelNameSealed for oneOf types
(#393).Handle request body name generation case when request body is declared within request
Add replacement_rules_for_raw_schema option for raw schema objects replacement rules
replacement_rules_for_raw_schema option for raw schema objects replacement rulesFixes missing import for MultipartFile(#408).
components.responses.Add use_flutter_compute option for Flutter isolate-based multithreading support
use_flutter_compute option for Flutter isolate-based multithreading support
@RestApi(parser: Parser.FlutterCompute) annotation in Retrofit clientsswagger_parser:
use_flutter_compute: trueAdds add_openapi_metadata(defaultfalse) to generate OpenAPI tags, operationId, and externalDocsUrlconstants for each endpoint; whenextras_parameter_by
add_openapi_metadata(defaultfalse) to generate OpenAPI tags, operationId, and
externalDocsUrlconstants for each endpoint; whenextras_parameter_by_defaultistrue, the
metadata is also prefilled into Dio extras—handy for interceptors and logging without
overwriting user-supplied extras.BannerApi.findAllBannersOpenapiExtras) so
generated implementations can access the static metadata constants.swagger_parser:
extras_parameter_by_default: true
add_openapi_metadata: true
abstract class PetsClient {
static const Map<String, dynamic> listPetsOpenapiExtras =
<String, dynamic>{
'openapi': <String, dynamic>{
'tags': <String>['pets'],
'operationId': 'listPets',
'externalDocsUrl': 'https://docs.example.com/pets',
},
};
@GET('/pets')
Future<void> listPets({
// defaults to the OpenAPI metadata; merge with your own extras if needed
@Extras() Map<String, dynamic>? extras =
PetsClient.listPetsOpenapiExtras,
@DioOptions() RequestOptions? options,
});
}
# https://openapi.sepc/pets/listPets
Fixes enum name values being an int returned in a toString.
* Fixes enum names generation.
Adds infer_required_from_nullable.
infer_required_from_nullable.infer_required_from_nullable: true
Schema without required array:
- id: type: integer → required int id
- name: type: string → required String name
- desc: type: string, nullable: true → String? desc
Adds includeIfNullhandling, disabled by default; setinclude_if_null: true to enable it.
includeIfNullhandling, disabled by default; setinclude_if_null: true to enable it.* Fixes CHANGELOG duplication.
Adds the @Deprecated()annotation to thewhen andmaybeWhen methods for dart_mappable; use Dart pattern matching instead.
oneOf/anyOf) with the json_serializable
serializer.
oneOf/anyOf) with the dart_mappable serializer.
dart_mappable_convenient_whenoption to control union type generation fordart_mappable
serializer.
dart_mappable_convenient_when: truegenerates legacywhen<T>, maybeWhen<T> methods.dart_mappable_convenient_when: false (default) generates sealed classes for better type
safety.@Deprecated()annotation to thewhen<T>andmaybeWhen<T> methods for
dart_mappable; use Dart pattern matching instead.unknownenum values fordart_mappable when
unknown_enum_value: true is enabled.Fixes resolve inline schemas nested within tagged operations.
Adds support for merging all generated code into single output file using the merge_outputs option.
merge_outputs
option.Adds support for non-discriminated unions (oneOf/anyOf without a discriminator).
oneOf/anyOf without a discriminator).include_tagsorexclude_tags.fallback_client
instead of client.fallback_clientconfiguration to default tofallbackinstead ofdefault to avoid
conflicts with the Dart default keyword in the generated code.SCREAMING_SNAKE_CASE.include_tags is specified.Fixes ensure consistent file naming for tags with alphanumeric suffixes.
Allows filtering generated client endpoints by tags.
Fixes collisions between untagged endpoints and endpoints tagged Client that caused generated clients to overwrite each other.
Client that caused generated
clients to overwrite each other.Aligns default value handling for parameters according to OpenAPi Spec https://swagger.io/docs/specification/v3_0/describing-parameters/#default-param
Adds a toStringoverride fordart_mappable.
toStringoverride fordart_mappable.dart_mappable toJson return a string.Allows using MultipartFileinstead ofFile in multipart requests, to support usage on web.
MultipartFileinstead ofFile in multipart requests, to support usage on web.Adds an enum toString() override that provides a JSON value to third-party consumers such as Retrofit.
toString() override that provides a JSON value to third-party consumers such as
Retrofit.Adds the $valuesDefined getter to filter out unknown values automatically.
$valuesDefined getter to filter out unknown values automatically.Deduplicates property names for allOfschemas that mixrefandproperties, preventing naming overlaps.
allOfschemas that mixrefandproperties, preventing naming
overlaps.Fixes typedeftransparency that causes import errors when generatingjson_serializable classes; see google/json_serializable#1124.
typedeftransparency that causes import errors when generatingjson_serializable
classes; see
google/json_serializable#1124.Removes duplicate parameters in dataclass(#322).
Fixes detection of nullable list with non-null items vs nullable list with nullable items(#323).
Fixes error with client parameters with $(#262).
$(#262).Updates dart_mappable template.
Adds support for allOf composition and xOf (#239).
* Adds supports for freezed 3.
Adds supports oneOf polymorphic types with dart_mappable (#290).
Fixes errors with nullable in enums (#216).
Fixes errors with config(#293, #296).
Adds use_x_nullable parameter to config(#295).
Fixes config properties inheritance with multi-scheme URLs(#293).
Adds support for union types oneOf(#265, #286).
Fixes errors with config parsing.
Adds validation params to generated freezed classes.
freezed classes.Fixes replacement rules for OpenAPI v2(#266).
Fixes generation with anyOf, oneOfandallOf properties(#260).
anyOf, oneOfandallOf
properties(#260).Adds version getter to root client:
final version = RestClient.version;
dio_options_parameter_by_default.Removes support of BigInt in Dart for int64 types.
int64 types.* Adds support for int64 types.
int64 types.Fixes errors with nullable: false.
nullable: false.Handles empty enum value case (#238).
required_by_default config parameter; behavior now matches
required_by_default: false.Fixes unnecessary null types with required_by_default: false.
Adds MappableField to dart_mappable template.
MappableField to dart_mappable template.Fixes error with nullable in multipart (#211).
Adds new config parameter extras_parameter_by_default from retrofit 4.1.0 for (#208).
extras_parameter_by_default from retrofit
4.1.0 for
(#208).Your coding agent can read these notes before it upgrades. Set up the MCP server →