swagger-api / swagger-api/swagger-codegen
Swift 4 Cannot invoke 'encode' with an argument list of type '(Any, forKey: String)'
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Error "Cannot invoke 'encode' with an argument list of type '(Any, forKey: String)'" in every request file
Swagger-codegen version
2.3.1
Command line used for generation
swagger-codegen genrate -i swagger.json -l swift4 -o api
Steps to reproduce
Xcode 10
Swift 4
Just import the files to the project and build
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
Reproduce the failure by generating a Swift 4 client with the command in the issue and building the generated request files in Xcode 10. Then inspect the Swift 4 generator templates and compare the generated encode calls with Swift 4's expected types. Done means the generated client builds without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100