swagger-api / swagger-api/swagger-codegen

[Swift] Generated SDK build fails when using request parameters of type [integer] in query or body

Open
#3,815 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Swagger-codegen version

2.3.0

Swagger declaration file content or url

User.json.zip

Command line used for generation

generate -i User.json -l swift -o UserModel --additional-properties unwrapRequired=true,responseAs=PromiseKit

Steps to reproduce

Just run the generator

Related issues

Similar to https://github.com/swagger-api/swagger-codegen/issues/2669, [Int*] is not convertible into AnyObject.

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 by downloading User.json and running the shown Swagger Codegen command with the Swift generator, then inspect the generated model or request code where integer parameters are passed into query or body values. Done means the SDK generates successfully without the Int-to-AnyObject conversion failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
api, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.