Skip to content

Releases: Carapacik/swagger_parser

1.42.0

02 Feb 09:36

Choose a tag to compare

  • Support for streaming & SSE
  • Fix preserve property names and required modifiers in properties blocks
  • Fix API path definitions are incorrectly converted to PascalCase

1.41.0

27 Jan 19:56

Choose a tag to compare

  • Add field_parsers option for setting field parsers for JSON serializable

1.40.0

23 Jan 08:21

Choose a tag to compare

  • Add include_paths option for filtering endpoints by paths
  • Add generate_urls_constants option for generating URL constants for all endpoints

1.39.0

18 Jan 19:26

Choose a tag to compare

  • Handle request body name generation case when request body is declared within request
  • Fix incorrect deserialization syntax for undiscriminated unions (Freezed serializer)

1.38.0

14 Jan 18:26

Choose a tag to compare

  • Add replacement_rules_for_raw_schema option for raw schema objects replacement rules

1.37.0

08 Dec 09:36

Choose a tag to compare

  • Add use_flutter_compute option 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
swagger_parser:
  use_flutter_compute: true

1.36.0

03 Dec 12:03

Choose a tag to compare

  • Add add_openapi_metadata (default false) to generate OpenAPI tags, operationId, and externalDocsUrl constants for each endpoint; when extras_parameter_by_default is true, the metadata is also prefilled into Dio extras—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

01 Nov 11:25

Choose a tag to compare

  • 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

1.34.0

18 Oct 16:23
8e041d8

Choose a tag to compare

Add include_if_null (#333)

1.32.1

16 Oct 11:34

Choose a tag to compare

  • Fix CHANGELOG duplication