epam-cross-platform-lab / swagger-dart-code-generator

Swagger/OpenAPI code generator based on Chopper and JsonAnnotation for Flutter
Apache License 2.0
261 stars 119 forks source link

Feature: String format type mapping #766

Closed dan3988 closed 2 weeks ago

dan3988 commented 3 weeks ago

Adds the ability to specify custom types & a serialize/deserialize function for properties based on the "format" property.

Implementation of #719

      swagger_dart_code_generator:
        options:
          input_folder: "input_folder/"
          output_folder: "lib/swagger_generated_code/"
          import_paths:
            - "package:uuid/uuid.dart"
          scalars:
            uuid:
              type: Uuid
              deserialize: Uuid.parse
              # optional - default is toString()
              serialize: myCustomUuidSerializeFunction