swagger-api / swagger-api/swagger-codegen
Swagger codegen automatically creates examples
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Generating Swagger JSON from YAML produces examples automatically. Not all tools - in particular AWS API Gateway accept this.
We are generating JSON Swagger from YAML, by using lang equal to swagger.
Swagger-codegen version
v2.3.1
Suggest a fix/enhancement
The code generator appears to automatically generate Swagger examples when converting YAML to JSON. This is not always desirable. It might make sense to provide a configuration to disable automatic example generation.
If this already exists, then the documentation should support this since I was unable to find any documentation on the matter.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by tracing the swagger-codegen v2.3.1 path for lang=swagger that converts YAML to JSON, and check whether an option already controls generated examples. Done means documenting an existing option or providing configuration that suppresses examples, with generated JSON suitable for AWS API Gateway.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100