swagger-api/swagger-codegen

[Java] Does not support Map of Map of String or other type

オープン

#3,241 opened on 2016/06/29

 (5 件のコメント) (0 件のリアクション) (0 人の担当者)HTML (5,474 件のフォーク)batch import
Client: JavaIssue: Bughelp wanted

Repository metrics

Stars
 (12,701 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Description

Currently, Java does not support Map of Map of String or other type

public class MapTest   {
  @SerializedName("map_map_of_string")
  private Map<String, Map<String, String>> mapMapOfString = new HashMap<String, Map<String, String>>();

As shown above, the inner Map is not mapped to HashMap

Swagger-codegen version

Latest master (Jun 28, 2016)

Suggest a Fix

The issue likely has to do with getTypeDeclaration in modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java

コントリビューターガイド