Skip to content

Commit be60694

Browse files
committed
docs(generator): added requirements section in readme
fixes #133
1 parent f2d6c04 commit be60694

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

openapi-generator/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,28 @@ flutter/dart projects. (see example)
77

88
To be used together with [openapi-generator-annotations](https://pub.dev/packages/openapi_generator_annotations)
99

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+
1016
## Usage
1117

1218
Include [openapi-generator-annotations](https://pub.dev/packages/openapi_generator_annotations) as a dependency in the
1319
dependencies section of your pubspec.yaml file :
1420

1521
```yaml
1622
dependencies:
17-
openapi_generator_annotations: ^4.11.0
23+
openapi_generator_annotations: ^latest
1824
```
1925
2026
Add [openapi-generator](https://pub.dev/packages/openapi_generator) in the dev dependencies section of your pubspec.yaml
2127
file:
2228
2329
```yaml
2430
dev_dependencies:
25-
openapi_generator: ^4.11.0
31+
openapi_generator: ^latest
2632
```
2733
2834
Annotate a dart class with @Openapi() annotation
@@ -94,7 +100,7 @@ in generatedsource/pubspec.yaml add the following
94100

95101
```yaml
96102
dependency_overrides:
97-
analyzer: 1.0.0
103+
analyzer: <-- preferred version -->
98104
```
99105
100106
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
125131
If correcting the OpenAPI documentation is not possible or you don't have access to it, you can manually fix the
126132
generated code.
127133

128-
Here are the steps to do this:
134+
Here are the steps to take to do this:
129135

130136
1. Identify the files with the bad code and manually correct them.
131137
2. Add the manually edited files to the `.openapi-generator-ignore` file. This ensures that your changes are not

0 commit comments

Comments
 (0)