Skip to content

Commit ad3094a

Browse files
authored
Add additional option descriptions to README.md
I recently had a consumer of my API reach out and ask, "The Swagger docs indicate that we’ll need a swagger.json file to build the library. I haven’t been able to find a specific one for your api, just the example on the Swagger repo. So unless that’s forthcoming with the API creds, I might need to be pointed in the right direction." My team uses YAML for our specification file. This question ended up taking a bit of back and forth to discover what the consumer meant because we don't have a 'swagger.json' file we have a YAML file. My proposal is to add some comments to the generate command for the pet store example to describe the different options that are being passed. The goal being to call out that the http://petstore.swagger.io/v2/swagger.json file is the specification file so that if a situation similar to mine happens again the consumer would ask where the specification file was instead of asking where the swagger.json file is. Additionally I noted that the specification file could be JSON or YAML.
1 parent e1f44f3 commit ad3094a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,9 @@ This will run the generator with this command:
376376

377377
```sh
378378
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
379-
-i http://petstore.swagger.io/v2/swagger.json \
380-
-l java \
381-
-o samples/client/petstore/java
379+
-i http://petstore.swagger.io/v2/swagger.json \ # The location of the Swagger specifcation file (JSON/YAML).
380+
-l java \ # The desired language for the library.
381+
-o samples/client/petstore/java # The output destination.
382382
```
383383

384384
with a number of options. You can get the options with the `generate --help` command (below only shows partal results):

0 commit comments

Comments
 (0)