Skip to content

Commit 15fa1c4

Browse files
authored
Merge pull request #75 from atoka93/v4
Fix enum value retrieval error and update the generator CLI
2 parents 7a25514 + 89b54b7 commit 15fa1c4

File tree

8 files changed

+28
-25
lines changed

8 files changed

+28
-25
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ build/
1111
doc/api/
1212
.idea/vcs.xml
1313
.idea/
14+
15+
# macOS
16+
.DS_Store

example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ void main() {
1313
typeMappings: {
1414
'Pet': 'ExamplePet'
1515
},
16-
generatorName: Generator.dioNext,
16+
generatorName: Generator.dio,
1717
outputDirectory: 'api/petstore_api')
1818
class MyApp extends StatelessWidget {
1919
const MyApp({Key? key}) : super(key: key);

openapi-generator-annotations/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 4.0.0
2+
3+
- **BREAKING CHANGES**
4+
- `dioNext` and `jaguar` generators are removed
5+
6+
- Bumped dart-ogurets (_dioAlt_) generator to 5.13
7+
with [changes](https://github.com/dart-ogurets/dart-openapi-maven#changelog)
8+
- Bumped official openapi generator to 6.0.0.
9+
See [change log](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.0.0)
10+
111
## 3.3.0
212

313
- Bumped dart-ogurets (_dioAlt_) generator to 5.11

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -337,17 +337,5 @@ enum Generator {
337337
///
338338
/// You can read more about it here https://github.com/dart-ogurets/dart-openapi-maven
339339
dioAlt,
340-
341-
/// This uses the next gen dio generator. This is experimental and use at your own risk. It might be removed or renamed in the future
342-
///
343-
/// You can read more about it here https://github.com/OpenAPITools/openapi-generator/pull/8869
344-
dioNext,
345-
346-
/// This generates code based on the jaguar package Source gen is required
347-
/// after generating code with this generator
348-
/// corresponds to dart-jaguar
349-
///
350-
/// An Http Api generator inspired by Retrofit for Dart
351-
jaguar,
352340
}
353341
enum Wrapper { fvm, flutterw, none }

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: 3.3.0
3+
version: 4.0.0
44
homepage: https://github.com/gibahjoe/openapi-generator-dart
55

66

openapi-generator/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 4.0.0
2+
3+
- **BREAKING CHANGES**
4+
- `dioNext` and `jaguar` generators are removed
5+
6+
- Bumped dart-ogurets (_dioAlt_) generator to 5.13
7+
with [changes](https://github.com/dart-ogurets/dart-openapi-maven#changelog)
8+
- Bumped official openapi generator to 6.0.0.
9+
See [change log](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.0.0)
10+
111
## 3.3.2
212

313
- Fix the enum value retrieval error

openapi-generator/lib/src/openapi_generator_runner.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ class OpenapiGenerator extends GeneratorForAnnotation<annots.Openapi> {
131131
'OpenapiGenerator :: skipping source gen because generator does not need it ::');
132132
break;
133133
case annots.Generator.dio:
134-
case annots.Generator.dioNext:
135-
case annots.Generator.jaguar:
136134
case annots.Generator.dioAlt:
137135
try {
138136
var runnerOutput =
@@ -226,15 +224,9 @@ class OpenapiGenerator extends GeneratorForAnnotation<annots.Openapi> {
226224
case annots.Generator.dio:
227225
genName = 'dart-dio';
228226
break;
229-
case annots.Generator.dioNext:
230-
genName = 'dart-dio-next';
231-
break;
232227
case annots.Generator.dioAlt:
233228
genName = 'dart2-api';
234229
break;
235-
case annots.Generator.jaguar:
236-
genName = 'dart-jaguar';
237-
break;
238230
default:
239231
throw InvalidGenerationSourceError(
240232
'Generator name must be any of ${annots.Generator.values}.',

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 implementation of openapi-generator-cli.
3-
version: 3.3.2
3+
version: 4.0.0
44
homepage: https://github.com/gibahjoe/openapi-generator-dart
55

66
environment:
@@ -10,9 +10,9 @@ dependencies:
1010
build: '>=0.12.6 <=3.0.0'
1111
source_gen: '>=1.0.0 <=2.0.0'
1212
path: '>=1.0.0 <=2.0.0'
13-
openapi_generator_annotations: ^3.3.0
13+
openapi_generator_annotations: ^4.0.0
1414
analyzer: '>=1.4.0 <=5.0.0'
15-
openapi_generator_cli: ^3.3.0
15+
openapi_generator_cli: ^4.0.0
1616

1717
dev_dependencies:
1818
pedantic:

0 commit comments

Comments
 (0)