Skip to content

[Swift3]Classes with no properties but with additionalProperties are not correctly created #5535

@wuf810

Description

@wuf810
Description

If a class has no properties defined but does have additionalProperties defined, it is incorrectly created as an empty "typealias" and not a concrete class

Swagger-codegen version

Latest Master 4512619

2.2.2

Swagger declaration file content or url

YAML which generates the issue :

UserRequest:
    type: object
    description: Request user model
    additionalProperties:
      type: string
Command line used for generation

generate --input-spec https://example/swagger.json --lang swift3 --output /Users/michaelkaye/swagger/gen/swift

Steps to reproduce

Create a YAML with a class defined as above with no static properties but with additionalProperties.

Related issues

Related to the issue reported here:

#4907

Suggest a Fix

I have already created a fix and will raise a PR in a moment.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions