swagger-api / swagger-api/swagger-codegen
[Swift4] Interoperability with Objective C
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
We're looking to use Swagger codegen with SWG v3.0 to generate the model and api files. However, we need to use these with existing Objective C project eg. Need the model obejcts returned in the response to be stored in local model to be used with ObjC View controllers.
Swagger-codegen version
verion 2.2.3
Swagger declaration file content or url
any file will do. Nothing specific
Command line used for generation
plain generate commanf for -l swift4
Steps to reproduce
generate any SWG v3.0 file into swift classes
Related issues/PRs
Suggest a fix/enhancement
Along with declaring Codeable, which you already do, the model objects need to be subclassed from NSObject, have @objcMembers annotation etc.
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 running the plain generator command with -l swift4 on any Swagger v3.0 definition and inspect the generated model and API Swift files. Check how the Swift4 templates represent Codable models, then verify the generated models support Objective-C use through NSObject inheritance and @objcMembers. Done means the generated models can be stored and used by existing Objective-C view controllers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c, swift
- Domain
- mobile-dev, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100