Skip to content

Commit 8ac9eec

Browse files
committed
updated to 3.0.0-nullsafety.1
1 parent c3de19f commit 8ac9eec

File tree

10 files changed

+68
-52
lines changed

10 files changed

+68
-52
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Annotate a dart class with @Openapi() annotation
5858
additionalProperties:
5959
AdditionalProperties(pubName: 'petstore_api', pubAuthor: 'Johnny dep'),
6060
inputSpecFile: 'example/openapi-spec.yaml',
61-
generatorName: Generator.DART2_API,
61+
generatorName: Generator.DART,
6262
outputDirectory: 'api/petstore_api')
6363
class Example extends OpenapiGeneratorConfig {}
6464
```

openapi-generator-annotations/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
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
5+
16
## 2.0.0
27

38
- 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

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

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,15 @@ class AdditionalProperties {
119119
/// Allow the 'x-enum-values' extension for enums
120120
final bool? useEnumExtension;
121121

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,
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,
130131
this.pubName,
131132
this.pubVersion,
132133
this.sortModelPropertiesByRequiredFlag = true,
@@ -141,21 +142,22 @@ class JaguarProperties extends AdditionalProperties {
141142
/// Is the null fields should be in the JSON payload
142143
final bool? nullableFields;
143144

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})
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})
159161
: super(
160162
allowUnicodeIdentifiers: allowUnicodeIdentifiers,
161163
ensureUniqueParams: ensureUniqueParams,
@@ -180,21 +182,22 @@ class DioProperties extends AdditionalProperties {
180182
/// Is the null fields should be in the JSON payload
181183
final bool? nullableFields;
182184

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})
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})
198201
: super(
199202
allowUnicodeIdentifiers: allowUnicodeIdentifiers,
200203
ensureUniqueParams: ensureUniqueParams,

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: 2.0.0-nullsafety.0
3+
version: 3.0.0-nullsafety.1
44
homepage: https://github.com/gibahjoe/openapi-generator-dart
55

66

openapi-generator-cli/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.0.0-nullsafety.1
2+
3+
- Bumped null safety version
4+
15
## 2.0.0
26

37
- 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
0 Bytes
Binary file not shown.

openapi-generator-cli/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: openapi_generator_cli
22
description: A dart wrapper around openapi-generator inspired by the node implementation.
3-
version: 2.0.0-nullsafety.0
3+
version: 3.0.0-nullsafety.1
44
homepage: https://github.com/gibahjoe/openapi-generator-dart
55

66
environment:

openapi-generator/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
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
5+
16
## 2.0.0
27

38
- 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

openapi-generator/lib/src/openapi_generator_runner.dart

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class OpenapiGenerator extends GeneratorForAnnotation<annots.Openapi> {
7070
print('OpenapiGenerator :: [${command.replaceAll(separator, ' ')}]');
7171

7272
var binPath = (await Isolate.resolvePackageUri(Uri.parse(
73-
'package:openapi_generator_cli/openapi-generator.jar')))!
73+
'package:openapi_generator_cli/openapi-generator.jar')))!
7474
.toFilePath(windows: Platform.isWindows);
7575

7676
// Include java environment variables in command
@@ -185,19 +185,18 @@ class OpenapiGenerator extends GeneratorForAnnotation<annots.Openapi> {
185185
var typeMappingsMap = _readFieldValueAsMap(annotation, 'typeMappings', {})!;
186186
if (typeMappingsMap.isNotEmpty) {
187187
command =
188-
'$command$separator--type-mappings=${getMapAsString(typeMappingsMap)}';
188+
'$command$separator--type-mappings=${getMapAsString(typeMappingsMap)}';
189189
}
190190
return command;
191191
}
192192

193193
String appendReservedWordsMappingCommandArgs(
194194
ConstantReader annotation, String command, String separator) {
195195
var reservedWordsMappingsMap =
196-
_readFieldValueAsMap(annotation, 'reservedWordsMappings', {})!;
196+
_readFieldValueAsMap(annotation, 'reservedWordsMappings', {})!;
197197
if (reservedWordsMappingsMap.isNotEmpty) {
198198
command =
199-
'$command$separator--reserved-words-mappings=${getMapAsString(
200-
reservedWordsMappingsMap)}';
199+
'$command$separator--reserved-words-mappings=${getMapAsString(reservedWordsMappingsMap)}';
201200
}
202201
return command;
203202
}
@@ -227,7 +226,7 @@ class OpenapiGenerator extends GeneratorForAnnotation<annots.Openapi> {
227226
String appendTemplateDirCommandArgs(
228227
ConstantReader annotation, String command, String separator) {
229228
var templateDir =
230-
_readFieldValueAsString(annotation, 'templateDirectory', '')!;
229+
_readFieldValueAsString(annotation, 'templateDirectory', '')!;
231230
if (templateDir.isNotEmpty) {
232231
command = '$command$separator-t$separator${templateDir}';
233232
}
@@ -246,7 +245,7 @@ class OpenapiGenerator extends GeneratorForAnnotation<annots.Openapi> {
246245
String appendSkipValidateSpecCommandArgs(
247246
ConstantReader annotation, String command, String separator) {
248247
var skipSpecValidation =
249-
_readFieldValueAsBool(annotation, 'skipSpecValidation', false)!;
248+
_readFieldValueAsBool(annotation, 'skipSpecValidation', false)!;
250249
if (skipSpecValidation) {
251250
command = '$command$separator--skip-validate-spec';
252251
}
@@ -256,7 +255,7 @@ class OpenapiGenerator extends GeneratorForAnnotation<annots.Openapi> {
256255
String getMapAsString(Map<dynamic, dynamic> data) {
257256
return data.entries
258257
.map((entry) =>
259-
'${entry.key.toStringValue()}=${entry.value.toStringValue()}')
258+
'${entry.key.toStringValue()}=${entry.value.toStringValue()}')
260259
.join(',');
261260
}
262261

openapi-generator/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: openapi_generator
22
description: Generator for openapi client sdk inspired by the npm impplementation of openapi-generator-cli.
3-
version: 2.0.0-nullsafety.0
3+
version: 3.0.0-nullsafety.1
44
homepage: https://github.com/gibahjoe/openapi-generator-dart
55

66
environment:
@@ -10,9 +10,9 @@ dependencies:
1010
build: '>=0.12.6 <2.0.0'
1111
source_gen: ^0.9.10+1
1212
path: ^1.8.0-nullsafety.3
13-
openapi_generator_annotations: ^2.0.0-nullsafety.0
13+
openapi_generator_annotations: ^3.0.0-nullsafety.1
1414
analyzer: '>=0.40.6 <0.42.0'
15-
openapi_generator_cli: ^2.0.0-nullsafety.0
15+
openapi_generator_cli: ^3.0.0-nullsafety.1
1616

1717
dev_dependencies:
1818
pedantic: ^1.10.0-nullsafety.3

0 commit comments

Comments
 (0)