forked from loafle/openapi-generator-original
* fix: #1466 additionalProperties works now in spring generator * chore: chore: #1466 solved rebase conflicts * 1466; updated samples * [Spring] update additionalProperties MR * [Spring] additionalProperties unit test --------- Co-authored-by: Your Name <benfonty@gmail.com> Co-authored-by: Oleh Kurpiak <oleh.kurpiak@gmail.com>
This commit is contained in:
@@ -7,8 +7,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
@@ -18,13 +16,17 @@ import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
/**
|
||||
* AdditionalPropertiesAnyTypeDto
|
||||
*/
|
||||
|
||||
@JsonTypeName("AdditionalPropertiesAnyType")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class AdditionalPropertiesAnyTypeDto extends HashMap<String, Object> {
|
||||
public class AdditionalPropertiesAnyTypeDto {
|
||||
|
||||
private String name;
|
||||
|
||||
@@ -47,6 +49,43 @@ public class AdditionalPropertiesAnyTypeDto extends HashMap<String, Object> {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, Object> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public AdditionalPropertiesAnyTypeDto putAdditionalProperty(String key, Object value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, Object>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public Object getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
@@ -58,20 +97,21 @@ public class AdditionalPropertiesAnyTypeDto extends HashMap<String, Object> {
|
||||
}
|
||||
AdditionalPropertiesAnyTypeDto additionalPropertiesAnyType = (AdditionalPropertiesAnyTypeDto) o;
|
||||
return Objects.equals(this.name, additionalPropertiesAnyType.name) &&
|
||||
super.equals(o);
|
||||
Objects.equals(this.additionalProperties, additionalPropertiesAnyType.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
return Objects.hash(name, additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesAnyTypeDto {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -7,9 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
@@ -19,13 +17,17 @@ import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
/**
|
||||
* AdditionalPropertiesArrayDto
|
||||
*/
|
||||
|
||||
@JsonTypeName("AdditionalPropertiesArray")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class AdditionalPropertiesArrayDto extends HashMap<String, List> {
|
||||
public class AdditionalPropertiesArrayDto {
|
||||
|
||||
private String name;
|
||||
|
||||
@@ -48,6 +50,43 @@ public class AdditionalPropertiesArrayDto extends HashMap<String, List> {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, List> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public AdditionalPropertiesArrayDto putAdditionalProperty(String key, List value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, List>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, List> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public List getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
@@ -59,20 +98,21 @@ public class AdditionalPropertiesArrayDto extends HashMap<String, List> {
|
||||
}
|
||||
AdditionalPropertiesArrayDto additionalPropertiesArray = (AdditionalPropertiesArrayDto) o;
|
||||
return Objects.equals(this.name, additionalPropertiesArray.name) &&
|
||||
super.equals(o);
|
||||
Objects.equals(this.additionalProperties, additionalPropertiesArray.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
return Objects.hash(name, additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesArrayDto {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
@@ -18,13 +16,17 @@ import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
/**
|
||||
* AdditionalPropertiesBooleanDto
|
||||
*/
|
||||
|
||||
@JsonTypeName("AdditionalPropertiesBoolean")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class AdditionalPropertiesBooleanDto extends HashMap<String, Boolean> {
|
||||
public class AdditionalPropertiesBooleanDto {
|
||||
|
||||
private String name;
|
||||
|
||||
@@ -47,6 +49,43 @@ public class AdditionalPropertiesBooleanDto extends HashMap<String, Boolean> {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, Boolean> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public AdditionalPropertiesBooleanDto putAdditionalProperty(String key, Boolean value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, Boolean>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, Boolean> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public Boolean getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
@@ -58,20 +97,21 @@ public class AdditionalPropertiesBooleanDto extends HashMap<String, Boolean> {
|
||||
}
|
||||
AdditionalPropertiesBooleanDto additionalPropertiesBoolean = (AdditionalPropertiesBooleanDto) o;
|
||||
return Objects.equals(this.name, additionalPropertiesBoolean.name) &&
|
||||
super.equals(o);
|
||||
Objects.equals(this.additionalProperties, additionalPropertiesBoolean.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
return Objects.hash(name, additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesBooleanDto {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
@@ -18,13 +16,17 @@ import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
/**
|
||||
* AdditionalPropertiesIntegerDto
|
||||
*/
|
||||
|
||||
@JsonTypeName("AdditionalPropertiesInteger")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class AdditionalPropertiesIntegerDto extends HashMap<String, Integer> {
|
||||
public class AdditionalPropertiesIntegerDto {
|
||||
|
||||
private String name;
|
||||
|
||||
@@ -47,6 +49,43 @@ public class AdditionalPropertiesIntegerDto extends HashMap<String, Integer> {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, Integer> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public AdditionalPropertiesIntegerDto putAdditionalProperty(String key, Integer value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, Integer>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, Integer> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public Integer getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
@@ -58,20 +97,21 @@ public class AdditionalPropertiesIntegerDto extends HashMap<String, Integer> {
|
||||
}
|
||||
AdditionalPropertiesIntegerDto additionalPropertiesInteger = (AdditionalPropertiesIntegerDto) o;
|
||||
return Objects.equals(this.name, additionalPropertiesInteger.name) &&
|
||||
super.equals(o);
|
||||
Objects.equals(this.additionalProperties, additionalPropertiesInteger.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
return Objects.hash(name, additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesIntegerDto {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
@@ -19,13 +17,17 @@ import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
/**
|
||||
* AdditionalPropertiesNumberDto
|
||||
*/
|
||||
|
||||
@JsonTypeName("AdditionalPropertiesNumber")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class AdditionalPropertiesNumberDto extends HashMap<String, BigDecimal> {
|
||||
public class AdditionalPropertiesNumberDto {
|
||||
|
||||
private String name;
|
||||
|
||||
@@ -48,6 +50,43 @@ public class AdditionalPropertiesNumberDto extends HashMap<String, BigDecimal> {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, BigDecimal> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public AdditionalPropertiesNumberDto putAdditionalProperty(String key, BigDecimal value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, BigDecimal>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, BigDecimal> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public BigDecimal getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
@@ -59,20 +98,21 @@ public class AdditionalPropertiesNumberDto extends HashMap<String, BigDecimal> {
|
||||
}
|
||||
AdditionalPropertiesNumberDto additionalPropertiesNumber = (AdditionalPropertiesNumberDto) o;
|
||||
return Objects.equals(this.name, additionalPropertiesNumber.name) &&
|
||||
super.equals(o);
|
||||
Objects.equals(this.additionalProperties, additionalPropertiesNumber.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
return Objects.hash(name, additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesNumberDto {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
@@ -18,13 +17,17 @@ import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
/**
|
||||
* AdditionalPropertiesObjectDto
|
||||
*/
|
||||
|
||||
@JsonTypeName("AdditionalPropertiesObject")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class AdditionalPropertiesObjectDto extends HashMap<String, Map> {
|
||||
public class AdditionalPropertiesObjectDto {
|
||||
|
||||
private String name;
|
||||
|
||||
@@ -47,6 +50,43 @@ public class AdditionalPropertiesObjectDto extends HashMap<String, Map> {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, Map> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public AdditionalPropertiesObjectDto putAdditionalProperty(String key, Map value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, Map>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, Map> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public Map getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
@@ -58,20 +98,21 @@ public class AdditionalPropertiesObjectDto extends HashMap<String, Map> {
|
||||
}
|
||||
AdditionalPropertiesObjectDto additionalPropertiesObject = (AdditionalPropertiesObjectDto) o;
|
||||
return Objects.equals(this.name, additionalPropertiesObject.name) &&
|
||||
super.equals(o);
|
||||
Objects.equals(this.additionalProperties, additionalPropertiesObject.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
return Objects.hash(name, additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesObjectDto {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
@@ -18,13 +16,17 @@ import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
/**
|
||||
* AdditionalPropertiesStringDto
|
||||
*/
|
||||
|
||||
@JsonTypeName("AdditionalPropertiesString")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class AdditionalPropertiesStringDto extends HashMap<String, String> {
|
||||
public class AdditionalPropertiesStringDto {
|
||||
|
||||
private String name;
|
||||
|
||||
@@ -47,6 +49,43 @@ public class AdditionalPropertiesStringDto extends HashMap<String, String> {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, String> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public AdditionalPropertiesStringDto putAdditionalProperty(String key, String value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, String>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, String> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public String getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
@@ -58,20 +97,21 @@ public class AdditionalPropertiesStringDto extends HashMap<String, String> {
|
||||
}
|
||||
AdditionalPropertiesStringDto additionalPropertiesString = (AdditionalPropertiesStringDto) o;
|
||||
return Objects.equals(this.name, additionalPropertiesString.name) &&
|
||||
super.equals(o);
|
||||
Objects.equals(this.additionalProperties, additionalPropertiesString.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
return Objects.hash(name, additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesStringDto {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@ public class BigCatDto extends CatDto {
|
||||
this.kind = kind;
|
||||
}
|
||||
|
||||
|
||||
public BigCatDto declawed(Boolean declawed) {
|
||||
super.setDeclawed(declawed);
|
||||
return this;
|
||||
@@ -116,7 +117,6 @@ public class BigCatDto extends CatDto {
|
||||
super.setColor(color);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
|
||||
@@ -69,6 +69,7 @@ public class CatDto extends AnimalDto {
|
||||
this.declawed = declawed;
|
||||
}
|
||||
|
||||
|
||||
public CatDto className(String className) {
|
||||
super.setClassName(className);
|
||||
return this;
|
||||
@@ -78,7 +79,6 @@ public class CatDto extends AnimalDto {
|
||||
super.setColor(color);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
|
||||
@@ -62,6 +62,7 @@ public class DogDto extends AnimalDto {
|
||||
this.breed = breed;
|
||||
}
|
||||
|
||||
|
||||
public DogDto className(String className) {
|
||||
super.setClassName(className);
|
||||
return this;
|
||||
@@ -71,7 +72,6 @@ public class DogDto extends AnimalDto {
|
||||
super.setColor(color);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
|
||||
Reference in New Issue
Block a user