swagger-api / swagger-api/swagger-codegen
Cannot Convert Number (eg. 2208.72) to Float Value
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I had to update Xcode to the new Version and therefore Swift 4.1 was updated.
Now I get an error mapping Numbers to a Float Value.
Swagger-codegen version
swagger-codegen-cli-2.3.1
Swagger declaration file content or url
I cannot post the swagger file due to security reasons, but i can look for specific parts if needed.
Here is the part of the generated code, where it fails

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
Review the generated Swift code shown in the issue alongside the Swagger declaration, whose relevant parts the reporter can provide. Reproduce the number-to-Float mapping with Swift 4.1 and Xcode using a value such as 2208.72; done means the generated client maps that value without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100