@@ -6,12 +6,12 @@ class Openapi {
6
6
/// Additional properties to pass to the compiler (CSV)
7
7
///
8
8
/// --additional-properties
9
- final AdditionalProperties additionalProperties;
9
+ final AdditionalProperties ? additionalProperties;
10
10
11
11
/// The package of the api. defaults to lib.api
12
12
///
13
13
/// --api-package
14
- final String apiPackage;
14
+ final String ? apiPackage;
15
15
16
16
/// relative path or url to spec file
17
17
///
@@ -21,7 +21,7 @@ class Openapi {
21
21
/// folder containing the template files
22
22
///
23
23
/// -t
24
- final String templateDirectory;
24
+ final String ? templateDirectory;
25
25
26
26
/// Generator to use (dart|dart2-api|dart-jaguar|dart-dio)
27
27
///
@@ -31,45 +31,45 @@ class Openapi {
31
31
/// Where to write the generated files (current dir by default)
32
32
///
33
33
/// -o, --output
34
- final String outputDirectory;
34
+ final String ? outputDirectory;
35
35
36
36
/// Specifies if the existing files should be overwritten during the generation
37
37
///
38
38
/// -s, --skip-overwrite
39
- final bool overwriteExistingFiles;
39
+ final bool ? overwriteExistingFiles;
40
40
41
41
/// Skips the default behavior of validating an input specification.
42
42
///
43
43
/// --skip-validate-spec
44
- final bool skipSpecValidation;
44
+ final bool ? skipSpecValidation;
45
45
46
46
/// Add reserver words mappings as reservedWord=replacement format.
47
47
/// It is supported by the dart2-api and dart-dio generator.
48
48
///
49
49
/// --reserved-words-mappings
50
- final Map <String , String > reservedWordsMappings;
50
+ final Map <String , String >? reservedWordsMappings;
51
51
52
52
/// Tells openapi-generator to always run during the build process
53
53
/// if set to false (the default), openapi-generator will skip processing if the [outputDirectory] already exists
54
- final bool alwaysRun;
54
+ final bool ? alwaysRun;
55
55
56
56
/// if set to true, flutter pub get will be run on the [outputDirectory] after the code has been generated.
57
57
/// Defaults to true for backwards compatibility
58
- final bool fetchDependencies;
58
+ final bool ? fetchDependencies;
59
59
60
60
///if set to true, source gen will be run on the output of openapi-generator
61
61
///Defaults to true
62
- final bool runSourceGenOnOutput;
62
+ final bool ? runSourceGenOnOutput;
63
63
64
- final Map <String , String > typeMappings;
64
+ final Map <String , String >? typeMappings;
65
65
66
66
const Openapi (
67
67
{this .additionalProperties,
68
68
this .overwriteExistingFiles,
69
69
this .skipSpecValidation = false ,
70
- this .inputSpecFile,
70
+ required this .inputSpecFile,
71
71
this .templateDirectory,
72
- this .generatorName,
72
+ required this .generatorName,
73
73
this .outputDirectory,
74
74
this .typeMappings,
75
75
this .reservedWordsMappings,
@@ -81,53 +81,52 @@ class Openapi {
81
81
82
82
class AdditionalProperties {
83
83
/// toggles whether unicode identifiers are allowed in names or not, default is false
84
- final bool allowUnicodeIdentifiers;
84
+ final bool ? allowUnicodeIdentifiers;
85
85
86
86
/// Whether to ensure parameter names are unique in an operation (rename parameters that are not).
87
- final bool ensureUniqueParams;
87
+ final bool ? ensureUniqueParams;
88
88
89
89
/// Add form or body parameters to the beginning of the parameter list.
90
- final bool prependFormOrBodyParameters;
90
+ final bool ? prependFormOrBodyParameters;
91
91
92
92
/// Author name in generated pubspec
93
- final String pubAuthor;
93
+ final String ? pubAuthor;
94
94
95
95
/// Email address of the author in generated pubspec
96
- final String pubAuthorEmail;
96
+ final String ? pubAuthorEmail;
97
97
98
98
/// Description in generated pubspec
99
- final String pubDescription;
99
+ final String ? pubDescription;
100
100
101
101
/// Homepage in generated pubspec
102
- final String pubHomepage;
102
+ final String ? pubHomepage;
103
103
104
104
/// Name in generated pubspec
105
- final String pubName;
105
+ final String ? pubName;
106
106
107
107
/// Version in generated pubspec
108
- final String pubVersion;
108
+ final String ? pubVersion;
109
109
110
110
/// Sort model properties to place required parameters before optional parameters.
111
- final bool sortModelPropertiesByRequiredFlag;
111
+ final bool ? sortModelPropertiesByRequiredFlag;
112
112
113
113
/// Sort method arguments to place required parameters before optional parameters.
114
- final bool sortParamsByRequiredFlag;
114
+ final bool ? sortParamsByRequiredFlag;
115
115
116
116
/// Source folder for generated code
117
- final String sourceFolder;
117
+ final String ? sourceFolder;
118
118
119
119
/// Allow the 'x-enum-values' extension for enums
120
- final bool useEnumExtension;
121
-
122
- const AdditionalProperties (
123
- {this .allowUnicodeIdentifiers = false ,
124
- this .ensureUniqueParams = true ,
125
- this .useEnumExtension = false ,
126
- this .prependFormOrBodyParameters = false ,
127
- this .pubAuthor,
128
- this .pubAuthorEmail,
129
- this .pubDescription,
130
- this .pubHomepage,
120
+ final bool ? useEnumExtension;
121
+
122
+ const AdditionalProperties ({this .allowUnicodeIdentifiers = false ,
123
+ this .ensureUniqueParams = true ,
124
+ this .useEnumExtension = false ,
125
+ this .prependFormOrBodyParameters = false ,
126
+ this .pubAuthor,
127
+ this .pubAuthorEmail,
128
+ this .pubDescription,
129
+ this .pubHomepage,
131
130
this .pubName,
132
131
this .pubVersion,
133
132
this .sortModelPropertiesByRequiredFlag = true ,
@@ -137,27 +136,26 @@ class AdditionalProperties {
137
136
138
137
class JaguarProperties extends AdditionalProperties {
139
138
/// Choose serialization format JSON or PROTO is supported
140
- final SerializationFormat serialization;
139
+ final SerializationFormat ? serialization;
141
140
142
141
/// Is the null fields should be in the JSON payload
143
- final bool nullableFields;
144
-
145
- const JaguarProperties (
146
- {this .serialization,
147
- this .nullableFields,
148
- bool allowUnicodeIdentifiers = false ,
149
- bool ensureUniqueParams = true ,
150
- bool prependFormOrBodyParameters = false ,
151
- String pubAuthor,
152
- String pubAuthorEmail,
153
- String pubDescription,
154
- String pubHomepage,
155
- String pubName,
156
- String pubVersion,
157
- bool sortModelPropertiesByRequiredFlag = true ,
158
- bool sortParamsByRequiredFlag = true ,
159
- bool useEnumExtension = true ,
160
- String sourceFolder})
142
+ final bool ? nullableFields;
143
+
144
+ const JaguarProperties ({this .serialization,
145
+ this .nullableFields,
146
+ bool allowUnicodeIdentifiers = false ,
147
+ bool ensureUniqueParams = true ,
148
+ bool prependFormOrBodyParameters = false ,
149
+ String ? pubAuthor,
150
+ String ? pubAuthorEmail,
151
+ String ? pubDescription,
152
+ String ? pubHomepage,
153
+ String ? pubName,
154
+ String ? pubVersion,
155
+ bool sortModelPropertiesByRequiredFlag = true ,
156
+ bool sortParamsByRequiredFlag = true ,
157
+ bool useEnumExtension = true ,
158
+ String ? sourceFolder})
161
159
: super (
162
160
allowUnicodeIdentifiers: allowUnicodeIdentifiers,
163
161
ensureUniqueParams: ensureUniqueParams,
@@ -177,27 +175,26 @@ class JaguarProperties extends AdditionalProperties {
177
175
178
176
class DioProperties extends AdditionalProperties {
179
177
/// Choose serialization format JSON or PROTO is supported
180
- final DioDateLibrary dateLibrary;
178
+ final DioDateLibrary ? dateLibrary;
181
179
182
180
/// Is the null fields should be in the JSON payload
183
- final bool nullableFields;
184
-
185
- const DioProperties (
186
- {this .dateLibrary,
187
- this .nullableFields,
188
- bool allowUnicodeIdentifiers = false ,
189
- bool ensureUniqueParams = true ,
190
- bool prependFormOrBodyParameters = false ,
191
- String pubAuthor,
192
- String pubAuthorEmail,
193
- String pubDescription,
194
- String pubHomepage,
195
- String pubName,
196
- String pubVersion,
197
- bool sortModelPropertiesByRequiredFlag = true ,
198
- bool sortParamsByRequiredFlag = true ,
199
- bool useEnumExtension = true ,
200
- String sourceFolder})
181
+ final bool ? nullableFields;
182
+
183
+ const DioProperties ({this .dateLibrary,
184
+ this .nullableFields,
185
+ bool allowUnicodeIdentifiers = false ,
186
+ bool ensureUniqueParams = true ,
187
+ bool prependFormOrBodyParameters = false ,
188
+ String ? pubAuthor,
189
+ String ? pubAuthorEmail,
190
+ String ? pubDescription,
191
+ String ? pubHomepage,
192
+ String ? pubName,
193
+ String ? pubVersion,
194
+ bool sortModelPropertiesByRequiredFlag = true ,
195
+ bool sortParamsByRequiredFlag = true ,
196
+ bool useEnumExtension = true ,
197
+ String ? sourceFolder})
201
198
: super (
202
199
allowUnicodeIdentifiers: allowUnicodeIdentifiers,
203
200
ensureUniqueParams: ensureUniqueParams,
0 commit comments