mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-07 10:46:09 +00:00
Fix alias to map response (#1067)
* fix response reference to map * update samples * add null check for openapi
This commit is contained in:
@@ -22,7 +22,6 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.openapitools.client.model.StringBooleanMap;
|
||||
|
||||
/**
|
||||
* MapTest
|
||||
@@ -74,7 +73,7 @@ public class MapTest {
|
||||
private Map<String, Boolean> directMap = null;
|
||||
|
||||
@JsonProperty("indirect_map")
|
||||
private StringBooleanMap indirectMap = null;
|
||||
private Map<String, Boolean> indirectMap = null;
|
||||
|
||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||
this.mapMapOfString = mapMapOfString;
|
||||
@@ -154,21 +153,29 @@ public class MapTest {
|
||||
this.directMap = directMap;
|
||||
}
|
||||
|
||||
public MapTest indirectMap(StringBooleanMap indirectMap) {
|
||||
public MapTest indirectMap(Map<String, Boolean> indirectMap) {
|
||||
this.indirectMap = indirectMap;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) {
|
||||
if (this.indirectMap == null) {
|
||||
this.indirectMap = new HashMap<String, Boolean>();
|
||||
}
|
||||
this.indirectMap.put(key, indirectMapItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get indirectMap
|
||||
* @return indirectMap
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public StringBooleanMap getIndirectMap() {
|
||||
public Map<String, Boolean> getIndirectMap() {
|
||||
return indirectMap;
|
||||
}
|
||||
|
||||
public void setIndirectMap(StringBooleanMap indirectMap) {
|
||||
public void setIndirectMap(Map<String, Boolean> indirectMap) {
|
||||
this.indirectMap = indirectMap;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user