You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Include [openapi-generator-annotations](https://pub.dev/packages/openapi_generator_annotations) as a dependency in the dependencies section of your pubspec.yaml file :
9
+
10
+
```yaml
11
+
dependencies:
12
+
openapi_generator_annotations: ^1.0.0
13
+
```
14
+
15
+
16
+
Add [openapi-generator](https://pub.dev/packages/openapi_generator) in the dev dependencies section of your pubspec.yaml file:
17
+
18
+
```yaml
19
+
dev_dependencies:
20
+
openapi_generator: ^0.0.2-beta
21
+
```
22
+
23
+
24
+
Annotate a dart class with @Openapi() annotation
9
25
10
26
```dart
11
27
@Openapi(
@@ -17,6 +33,13 @@ A simple usage example:
17
33
class Example extends OpenapiGeneratorConfig {}
18
34
```
19
35
36
+
Run command below to generate open api client sdk from spec file specified in annotation.
37
+
```cmd
38
+
flutter pub run build_runner build --delete-conflicting-outputs
39
+
```
40
+
41
+
The api sdk will be generated in the folder specified in the annotation. See examples for more details
42
+
20
43
## Features and bugs
21
44
22
45
Please file feature requests and bugs at the [issue tracker][tracker].
0 commit comments