swagger-api / swagger-api/swagger-codegen-generators
Swift4 Codegen Date and DateTime error
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
Hi everybody, when using Swift4 Swagger Codegen, there's a problem in distinguishing Date and DateTime types declared in swagger, which gets both converted to Date: https://github.com/swagger-api/swagger-codegen-generators/blob/master/src/main/java/io/swagger/codegen/v3/generators/swift/Swift4Codegen.java#L80-L81
This wasn't a problem in Swift 3, where the the two types were different: https://github.com/swagger-api/swagger-codegen-generators/blob/master/src/main/java/io/swagger/codegen/v3/generators/swift/Swift3Codegen.java#L38-L39
Has anyone had the same problem? Most of all, how should we address it and solve it?
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 Swift4Codegen.java mapping at the referenced lines and compare it with Swift3Codegen.java. Determine how Swift 4 should distinguish Swagger Date and DateTime types, then verify that generated Swift models preserve that distinction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, swift
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100