OpenAPITools / OpenAPITools/openapi-generator
[Swift4] Does generator generate error responses for requests?
Open
Nobody has claimed this yet.
Client: Swift
General: Question
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
When I tried to generate swift client for yaml file contains different types of responses. For example:
responses:
'200':
description: OK
'400':
description: Bad request. User ID must be an integer and larger than 0.
'401':
description: Authorization information is missing or invalid.
'404':
description: A user with the specified ID was not found.
'5XX':
description: Unexpected error.
It will generate only 200 response. How to generate another responses?
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 by reproducing Swift client generation from the YAML example and inspect the generated handling for the 200 response versus the 400, 401, 404, and 5XX responses. Done means the generated Swift client accounts for the listed non-success responses instead of generating only the 200 response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100