Skip to content

Commit 5bfd0c5

Browse files
committed
add support for serialization lib in dio
1 parent f269f1d commit 5bfd0c5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

openapi-generator-annotations/lib/src/openapi_generator_annotations_base.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,15 @@ class JaguarProperties extends AdditionalProperties {
216216
class DioProperties extends AdditionalProperties {
217217
/// Choose serialization format JSON or PROTO is supported
218218
final DioDateLibrary? dateLibrary;
219+
final DioSerializationLibrary? serializationLibrary;
219220

220221
/// Is the null fields should be in the JSON payload
221222
final bool? nullableFields;
222223

223224
const DioProperties(
224225
{this.dateLibrary,
225226
this.nullableFields,
227+
this.serializationLibrary,
226228
bool allowUnicodeIdentifiers = false,
227229
bool ensureUniqueParams = true,
228230
bool prependFormOrBodyParameters = false,
@@ -318,6 +320,8 @@ enum DioDateLibrary {
318320
timemachine
319321
}
320322

323+
enum DioSerializationLibrary { built_value, json_serializable }
324+
321325
enum SerializationFormat { JSON, PROTO }
322326

323327
/// The name of the generator to use

openapi-generator-annotations/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: openapi_generator_annotations
22
description: Annotation package for openapi_generator https://pub.dev/packages/openapi_generator.
3-
version: 4.0.0
3+
version: 4.1.0
44
homepage: https://github.com/gibahjoe/openapi-generator-dart
55

66

0 commit comments

Comments
 (0)