@@ -84,6 +84,13 @@ class Openapi {
84
84
/// --type-mappings
85
85
final Map <String , String >? typeMappings;
86
86
87
+ /// sets mappings between OpenAPI spec properties name and generated code
88
+ /// var/param/model in the format of OpenAPIName=generatedName.
89
+ /// For example: update=updatable,_=underscore.
90
+
91
+ /// --name-mappings
92
+ final Map <String , String >? nameMappings;
93
+
87
94
/// specifies mappings between a given class and the import that should
88
95
/// be used for that class in the format of type=import,type=import. You
89
96
/// can also have multiple occurrences of this option.
@@ -129,6 +136,7 @@ class Openapi {
129
136
this .outputDirectory,
130
137
this .cleanSubOutputDirectory,
131
138
this .typeMappings,
139
+ this .nameMappings,
132
140
this .importMappings,
133
141
this .reservedWordsMappings,
134
142
this .inlineSchemaNameMappings,
@@ -532,14 +540,6 @@ class DioProperties extends AdditionalProperties {
532
540
}
533
541
534
542
class DioAltProperties extends AdditionalProperties {
535
- /// Changes the minimum version of Dart to 2.12 and generate null safe code
536
- final bool ? nullSafe;
537
-
538
- /// nullSafe-array-default
539
- /// Makes even arrays that are not listed as being required in your OpenAPI "required"
540
- /// but making them always generate a default value of []
541
- final bool ? nullSafeArrayDefault;
542
-
543
543
/// This will turn off AnyOf support. This would be a bit weird, but you can do it if you want.
544
544
final bool ? listAnyOf;
545
545
@@ -552,9 +552,7 @@ class DioAltProperties extends AdditionalProperties {
552
552
final String ? pubspecDevDependencies;
553
553
554
554
const DioAltProperties (
555
- {this .nullSafe,
556
- this .nullSafeArrayDefault,
557
- this .pubspecDependencies,
555
+ {this .pubspecDependencies,
558
556
this .pubspecDevDependencies,
559
557
this .listAnyOf,
560
558
bool allowUnicodeIdentifiers = false ,
@@ -591,18 +589,13 @@ class DioAltProperties extends AdditionalProperties {
591
589
wrapper: wrapper);
592
590
593
591
DioAltProperties .fromMap (Map <String , dynamic > map)
594
- : nullSafe = map['nullSafe' ],
595
- nullSafeArrayDefault = map['nullSafeArrayDefault' ],
596
- listAnyOf = map['listAnyOf' ],
592
+ : listAnyOf = map['listAnyOf' ],
597
593
pubspecDependencies = map['pubspecDependencies' ],
598
594
pubspecDevDependencies = map['pubspecDevDependencies' ],
599
595
super .fromMap (map);
600
596
601
597
Map <String , dynamic > toMap () => Map .from (super .toMap ())
602
598
..addAll ({
603
- if (nullSafe != null ) 'nullSafe' : nullSafe,
604
- if (nullSafeArrayDefault != null )
605
- 'nullSafeArrayDefault' : nullSafeArrayDefault,
606
599
if (listAnyOf != null ) 'listAnyOf' : listAnyOf,
607
600
if (pubspecDependencies != null )
608
601
'pubspecDependencies' : pubspecDependencies,
0 commit comments