diff --git a/modules/swagger-core/pom.xml b/modules/swagger-core/pom.xml
index 4e11c2902e..5936b286d6 100644
--- a/modules/swagger-core/pom.xml
+++ b/modules/swagger-core/pom.xml
@@ -9,6 +9,7 @@
4.0.0
swagger-core
swagger-core
+ 1.6.14-PATCH1
src/main/java
install
diff --git a/modules/swagger-models/src/main/java/io/swagger/models/ComposedModel.java b/modules/swagger-models/src/main/java/io/swagger/models/ComposedModel.java
index 240b250733..1a6efcd43a 100644
--- a/modules/swagger-models/src/main/java/io/swagger/models/ComposedModel.java
+++ b/modules/swagger-models/src/main/java/io/swagger/models/ComposedModel.java
@@ -1,17 +1,19 @@
package io.swagger.models;
import com.fasterxml.jackson.annotation.JsonIgnore;
-import io.swagger.models.properties.Property;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+@JsonPropertyOrder({"description", "required", "minimum", "maximum", "multipleOf", "exclusiveMinimum", "exclusiveMaximum", "minLength", "maxLength", "pattern", "allOf", "example"})
public class ComposedModel extends AbstractModel {
private List allOf = new ArrayList();
private Model parent;
private Model child;
private List interfaces;
+ private List required;
private String description;
private Object example;
@@ -77,6 +79,13 @@ public void setChild(Model model) {
this.allOf.add(model);
}
}
+ public List getRequired() {
+ return required;
+ }
+
+ public void setRequired(List required) {
+ this.required = required;
+ }
public List getInterfaces() {
return interfaces;
@@ -103,6 +112,7 @@ public Object clone() {
cloned.interfaces = this.interfaces;
cloned.description = this.description;
cloned.example = this.example;
+ cloned.required = this.required == null ? null : new ArrayList(this.required);
return cloned;
}
@@ -119,6 +129,7 @@ public int hashCode() {
result = prime * result
+ ((interfaces == null) ? 0 : interfaces.hashCode());
result = prime * result + ((parent == null) ? 0 : parent.hashCode());
+ result = prime * result + ((required == null) ? 0 : required.hashCode());
return result;
}
@@ -176,6 +187,13 @@ public boolean equals(Object obj) {
} else if (!parent.equals(other.parent)) {
return false;
}
+ if (required == null) {
+ if (other.required != null) {
+ return false;
+ }
+ } else if (!required.equals(other.required)) {
+ return false;
+ }
return true;
}
}