swagger-api / swagger-api/swagger-codegen
swagger-codegen-cli.jar is adding unwanted "example:" definitions to each object definition; how can I suppress this?
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I am executing swagger-codegen-cli.jar "generate" with a YAML swagger file as input, and "swagger-yaml" as the language.
I just upgraded swagger-codegen-cli to version 2.3.1, and now the tool is generating "example:" definitions for each object type. I don't want this.
Is there any way to disable this?
Swagger-codegen version
2.3.1
Swagger declaration file content or url
Command line used for generation
java -jar swagger-codegen-cli.jar generate -i my.yaml -l swagger-yaml -o /tmp
Steps to reproduce
java -jar swagger-codegen-cli.jar generate -i my.yaml -l swagger-yaml -o /tmp
Related issues/PRs
Suggest a fix/enhancement
A command-line option to disable the automatic generation of example definitions would be great.
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
Start by reproducing the reported java -jar swagger-codegen-cli.jar generate -i my.yaml -l swagger-yaml -o /tmp command with swagger-codegen 2.3.1 and compare its output with the previous version. Trace the swagger-yaml generation path to determine where example: definitions are added; done means a documented way to suppress them and a regression check for the generated YAML.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100