swagger-api / swagger-api/swagger-codegen

[Swift] Generate Swift client w/o dependencies

Open
#6,914 11 comments 16 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Swift General: Suggestion
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

Generated code for Swift 4 requires frameworks,

  • Alamofire
  • PromiseKit
  • RxSwift

https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/swift4/Cartfile.mustache

Would be better to be able to use Swagger generated client without any third party frameworks.
Codegen should only rely on Foundation and Standard Library.

Generated code should work with URLSession

Suggest a fix/enhancement

Would be better not to have any third party dependency.
Codegen should only rely on Foundation and Standard Library.
Generated code should work with URLSession instead.

If many people like and use current format, we could have two separate codegen formats, with and without dependencies.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with modules/swagger-codegen/src/main/resources/swift4/Cartfile.mustache and inspect how the generated Swift client uses Alamofire, PromiseKit, and RxSwift. Define whether the change replaces the current format or adds a dependency-free format, then verify that generated code relies only on Foundation and the Standard Library and works with URLSession.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.