swagger-api / swagger-api/swagger-codegen

swagger codegen generating typed model

Open
#11,663 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

When I'm creating sdk client using below command model is created typed

java -jar swagger-codegen-cli-2.4.13.jar generate -l csharp -i https://raw.githubusercontent.com/amzn/selling-partner-api-models/main/models/merchant-fulfillment-api-model/merchantFulfillmentV0.json --api-package Api.MerchantFulFillment --model-package Models.MerchantFulFillment --additional-properties -DmodelTests=false -DapiTests=false -DpackageName='AmazonSPAPI.Sdk'

image

but on using editor.swagger.io its getting created correctly, what can be done to resolve this issue?

image

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 reproducing the provided swagger-codegen-cli 2.4.13 command with the linked merchant fulfillment model, then compare its C# output with editor.swagger.io. Inspect the generated model and the input schema to determine why the types differ; done means the CLI output matches the expected typed model.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.