Skip to content

Commit

Permalink
docs(generator): added requirements section in readme
Browse files Browse the repository at this point in the history
fixes #133
  • Loading branch information
gibahjoe committed Nov 5, 2024
1 parent f2d6c04 commit be60694
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions openapi-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,28 @@ flutter/dart projects. (see example)

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

## Requirements

1. **Java**: You must have java installed on your system for this library to work. if you are a developer, chances aare
you already. Walking you through how to install Java is beyond the scope of this project.
2. **Internet**: _duh!!!_ Just to download the openapi jar initially. Once it is cached, you are good to go.

## Usage

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

```yaml
dependencies:
openapi_generator_annotations: ^4.11.0
openapi_generator_annotations: ^latest
```
Add [openapi-generator](https://pub.dev/packages/openapi_generator) in the dev dependencies section of your pubspec.yaml
file:
```yaml
dev_dependencies:
openapi_generator: ^4.11.0
openapi_generator: ^latest
```
Annotate a dart class with @Openapi() annotation
Expand Down Expand Up @@ -94,7 +100,7 @@ in generatedsource/pubspec.yaml add the following

```yaml
dependency_overrides:
analyzer: 1.0.0
analyzer: <-- preferred version -->
```
Then in generatedsources/.openapi-generator-ignore, add the below so that the pubspec is not overwritten next time you
Expand Down Expand Up @@ -125,7 +131,7 @@ Dart's reserved names, you should edit the OpenAPI documentation to fix the issu
If correcting the OpenAPI documentation is not possible or you don't have access to it, you can manually fix the
generated code.

Here are the steps to do this:
Here are the steps to take to do this:

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

0 comments on commit be60694

Please sign in to comment.