swagger-api / swagger-api/swagger-codegen

[JAVA] serializableModel Parameter is not working

Open
#8,567 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

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.