@@ -84,6 +84,13 @@ class Openapi {
8484 /// --type-mappings
8585 final Map <String , String >? typeMappings;
8686
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+
8794 /// specifies mappings between a given class and the import that should
8895 /// be used for that class in the format of type=import,type=import. You
8996 /// can also have multiple occurrences of this option.
@@ -129,6 +136,7 @@ class Openapi {
129136 this .outputDirectory,
130137 this .cleanSubOutputDirectory,
131138 this .typeMappings,
139+ this .nameMappings,
132140 this .importMappings,
133141 this .reservedWordsMappings,
134142 this .inlineSchemaNameMappings,
@@ -532,14 +540,6 @@ class DioProperties extends AdditionalProperties {
532540}
533541
534542class 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-
543543 /// This will turn off AnyOf support. This would be a bit weird, but you can do it if you want.
544544 final bool ? listAnyOf;
545545
@@ -552,9 +552,7 @@ class DioAltProperties extends AdditionalProperties {
552552 final String ? pubspecDevDependencies;
553553
554554 const DioAltProperties (
555- {this .nullSafe,
556- this .nullSafeArrayDefault,
557- this .pubspecDependencies,
555+ {this .pubspecDependencies,
558556 this .pubspecDevDependencies,
559557 this .listAnyOf,
560558 bool allowUnicodeIdentifiers = false ,
@@ -591,18 +589,13 @@ class DioAltProperties extends AdditionalProperties {
591589 wrapper: wrapper);
592590
593591 DioAltProperties .fromMap (Map <String , dynamic > map)
594- : nullSafe = map['nullSafe' ],
595- nullSafeArrayDefault = map['nullSafeArrayDefault' ],
596- listAnyOf = map['listAnyOf' ],
592+ : listAnyOf = map['listAnyOf' ],
597593 pubspecDependencies = map['pubspecDependencies' ],
598594 pubspecDevDependencies = map['pubspecDevDependencies' ],
599595 super .fromMap (map);
600596
601597 Map <String , dynamic > toMap () => Map .from (super .toMap ())
602598 ..addAll ({
603- if (nullSafe != null ) 'nullSafe' : nullSafe,
604- if (nullSafeArrayDefault != null )
605- 'nullSafeArrayDefault' : nullSafeArrayDefault,
606599 if (listAnyOf != null ) 'listAnyOf' : listAnyOf,
607600 if (pubspecDependencies != null )
608601 'pubspecDependencies' : pubspecDependencies,
0 commit comments