swagger-api / swagger-api/swagger-codegen
Swagger code gen for client fails for request body with string array
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
From @byrebg on July 26, 2017 3:29
Attached is the YAML file used for generating the client code. for Request body having type as array it fails
{"in":"body","name":"parameterFileIds","description":"List of parameter file Ids","required":true,"schema":{"type":"array","items":{"string"}}}
Exception :
{"code":1,"type":"error","message":"Unable to build target: Could not process operation:\n Tag: parameters-controller\n Operation: deleteModelParameterFilesUsingDELETE\n Resource: delete /v1/projects/{projectId}/models/{modelId}/parameters\n Definitions: \n Exception: null"}
test_array.txt
Attached is file, rename file extension txt to json
Suggestion : Is there any alternates or am i missing something here.
Copied from original issue: swagger-api/swagger-editor#1420
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 with the attached test_array.txt file, rename it as requested, and reproduce client generation for deleteModelParameterFilesUsingDELETE. Trace the failure for the request body whose schema is an array of strings. Done means the client is generated successfully for this operation without the reported processing exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100