swagger-api / swagger-api/swagger-codegen
[JAVA] serializableModel Parameter is not working
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Hey! I'm trying to set up a serializable Model with the codegen, but I can't really figure out how to pass the parameter correctly. Any ideas what I'm doing wrong?
Swagger-codegen version
2.4.0
Command line used for generation
PS C:\xxx\xxx\xxx\xxx\Projects\swagger-codegen> java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i https://xxxxx/swagger.json -l java --library=retrofit2 --serializableModel=true -o C:\xxx\xxx\xxx\xxx\Projects\javaapi
Exception in thread "main" io.airlift.airline.ParseArgumentsUnexpectedException: Found unexpected parameters: [--serializableModel=true]
at io.airlift.airline.Cli.validate(Cli.java:148)
at io.airlift.airline.Cli.parse(Cli.java:116)
at io.airlift.airline.Cli.parse(Cli.java:97)
at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:35)
Steps to reproduce
Using the above statement does not work.
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 at SwaggerCodegen.main and the generate-command option parsing, reproducing the supplied command with --serializableModel=true. Check the supported spelling and boolean syntax for serializableModel, then verify that a generated Java client contains serializable models; done means the command is accepted and the option has the expected effect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100