Releases: Carapacik/swagger_parser
Releases · Carapacik/swagger_parser
1.42.0
1.41.0
1.40.0
1.39.0
1.38.0
1.37.0
- Add
use_flutter_computeoption for Flutter isolate-based multithreading support- Generates
@RestApi(parser: Parser.FlutterCompute)annotation in Retrofit clients - Generates top-level serialization functions in each DTO model file following Retrofit's naming convention
- Works with all serializers: freezed, json_serializable, dart_mappable
- Generates
swagger_parser:
use_flutter_compute: true1.36.0
- Add
add_openapi_metadata(defaultfalse) to generate OpenAPItags,operationId, andexternalDocsUrlconstants for each endpoint; whenextras_parameter_by_defaultistrue, the metadata is also prefilled into Dioextras—handy for interceptors and logging without overwriting user-supplied extras - Use fully-qualified default extras values (e.g.
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
1.35.0
- Add
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
- Fix nullable array item types generation