swagger-api / swagger-api/swagger-codegen

Clarify options passed in simple Petstore example.

Open
#10,507 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

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 can be found.

Swagger-codegen version

3.X

Swagger declaration file content or url

N/A

Command line used for generation

N/A

Steps to reproduce

N/A

Related issues/PRs
Suggest a fix/enhancement

I created a PR for my suggested change to the README.md. https://github.com/swagger-api/swagger-codegen/pull/10506

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with README.md and inspect the simple Petstore example's generate command. Compare its options with the existing explanation, especially the specification-file argument. Done means the README clearly explains that the Petstore URL is the specification file; a related pull request is already linked.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.