@@ -7,22 +7,28 @@ flutter/dart projects. (see example)
7
7
8
8
To be used together with [ openapi-generator-annotations] ( https://pub.dev/packages/openapi_generator_annotations )
9
9
10
+ ## Requirements
11
+
12
+ 1 . ** Java** : You must have java installed on your system for this library to work. if you are a developer, chances aare
13
+ you already. Walking you through how to install Java is beyond the scope of this project.
14
+ 2 . ** Internet** : _ duh!!!_ Just to download the openapi jar initially. Once it is cached, you are good to go.
15
+
10
16
## Usage
11
17
12
18
Include [ openapi-generator-annotations] ( https://pub.dev/packages/openapi_generator_annotations ) as a dependency in the
13
19
dependencies section of your pubspec.yaml file :
14
20
15
21
``` yaml
16
22
dependencies :
17
- openapi_generator_annotations : ^4.11.0
23
+ openapi_generator_annotations : ^latest
18
24
` ` `
19
25
20
26
Add [openapi-generator](https://pub.dev/packages/openapi_generator) in the dev dependencies section of your pubspec.yaml
21
27
file:
22
28
23
29
` ` ` yaml
24
30
dev_dependencies :
25
- openapi_generator : ^4.11.0
31
+ openapi_generator : ^latest
26
32
` ` `
27
33
28
34
Annotate a dart class with @Openapi() annotation
@@ -94,7 +100,7 @@ in generatedsource/pubspec.yaml add the following
94
100
95
101
``` yaml
96
102
dependency_overrides :
97
- analyzer : 1.0.0
103
+ analyzer : <-- preferred version -->
98
104
` ` `
99
105
100
106
Then in generatedsources/.openapi-generator-ignore, add the below so that the pubspec is not overwritten next time you
@@ -125,7 +131,7 @@ Dart's reserved names, you should edit the OpenAPI documentation to fix the issu
125
131
If correcting the OpenAPI documentation is not possible or you don't have access to it, you can manually fix the
126
132
generated code.
127
133
128
- Here are the steps to do this:
134
+ Here are the steps to take to do this:
129
135
130
136
1 . Identify the files with the bad code and manually correct them.
131
137
2 . Add the manually edited files to the ` .openapi-generator-ignore ` file. This ensures that your changes are not
0 commit comments