Skip to content

Commit c19b2c0

Browse files
committed
Merge branch 'dev-nullsafety'
# Conflicts: # README.md # openapi-generator-annotations/CHANGELOG.md # openapi-generator-annotations/pubspec.yaml # openapi-generator-cli/CHANGELOG.md # openapi-generator-cli/lib/openapi-generator.jar # openapi-generator-cli/pubspec.yaml # openapi-generator/CHANGELOG.md # openapi-generator/lib/src/openapi_generator_runner.dart # openapi-generator/pubspec.yaml
2 parents 357c9c6 + 8ac9eec commit c19b2c0

File tree

10 files changed

+96
-80
lines changed

10 files changed

+96
-80
lines changed

openapi-generator-annotations/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.0.0-nullsafety.1
2+
3+
- Bumped generator version to 5.0.0. This has some breaking changes. [Click here](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.0.0) to view changes
4+
- bumped null safety
15
## 2.2.0
26

37
- Added support for flutter wrappers
@@ -7,6 +11,10 @@
711

812
- Bumped generator version to 5.0.0. This has some breaking changes. [Click here](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.0.0) to view changes
913

14+
## 2.0.0-nullsafety.0
15+
16+
- Added null safety
17+
1018
## 1.1.4
1119

1220
- Updated dart_2 api to version 3.10

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

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ class Openapi {
66
/// Additional properties to pass to the compiler (CSV)
77
///
88
/// --additional-properties
9-
final AdditionalProperties additionalProperties;
9+
final AdditionalProperties? additionalProperties;
1010

1111
/// The package of the api. defaults to lib.api
1212
///
1313
/// --api-package
14-
final String apiPackage;
14+
final String? apiPackage;
1515

1616
/// relative path or url to spec file
1717
///
@@ -21,7 +21,7 @@ class Openapi {
2121
/// folder containing the template files
2222
///
2323
/// -t
24-
final String templateDirectory;
24+
final String? templateDirectory;
2525

2626
/// Generator to use (dart|dart2-api|dart-jaguar|dart-dio)
2727
///
@@ -31,45 +31,45 @@ class Openapi {
3131
/// Where to write the generated files (current dir by default)
3232
///
3333
/// -o, --output
34-
final String outputDirectory;
34+
final String? outputDirectory;
3535

3636
/// Specifies if the existing files should be overwritten during the generation
3737
///
3838
/// -s, --skip-overwrite
39-
final bool overwriteExistingFiles;
39+
final bool? overwriteExistingFiles;
4040

4141
/// Skips the default behavior of validating an input specification.
4242
///
4343
/// --skip-validate-spec
44-
final bool skipSpecValidation;
44+
final bool? skipSpecValidation;
4545

4646
/// Add reserver words mappings as reservedWord=replacement format.
4747
/// It is supported by the dart2-api and dart-dio generator.
4848
///
4949
/// --reserved-words-mappings
50-
final Map<String, String> reservedWordsMappings;
50+
final Map<String, String>? reservedWordsMappings;
5151

5252
/// Tells openapi-generator to always run during the build process
5353
/// if set to false (the default), openapi-generator will skip processing if the [outputDirectory] already exists
54-
final bool alwaysRun;
54+
final bool? alwaysRun;
5555

5656
/// if set to true, flutter pub get will be run on the [outputDirectory] after the code has been generated.
5757
/// Defaults to true for backwards compatibility
58-
final bool fetchDependencies;
58+
final bool? fetchDependencies;
5959

6060
///if set to true, source gen will be run on the output of openapi-generator
6161
///Defaults to true
62-
final bool runSourceGenOnOutput;
62+
final bool? runSourceGenOnOutput;
6363

64-
final Map<String, String> typeMappings;
64+
final Map<String, String>? typeMappings;
6565

6666
const Openapi(
6767
{this.additionalProperties,
6868
this.overwriteExistingFiles,
6969
this.skipSpecValidation = false,
70-
this.inputSpecFile,
70+
required this.inputSpecFile,
7171
this.templateDirectory,
72-
this.generatorName,
72+
required this.generatorName,
7373
this.outputDirectory,
7474
this.typeMappings,
7575
this.reservedWordsMappings,
@@ -81,43 +81,43 @@ class Openapi {
8181

8282
class AdditionalProperties {
8383
/// toggles whether unicode identifiers are allowed in names or not, default is false
84-
final bool allowUnicodeIdentifiers;
84+
final bool? allowUnicodeIdentifiers;
8585

8686
/// Whether to ensure parameter names are unique in an operation (rename parameters that are not).
87-
final bool ensureUniqueParams;
87+
final bool? ensureUniqueParams;
8888

8989
/// Add form or body parameters to the beginning of the parameter list.
90-
final bool prependFormOrBodyParameters;
90+
final bool? prependFormOrBodyParameters;
9191

9292
/// Author name in generated pubspec
93-
final String pubAuthor;
93+
final String? pubAuthor;
9494

9595
/// Email address of the author in generated pubspec
96-
final String pubAuthorEmail;
96+
final String? pubAuthorEmail;
9797

9898
/// Description in generated pubspec
99-
final String pubDescription;
99+
final String? pubDescription;
100100

101101
/// Homepage in generated pubspec
102-
final String pubHomepage;
102+
final String? pubHomepage;
103103

104104
/// Name in generated pubspec
105-
final String pubName;
105+
final String? pubName;
106106

107107
/// Version in generated pubspec
108-
final String pubVersion;
108+
final String? pubVersion;
109109

110110
/// Sort model properties to place required parameters before optional parameters.
111-
final bool sortModelPropertiesByRequiredFlag;
111+
final bool? sortModelPropertiesByRequiredFlag;
112112

113113
/// Sort method arguments to place required parameters before optional parameters.
114-
final bool sortParamsByRequiredFlag;
114+
final bool? sortParamsByRequiredFlag;
115115

116116
/// Source folder for generated code
117-
final String sourceFolder;
117+
final String? sourceFolder;
118118

119119
/// Allow the 'x-enum-values' extension for enums
120-
final bool useEnumExtension;
120+
final bool? useEnumExtension;
121121

122122
/// Flutter wrapper to use (none|flutterw|fvm)
123123
final Wrapper wrapper;
@@ -157,27 +157,27 @@ class AdditionalProperties {
157157

158158
class JaguarProperties extends AdditionalProperties {
159159
/// Choose serialization format JSON or PROTO is supported
160-
final SerializationFormat serialization;
160+
final SerializationFormat? serialization;
161161

162162
/// Is the null fields should be in the JSON payload
163-
final bool nullableFields;
163+
final bool? nullableFields;
164164

165165
const JaguarProperties(
166166
{this.serialization,
167167
this.nullableFields,
168168
bool allowUnicodeIdentifiers = false,
169169
bool ensureUniqueParams = true,
170170
bool prependFormOrBodyParameters = false,
171-
String pubAuthor,
172-
String pubAuthorEmail,
173-
String pubDescription,
174-
String pubHomepage,
175-
String pubName,
176-
String pubVersion,
171+
String? pubAuthor,
172+
String? pubAuthorEmail,
173+
String? pubDescription,
174+
String? pubHomepage,
175+
String? pubName,
176+
String? pubVersion,
177177
bool sortModelPropertiesByRequiredFlag = true,
178178
bool sortParamsByRequiredFlag = true,
179179
bool useEnumExtension = true,
180-
String sourceFolder})
180+
String? sourceFolder})
181181
: super(
182182
allowUnicodeIdentifiers: allowUnicodeIdentifiers,
183183
ensureUniqueParams: ensureUniqueParams,
@@ -197,27 +197,27 @@ class JaguarProperties extends AdditionalProperties {
197197

198198
class DioProperties extends AdditionalProperties {
199199
/// Choose serialization format JSON or PROTO is supported
200-
final DioDateLibrary dateLibrary;
200+
final DioDateLibrary? dateLibrary;
201201

202202
/// Is the null fields should be in the JSON payload
203-
final bool nullableFields;
203+
final bool? nullableFields;
204204

205205
const DioProperties(
206206
{this.dateLibrary,
207207
this.nullableFields,
208208
bool allowUnicodeIdentifiers = false,
209209
bool ensureUniqueParams = true,
210210
bool prependFormOrBodyParameters = false,
211-
String pubAuthor,
212-
String pubAuthorEmail,
213-
String pubDescription,
214-
String pubHomepage,
215-
String pubName,
216-
String pubVersion,
211+
String? pubAuthor,
212+
String? pubAuthorEmail,
213+
String? pubDescription,
214+
String? pubHomepage,
215+
String? pubName,
216+
String? pubVersion,
217217
bool sortModelPropertiesByRequiredFlag = true,
218218
bool sortParamsByRequiredFlag = true,
219219
bool useEnumExtension = true,
220-
String sourceFolder})
220+
String? sourceFolder})
221221
: super(
222222
allowUnicodeIdentifiers: allowUnicodeIdentifiers,
223223
ensureUniqueParams: ensureUniqueParams,

openapi-generator-annotations/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ homepage: https://github.com/gibahjoe/openapi-generator-dart
55

66

77
environment:
8-
sdk: '>=2.7.0 <3.0.0'
8+
sdk: '>=2.12.0-133.2.beta <3.0.0'
99

1010
dev_dependencies:
11-
pedantic: ^1.9.2
12-
test: ^1.15.7
11+
pedantic: ^1.10.0-nullsafety.3
12+
test: ^1.16.0-nullsafety.13

openapi-generator-cli/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
## 2.2.0
22

33
- Bumped dart-ogurets generator to 4.1 with [breaking changes](https://github.com/dart-ogurets/dart-openapi-maven#changelog)
4+
## 3.0.0-nullsafety.1
5+
6+
- Bumped null safety version
47

58
## 2.0.0
69

710
- Bumped generator version to 5.0.0. This has some breaking changes. [Click here](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.0.0) to view changes
811

12+
## 2.0.0-nullsafety.0
13+
14+
- Added null safety
15+
916
## 1.1.4
1017

1118
- Updated dart_2 api to version 3.10

openapi-generator-cli/bin/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ void main(List<String> arguments) async {
66
exitCode = 0; // presume success
77

88
var binPath = (await Isolate.resolvePackageUri(
9-
Uri.parse('package:openapi_generator_cli/openapi-generator.jar')))
9+
Uri.parse('package:openapi_generator_cli/openapi-generator.jar')))!
1010
.toFilePath(windows: Platform.isWindows);
1111
var JAVA_OPTS = Platform.environment['JAVA_OPTS'] ?? '';
1212

openapi-generator-cli/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ version: 2.2.0
44
homepage: https://github.com/gibahjoe/openapi-generator-dart
55

66
environment:
7-
sdk: '>=2.7.0 <3.0.0'
7+
sdk: '>=2.12.0-133.2.beta <3.0.0'
88

99
dev_dependencies:
10-
pedantic: ^1.9.2
11-
test: ^1.15.7
10+
pedantic: ^1.10.0-nullsafety.3
11+
test: ^1.16.0-nullsafety.13
1212

1313
executables:
1414
openapi-generator: main

openapi-generator/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22

33
- Added support for flutter wrappers
44
- Bumped dart-ogurets generator to 4.1 with [breaking changes](https://github.com/dart-ogurets/dart-openapi-maven#changelog)
5+
## 3.0.0-nullsafety.1
6+
7+
- Bumped generator version to 5.0.0. This has some breaking changes. [Click here](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.0.0) to view changes
8+
- bumped null safety
59

610
## 2.0.0
711

812
- Bumped generator version to 5.0.0. This has some breaking changes. [Click here](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.0.0) to view changes
913

14+
## 2.0.0-nullsafety.0
15+
16+
- Migrated to null safety
17+
1018
## 1.1.4
1119

1220
- Updated dart_2 api to version 3.10

0 commit comments

Comments
 (0)