Skip to content

[Typescript-Angular2] Cannot generate additionalProperties array type #6081

Closed

Description

@isman-usoh
Description
Swagger-codegen version

2.2.3

Swagger declaration file
{
   "definitions":{
      "Model1":{
         "type":"object",
         "additionalProperties":{
            "type":"array",
            "items":{
               "$ref":"#/definitions/Model2"
            }
         }
      },
      "Model2":{...}
   }
}

generate to.

export interface Model1 {
  [key: string]: Array
}

should be

export interface Model1 {
  [key: string]: Array<models.Model2>
}
Command line used for generation

java -jar swagger-codegen-cli.jar generate -i swagger.json -l typescript-angular2

Activity

  1. added this to the v2.3.0 milestone on Jul 20, 2017
  2. wing328 commented on Jul 23, 2017

    @wing328
    Contributor

    Fixed via #6082

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions