swagger-api / swagger-api/swagger-codegen
[Objc] Problem sending bool value in delete request
Open
Nobody has claimed this yet.
Client: Objc
Issue: Bug
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
The problem occurs in the Obj-C version when I want to send a delete request that contains a boolean value. In the model I have a NSNumber* which can't be converted to false/true value and in the end I get a 400 as a response
Swagger-codegen version
Latest master
Swagger declaration file content or url
delete:
produces:
- application/json
description: Logout bookmaker. If all-sessions parameter is true, logs out for all user's sessions.
parameters:
- name: all-sessions
in: query
type: boolean
required: false
- name: bookieCode
type: string
description: Two letter bookmaker code.
in: path
required: true
responses:
204:
description: Logged out successfully.
410:
description: Session token doesn't support feature.
security:
- UserSecurity: []
tags:
- Bookies management
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 the Objective-C client generation with the Swagger declaration in the issue, focusing on the boolean all-sessions query parameter in the DELETE request. Trace how the NSNumber* value is serialized and verify that a true or false value produces the expected request instead of a 400 response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100