swagger-api / swagger-api/swagger-codegen

Execption received while running the swagger-code-gen

Open
#1,388 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Steps to reproduce

  1. Run the swagger-code-gen

java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i https://www.expedia.co.jp/static/mobile/swaggerui/swagger.json -l java -o samples/client/expedia

  1. The json file is also attached , the expedia mobile api is available in the above URL also
  2. I receive a exception as below

[main] ERROR io.swagger.codegen.languages.JavaClientCodegen - No Type defined for Property null Exception in thread "main" java.lang.RuntimeException: Could not generate model 'detailedRentalFare'

Can you please help with this issue. Am i doing something wrong. Since i am using the swagger-code-gen for first time.

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 by running the swagger-codegen CLI command against the Expedia swagger.json URL and inspect the JavaClientCodegen error for the detailedRentalFare model. Compare the attached definition with the generator's expectations around the property reported as null. Done means the definition is handled without the RuntimeException and Java client generation completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.