Skip to content

[Objc] Invalid Objc code generation for collection parameter #2907

@iomark

Description

@iomark
Description

Objc code generator produces invalid source code that can not be compiled. Problem generated code:
if (teamIds != nil) { queryParams[@"team_ids"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: team_ids format: @"csv"]; }

Suggest a Fix

Second team_ids (after initWithValuesAndFormat) should be teamIds

Fix will be provided by pull request

Swagger-codegen version

Swagger-codegen version 2.0

Swagger declaration file content or url

can be find on https://dl.dropboxusercontent.com/u/41121857/telemetrio.json

Command line used for generation

swagger-codegen generate -i telemetrio.json -l objc

Steps to reproduce
  1. Generate Objc source code from telemetrio.json using command line swagger-codegen generate -i telemetrio.json -l objc
  2. Add result source code to your ios project using Xcode IDE
  3. Try to compile project
  4. Expected result: built application. Actual result: error message "error: use of undeclared identifier 'team_ids'; did you mean 'teamIds'?"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions