mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-08 08:26:12 +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:
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
||||
**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
|
||||
**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
|
||||
**directMap** | **Map<String, Boolean>** | | [optional]
|
||||
**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||
**indirectMap** | **Map<String, Boolean>** | | [optional]
|
||||
|
||||
|
||||
<a name="Map<String, InnerEnum>"></a>
|
||||
|
||||
@@ -23,7 +23,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
|
||||
@@ -75,7 +74,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;
|
||||
@@ -155,21 +154,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<>();
|
||||
}
|
||||
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