OpenAPITools / OpenAPITools/openapi-generator

[HELP][swift5] Set iOS deployment target

Open
#11,567 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

I want to use responseAs Combine additional property and I've noticed that all combine imports are wrapped with "If canImport". Is there any way to set the deployment target to iOS 13 to avoid this check?
On the other hand, AnyCodable (with its canImport) has been added to generator, but I haven't be able to find in changelog when and why it was added. Why is it mandatory to use this library? Can I remove it with any additional property o something like that?

openapi-generator version

5.4.0

Command line used for generation

java -jar openapi-generator-cli.jar generate -i download/people.yml -g swift5 -o generated --additional-properties=modelNameSuffix=DTO,responseAs=Combine

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

Reproduce the issue with the shown openapi-generator-cli command, the swift5 generator, and responseAs=Combine. Trace how Combine imports, the iOS deployment target, and AnyCodable are handled in the Swift generator configuration and generated output. Done means the requested deployment target behavior and AnyCodable usage are clearly configurable or documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, swift
Domain
mobile, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.