forked from loafle/openapi-generator-original
[Java Play Framework] Remove most warnings + bug fixes (#6275)
* Removals of most of the warnings found by lint * Removals of most of the warnings found by lint (PART 2) * Removals of most of the warnings found by lint (PART 3) * Removals of most of the warnings found by lint (PART 4) * Removals of most of the warnings found by lint (PART 5) * Fix conversion error * Removal of unnecessary import. Other will need more complex login in the generator itself (not in the mustache files) * Add missing imports + fix to the regex. Generation of the samples
This commit is contained in:
committed by
wing328
parent
b0333af8bd
commit
ab28c7c825
@@ -638,19 +638,39 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
if (ap.getItems() == null) {
|
if (ap.getItems() == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return String.format(pattern, getTypeDeclaration(ap.getItems()));
|
|
||||||
|
String typeDeclaration = getTypeDeclaration(ap.getItems());
|
||||||
|
Object java8obj = additionalProperties.get("java8");
|
||||||
|
if (java8obj != null) {
|
||||||
|
Boolean java8 = Boolean.valueOf(java8obj.toString());
|
||||||
|
if (java8 != null && java8) {
|
||||||
|
typeDeclaration = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return String.format(pattern, typeDeclaration);
|
||||||
} else if (p instanceof MapProperty) {
|
} else if (p instanceof MapProperty) {
|
||||||
final MapProperty ap = (MapProperty) p;
|
final MapProperty ap = (MapProperty) p;
|
||||||
final String pattern;
|
final String pattern;
|
||||||
if (fullJavaUtil) {
|
if (fullJavaUtil) {
|
||||||
pattern = "new java.util.HashMap<String, %s>()";
|
pattern = "new java.util.HashMap<%s>()";
|
||||||
} else {
|
} else {
|
||||||
pattern = "new HashMap<String, %s>()";
|
pattern = "new HashMap<%s>()";
|
||||||
}
|
}
|
||||||
if (ap.getAdditionalProperties() == null) {
|
if (ap.getAdditionalProperties() == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return String.format(pattern, getTypeDeclaration(ap.getAdditionalProperties()));
|
|
||||||
|
String typeDeclaration = String.format("String, %s", getTypeDeclaration(ap.getAdditionalProperties()));
|
||||||
|
Object java8obj = additionalProperties.get("java8");
|
||||||
|
if (java8obj != null) {
|
||||||
|
Boolean java8 = Boolean.valueOf(java8obj.toString());
|
||||||
|
if (java8 != null && java8) {
|
||||||
|
typeDeclaration = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return String.format(pattern, typeDeclaration);
|
||||||
} else if (p instanceof IntegerProperty) {
|
} else if (p instanceof IntegerProperty) {
|
||||||
IntegerProperty dp = (IntegerProperty) p;
|
IntegerProperty dp = (IntegerProperty) p;
|
||||||
if (dp.getDefault() != null) {
|
if (dp.getDefault() != null) {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public class JavaPlayFrameworkCodegen extends AbstractJavaCodegen implements Bea
|
|||||||
|
|
||||||
additionalProperties.put(CONFIG_PACKAGE, configPackage);
|
additionalProperties.put(CONFIG_PACKAGE, configPackage);
|
||||||
additionalProperties.put(BASE_PACKAGE, basePackage);
|
additionalProperties.put(BASE_PACKAGE, basePackage);
|
||||||
|
additionalProperties.put("java8", true);
|
||||||
additionalProperties.put("jackson", "true");
|
additionalProperties.put("jackson", "true");
|
||||||
|
|
||||||
cliOptions.add(new CliOption(TITLE, "server title name or client service name"));
|
cliOptions.add(new CliOption(TITLE, "server title name or client service name"));
|
||||||
@@ -263,7 +263,7 @@ public class JavaPlayFrameworkCodegen extends AbstractJavaCodegen implements Bea
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Pattern pathVariableMatcher = Pattern.compile("\\{(.+)}");
|
Pattern pathVariableMatcher = Pattern.compile("\\{([^}]+)}");
|
||||||
Matcher match = pathVariableMatcher.matcher(operation.path);
|
Matcher match = pathVariableMatcher.matcher(operation.path);
|
||||||
while (match.find()) {
|
while (match.find()) {
|
||||||
String completeMatch = match.group();
|
String completeMatch = match.group();
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{{#isBoolean}}Boolean.valueOf({{/isBoolean}}{{#isInteger}}Integer.parseInt({{/isInteger}}{{#isDouble}}Double.parseDouble({{/isDouble}}{{#isLong}}Long.parseLong({{/isLong}}{{#isFloat}}Float.parseFloat({{/isFloat}}{{#isString}}(String){{/isString}}{{#isDateTime}}OffsetDateTime.parse({{/isDateTime}}
|
{{#isBoolean}}Boolean.valueOf({{/isBoolean}}{{#isInteger}}Integer.parseInt({{/isInteger}}{{#isDouble}}Double.parseDouble({{/isDouble}}{{#isLong}}Long.parseLong({{/isLong}}{{#isFloat}}Float.parseFloat({{/isFloat}}{{#isDateTime}}OffsetDateTime.parse({{/isDateTime}}
|
||||||
@@ -1 +1 @@
|
|||||||
{{#isBoolean}}){{/isBoolean}}{{#isInteger}}){{/isInteger}}{{#isDouble}}){{/isDouble}}{{#isLong}}){{/isLong}}{{#isFloat}}){{/isFloat}}{{#isString}}{{/isString}}{{#isDateTime}}){{/isDateTime}}
|
{{#isBoolean}}){{/isBoolean}}{{#isInteger}}){{/isInteger}}{{#isDouble}}){{/isDouble}}{{#isLong}}){{/isLong}}{{#isFloat}}){{/isFloat}}{{#isDateTime}}){{/isDateTime}}
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
{{/gson}}
|
{{/gson}}
|
||||||
|
|
||||||
private {{{datatype}}} value;
|
private final {{{datatype}}} value;
|
||||||
|
|
||||||
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{datatype}}} value) {
|
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{datatype}}} value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
|
|||||||
{{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}}
|
{{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}}
|
||||||
{{/gson}}
|
{{/gson}}
|
||||||
|
|
||||||
private {{{dataType}}} value;
|
private final {{{dataType}}} value;
|
||||||
|
|
||||||
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) {
|
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
package {{package}};
|
package {{package}};
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
{{#imports}}import {{import}};
|
{{#imports}}import {{import}};
|
||||||
{{/imports}}
|
{{/imports}}
|
||||||
{{#serializableModel}}
|
{{#serializableModel}}
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
{{/serializableModel}}
|
{{/serializableModel}}
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
{{#useBeanValidation}}
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
import javax.validation.constraints.*;
|
|
||||||
{{/useBeanValidation}}
|
|
||||||
{{#models}}
|
{{#models}}
|
||||||
{{#model}}
|
{{#model}}
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
import java.io.File;
|
||||||
|
{{^handleExceptions}}
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
{{/handleExceptions}}
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -90,7 +93,8 @@ public class {{classname}}Controller extends Controller {
|
|||||||
{{#formParams}}
|
{{#formParams}}
|
||||||
{{^notFile}}
|
{{^notFile}}
|
||||||
{{{dataType}}} {{paramName}} = request().body().asMultipartFormData().getFile("{{baseName}}");
|
{{{dataType}}} {{paramName}} = request().body().asMultipartFormData().getFile("{{baseName}}");
|
||||||
{{#required}}if (({{paramName}} == null || ((File) {{paramName}}.getFile()).length() == 0)) {
|
{{#required}}
|
||||||
|
if (({{paramName}} == null || ((File) {{paramName}}.getFile()).length() == 0)) {
|
||||||
throw new RuntimeException("File cannot be empty");
|
throw new RuntimeException("File cannot be empty");
|
||||||
}
|
}
|
||||||
{{/required}}
|
{{/required}}
|
||||||
@@ -148,10 +152,21 @@ public class {{classname}}Controller extends Controller {
|
|||||||
entry.getValue().validate();
|
entry.getValue().validate();
|
||||||
}
|
}
|
||||||
{{/isMapContainer}}{{^returnContainer}}obj.validate();{{/returnContainer}}{{/useBeanValidation}}{{/returnTypeIsPrimitive}}{{/isResponseFile}}{{/returnType}}
|
{{/isMapContainer}}{{^returnContainer}}obj.validate();{{/returnContainer}}{{/useBeanValidation}}{{/returnTypeIsPrimitive}}{{/isResponseFile}}{{/returnType}}
|
||||||
{{#returnType}}{{^isResponseFile}}JsonNode result = mapper.valueToTree(obj);
|
{{#returnType}}
|
||||||
return ok(result);{{/isResponseFile}}{{#isResponseFile}}return ok(obj);{{/isResponseFile}}{{/returnType}}
|
{{^isResponseFile}}JsonNode result = mapper.valueToTree(obj);
|
||||||
{{^returnType}}return ok();{{/returnType}}{{/controllerOnly}}
|
return ok(result);
|
||||||
{{#controllerOnly}}return ok();{{/controllerOnly}}
|
{{/isResponseFile}}
|
||||||
|
{{#isResponseFile}}
|
||||||
|
return ok(obj);
|
||||||
|
{{/isResponseFile}}
|
||||||
|
{{/returnType}}
|
||||||
|
{{^returnType}}
|
||||||
|
return ok();
|
||||||
|
{{/returnType}}
|
||||||
|
{{/controllerOnly}}
|
||||||
|
{{#controllerOnly}}
|
||||||
|
return ok();
|
||||||
|
{{/controllerOnly}}
|
||||||
}
|
}
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import javax.validation.constraints.*;
|
|||||||
{{/useBeanValidation}}
|
{{/useBeanValidation}}
|
||||||
|
|
||||||
{{#operations}}
|
{{#operations}}
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface {{classname}}ControllerImpInterface {
|
public interface {{classname}}ControllerImpInterface {
|
||||||
{{#operation}}
|
{{#operation}}
|
||||||
{{>returnTypes}} {{operationId}}({{#allParams}}{{>pathParams}}{{>queryParams}}{{>bodyParams}}{{>formParams}}{{>headerParams}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {{#handleExceptions}}throws Exception{{/handleExceptions}};
|
{{>returnTypes}} {{operationId}}({{#allParams}}{{>pathParams}}{{>queryParams}}{{>bodyParams}}{{>formParams}}{{>headerParams}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {{#handleExceptions}}throws Exception{{/handleExceptions}};
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
|
import java.util.Objects;
|
||||||
|
{{#useBeanValidation}}
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
{{/useBeanValidation}}
|
||||||
/**
|
/**
|
||||||
* {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}}
|
* {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}}
|
||||||
*/
|
*/
|
||||||
{{>generatedAnnotation}}
|
{{>generatedAnnotation}}
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
|
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
@@ -39,11 +44,11 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
|
|
||||||
public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
|
public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
|
||||||
{{^required}}
|
{{^required}}
|
||||||
if (this.{{name}} == null) {
|
if ({{name}} == null) {
|
||||||
this.{{name}} = {{{defaultValue}}};
|
{{name}} = {{{defaultValue}}};
|
||||||
}
|
}
|
||||||
{{/required}}
|
{{/required}}
|
||||||
this.{{name}}.add({{name}}Item);
|
{{name}}.add({{name}}Item);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
{{/isListContainer}}
|
{{/isListContainer}}
|
||||||
@@ -97,7 +102,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
return false;
|
return false;
|
||||||
}{{#hasVars}}
|
}{{#hasVars}}
|
||||||
{{classname}} {{classVarName}} = ({{classname}}) o;
|
{{classname}} {{classVarName}} = ({{classname}}) o;
|
||||||
return {{#vars}}Objects.equals(this.{{name}}, {{classVarName}}.{{name}}){{#hasMore}} &&
|
return {{#vars}}Objects.equals({{name}}, {{classVarName}}.{{name}}){{#hasMore}} &&
|
||||||
{{/hasMore}}{{/vars}}{{#parent}} &&
|
{{/hasMore}}{{/vars}}{{#parent}} &&
|
||||||
super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}}
|
super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}}
|
||||||
return true;{{/hasVars}}
|
return true;{{/hasVars}}
|
||||||
@@ -108,6 +113,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
return Objects.hash({{#vars}}{{name}}{{#hasMore}}, {{/hasMore}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}});
|
return Objects.hash({{#vars}}{{name}}{{#hasMore}}, {{/hasMore}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* A category for a pet
|
* A category for a pet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Category {
|
public class Category {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -60,8 +61,8 @@ public class Category {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Category category = (Category) o;
|
Category category = (Category) o;
|
||||||
return Objects.equals(this.id, category.id) &&
|
return Objects.equals(id, category.id) &&
|
||||||
Objects.equals(this.name, category.name);
|
Objects.equals(name, category.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,6 +70,7 @@ public class Category {
|
|||||||
return Objects.hash(id, name);
|
return Objects.hash(id, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Describes the result of uploading an image resource
|
* Describes the result of uploading an image resource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class ModelApiResponse {
|
public class ModelApiResponse {
|
||||||
@JsonProperty("code")
|
@JsonProperty("code")
|
||||||
private Integer code = null;
|
private Integer code = null;
|
||||||
@@ -80,9 +81,9 @@ public class ModelApiResponse {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ModelApiResponse _apiResponse = (ModelApiResponse) o;
|
ModelApiResponse _apiResponse = (ModelApiResponse) o;
|
||||||
return Objects.equals(this.code, _apiResponse.code) &&
|
return Objects.equals(code, _apiResponse.code) &&
|
||||||
Objects.equals(this.type, _apiResponse.type) &&
|
Objects.equals(type, _apiResponse.type) &&
|
||||||
Objects.equals(this.message, _apiResponse.message);
|
Objects.equals(message, _apiResponse.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -90,6 +91,7 @@ public class ModelApiResponse {
|
|||||||
return Objects.hash(code, type, message);
|
return Objects.hash(code, type, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* An order for a pets from the pet store
|
* An order for a pets from the pet store
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Order {
|
public class Order {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -33,7 +34,7 @@ public class Order {
|
|||||||
|
|
||||||
DELIVERED("delivered");
|
DELIVERED("delivered");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
StatusEnum(String value) {
|
StatusEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -175,12 +176,12 @@ public class Order {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Order order = (Order) o;
|
Order order = (Order) o;
|
||||||
return Objects.equals(this.id, order.id) &&
|
return Objects.equals(id, order.id) &&
|
||||||
Objects.equals(this.petId, order.petId) &&
|
Objects.equals(petId, order.petId) &&
|
||||||
Objects.equals(this.quantity, order.quantity) &&
|
Objects.equals(quantity, order.quantity) &&
|
||||||
Objects.equals(this.shipDate, order.shipDate) &&
|
Objects.equals(shipDate, order.shipDate) &&
|
||||||
Objects.equals(this.status, order.status) &&
|
Objects.equals(status, order.status) &&
|
||||||
Objects.equals(this.complete, order.complete);
|
Objects.equals(complete, order.complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -188,6 +189,7 @@ public class Order {
|
|||||||
return Objects.hash(id, petId, quantity, shipDate, status, complete);
|
return Objects.hash(id, petId, quantity, shipDate, status, complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import apimodels.Category;
|
import apimodels.Category;
|
||||||
import apimodels.Tag;
|
import apimodels.Tag;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -8,11 +7,13 @@ import java.util.List;
|
|||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* A pet for sale in the pet store
|
* A pet for sale in the pet store
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Pet {
|
public class Pet {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -24,7 +25,7 @@ public class Pet {
|
|||||||
private String name = null;
|
private String name = null;
|
||||||
|
|
||||||
@JsonProperty("photoUrls")
|
@JsonProperty("photoUrls")
|
||||||
private List<String> photoUrls = new ArrayList<String>();
|
private List<String> photoUrls = new ArrayList<>();
|
||||||
|
|
||||||
@JsonProperty("tags")
|
@JsonProperty("tags")
|
||||||
private List<Tag> tags = null;
|
private List<Tag> tags = null;
|
||||||
@@ -39,7 +40,7 @@ public class Pet {
|
|||||||
|
|
||||||
SOLD("sold");
|
SOLD("sold");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
StatusEnum(String value) {
|
StatusEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -124,7 +125,7 @@ public class Pet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
||||||
this.photoUrls.add(photoUrlsItem);
|
photoUrls.add(photoUrlsItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,10 +148,10 @@ public class Pet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Pet addTagsItem(Tag tagsItem) {
|
public Pet addTagsItem(Tag tagsItem) {
|
||||||
if (this.tags == null) {
|
if (tags == null) {
|
||||||
this.tags = new ArrayList<Tag>();
|
tags = new ArrayList<>();
|
||||||
}
|
}
|
||||||
this.tags.add(tagsItem);
|
tags.add(tagsItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,12 +195,12 @@ public class Pet {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Pet pet = (Pet) o;
|
Pet pet = (Pet) o;
|
||||||
return Objects.equals(this.id, pet.id) &&
|
return Objects.equals(id, pet.id) &&
|
||||||
Objects.equals(this.category, pet.category) &&
|
Objects.equals(category, pet.category) &&
|
||||||
Objects.equals(this.name, pet.name) &&
|
Objects.equals(name, pet.name) &&
|
||||||
Objects.equals(this.photoUrls, pet.photoUrls) &&
|
Objects.equals(photoUrls, pet.photoUrls) &&
|
||||||
Objects.equals(this.tags, pet.tags) &&
|
Objects.equals(tags, pet.tags) &&
|
||||||
Objects.equals(this.status, pet.status);
|
Objects.equals(status, pet.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -207,6 +208,7 @@ public class Pet {
|
|||||||
return Objects.hash(id, category, name, photoUrls, tags, status);
|
return Objects.hash(id, category, name, photoUrls, tags, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* A tag for a pet
|
* A tag for a pet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Tag {
|
public class Tag {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -60,8 +61,8 @@ public class Tag {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Tag tag = (Tag) o;
|
Tag tag = (Tag) o;
|
||||||
return Objects.equals(this.id, tag.id) &&
|
return Objects.equals(id, tag.id) &&
|
||||||
Objects.equals(this.name, tag.name);
|
Objects.equals(name, tag.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,6 +70,7 @@ public class Tag {
|
|||||||
return Objects.hash(id, name);
|
return Objects.hash(id, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* A User who is purchasing from the pet store
|
* A User who is purchasing from the pet store
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class User {
|
public class User {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -180,14 +181,14 @@ public class User {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
User user = (User) o;
|
User user = (User) o;
|
||||||
return Objects.equals(this.id, user.id) &&
|
return Objects.equals(id, user.id) &&
|
||||||
Objects.equals(this.username, user.username) &&
|
Objects.equals(username, user.username) &&
|
||||||
Objects.equals(this.firstName, user.firstName) &&
|
Objects.equals(firstName, user.firstName) &&
|
||||||
Objects.equals(this.lastName, user.lastName) &&
|
Objects.equals(lastName, user.lastName) &&
|
||||||
Objects.equals(this.email, user.email) &&
|
Objects.equals(email, user.email) &&
|
||||||
Objects.equals(this.password, user.password) &&
|
Objects.equals(password, user.password) &&
|
||||||
Objects.equals(this.phone, user.phone) &&
|
Objects.equals(phone, user.phone) &&
|
||||||
Objects.equals(this.userStatus, user.userStatus);
|
Objects.equals(userStatus, user.userStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -195,6 +196,7 @@ public class User {
|
|||||||
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
|
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.io.IOException;
|
import java.io.File;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -40,7 +40,6 @@ public class PetApiController extends Controller {
|
|||||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
body = mapper.readValue(nodebody.toString(), Pet.class);
|
||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,12 +48,11 @@ public class PetApiController extends Controller {
|
|||||||
String valueapiKey = request().getHeader("api_key");
|
String valueapiKey = request().getHeader("api_key");
|
||||||
String apiKey;
|
String apiKey;
|
||||||
if (valueapiKey != null) {
|
if (valueapiKey != null) {
|
||||||
apiKey = (String)valueapiKey;
|
apiKey = valueapiKey;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
apiKey = null;
|
apiKey = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +64,6 @@ public class PetApiController extends Controller {
|
|||||||
//noinspection UseBulkOperation
|
//noinspection UseBulkOperation
|
||||||
status.add(curParam);
|
status.add(curParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,13 +75,11 @@ public class PetApiController extends Controller {
|
|||||||
//noinspection UseBulkOperation
|
//noinspection UseBulkOperation
|
||||||
tags.add(curParam);
|
tags.add(curParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result getPetById(Long petId) throws Exception {
|
public Result getPetById(Long petId) throws Exception {
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,7 +91,6 @@ public class PetApiController extends Controller {
|
|||||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
body = mapper.readValue(nodebody.toString(), Pet.class);
|
||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,7 +99,7 @@ public class PetApiController extends Controller {
|
|||||||
String valuename = (request().body().asMultipartFormData().asFormUrlEncoded().get("name"))[0];
|
String valuename = (request().body().asMultipartFormData().asFormUrlEncoded().get("name"))[0];
|
||||||
String name;
|
String name;
|
||||||
if (valuename != null) {
|
if (valuename != null) {
|
||||||
name = (String)valuename;
|
name = valuename;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
name = null;
|
name = null;
|
||||||
@@ -113,12 +107,11 @@ public class PetApiController extends Controller {
|
|||||||
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||||
String status;
|
String status;
|
||||||
if (valuestatus != null) {
|
if (valuestatus != null) {
|
||||||
status = (String)valuestatus;
|
status = valuestatus;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
status = null;
|
status = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,13 +120,12 @@ public class PetApiController extends Controller {
|
|||||||
String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0];
|
String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0];
|
||||||
String additionalMetadata;
|
String additionalMetadata;
|
||||||
if (valueadditionalMetadata != null) {
|
if (valueadditionalMetadata != null) {
|
||||||
additionalMetadata = (String)valueadditionalMetadata;
|
additionalMetadata = valueadditionalMetadata;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
additionalMetadata = null;
|
additionalMetadata = null;
|
||||||
}
|
}
|
||||||
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.io.IOException;
|
import java.io.File;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -33,19 +33,16 @@ public class StoreApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result deleteOrder(String orderId) throws Exception {
|
public Result deleteOrder(String orderId) throws Exception {
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result getInventory() throws Exception {
|
public Result getInventory() throws Exception {
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result getOrderById( @Min(1) @Max(5)Long orderId) throws Exception {
|
public Result getOrderById( @Min(1) @Max(5)Long orderId) throws Exception {
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +54,6 @@ public class StoreApiController extends Controller {
|
|||||||
body = mapper.readValue(nodebody.toString(), Order.class);
|
body = mapper.readValue(nodebody.toString(), Order.class);
|
||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.io.IOException;
|
import java.io.File;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -39,7 +39,6 @@ public class UserApiController extends Controller {
|
|||||||
body = mapper.readValue(nodebody.toString(), User.class);
|
body = mapper.readValue(nodebody.toString(), User.class);
|
||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +52,6 @@ public class UserApiController extends Controller {
|
|||||||
curItem.validate();
|
curItem.validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,19 +65,16 @@ public class UserApiController extends Controller {
|
|||||||
curItem.validate();
|
curItem.validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result deleteUser(String username) throws Exception {
|
public Result deleteUser(String username) throws Exception {
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result getUserByName(String username) throws Exception {
|
public Result getUserByName(String username) throws Exception {
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,20 +83,18 @@ public class UserApiController extends Controller {
|
|||||||
String valueusername = request().getQueryString("username");
|
String valueusername = request().getQueryString("username");
|
||||||
String username;
|
String username;
|
||||||
|
|
||||||
username = (String)valueusername;
|
username = valueusername;
|
||||||
|
|
||||||
String valuepassword = request().getQueryString("password");
|
String valuepassword = request().getQueryString("password");
|
||||||
String password;
|
String password;
|
||||||
|
|
||||||
password = (String)valuepassword;
|
password = valuepassword;
|
||||||
|
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result logoutUser() throws Exception {
|
public Result logoutUser() throws Exception {
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,7 +106,6 @@ public class UserApiController extends Controller {
|
|||||||
body = mapper.readValue(nodebody.toString(), User.class);
|
body = mapper.readValue(nodebody.toString(), User.class);
|
||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
2017-08-08 12:56:15,882 [INFO] from play.api.Play in ForkJoinPool-1-worker-1 - Application started (Dev)
|
|
||||||
@@ -1,17 +1,18 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* AdditionalPropertiesClass
|
* AdditionalPropertiesClass
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class AdditionalPropertiesClass {
|
public class AdditionalPropertiesClass {
|
||||||
@JsonProperty("map_property")
|
@JsonProperty("map_property")
|
||||||
private Map<String, String> mapProperty = null;
|
private Map<String, String> mapProperty = null;
|
||||||
@@ -26,7 +27,7 @@ public class AdditionalPropertiesClass {
|
|||||||
|
|
||||||
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
|
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
|
||||||
if (this.mapProperty == null) {
|
if (this.mapProperty == null) {
|
||||||
this.mapProperty = new HashMap<String, String>();
|
this.mapProperty = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.mapProperty.put(key, mapPropertyItem);
|
this.mapProperty.put(key, mapPropertyItem);
|
||||||
return this;
|
return this;
|
||||||
@@ -51,7 +52,7 @@ public class AdditionalPropertiesClass {
|
|||||||
|
|
||||||
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
|
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
|
||||||
if (this.mapOfMapProperty == null) {
|
if (this.mapOfMapProperty == null) {
|
||||||
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
|
this.mapOfMapProperty = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
|
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
|
||||||
return this;
|
return this;
|
||||||
@@ -80,8 +81,8 @@ public class AdditionalPropertiesClass {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
|
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
|
||||||
return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) &&
|
return Objects.equals(mapProperty, additionalPropertiesClass.mapProperty) &&
|
||||||
Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
|
Objects.equals(mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -89,6 +90,7 @@ public class AdditionalPropertiesClass {
|
|||||||
return Objects.hash(mapProperty, mapOfMapProperty);
|
return Objects.hash(mapProperty, mapOfMapProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Animal
|
* Animal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Animal {
|
public class Animal {
|
||||||
@JsonProperty("className")
|
@JsonProperty("className")
|
||||||
private String className = null;
|
private String className = null;
|
||||||
@@ -63,8 +64,8 @@ public class Animal {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Animal animal = (Animal) o;
|
Animal animal = (Animal) o;
|
||||||
return Objects.equals(this.className, animal.className) &&
|
return Objects.equals(className, animal.className) &&
|
||||||
Objects.equals(this.color, animal.color);
|
Objects.equals(color, animal.color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -72,6 +73,7 @@ public class Animal {
|
|||||||
return Objects.hash(className, color);
|
return Objects.hash(className, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import apimodels.Animal;
|
import apimodels.Animal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* AnimalFarm
|
* AnimalFarm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class AnimalFarm extends ArrayList<Animal> {
|
public class AnimalFarm extends ArrayList<Animal> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -30,6 +31,7 @@ public class AnimalFarm extends ArrayList<Animal> {
|
|||||||
return Objects.hash(super.hashCode());
|
return Objects.hash(super.hashCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* ArrayOfArrayOfNumberOnly
|
* ArrayOfArrayOfNumberOnly
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class ArrayOfArrayOfNumberOnly {
|
public class ArrayOfArrayOfNumberOnly {
|
||||||
@JsonProperty("ArrayArrayNumber")
|
@JsonProperty("ArrayArrayNumber")
|
||||||
private List<List<BigDecimal>> arrayArrayNumber = null;
|
private List<List<BigDecimal>> arrayArrayNumber = null;
|
||||||
@@ -22,10 +23,10 @@ public class ArrayOfArrayOfNumberOnly {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
|
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
|
||||||
if (this.arrayArrayNumber == null) {
|
if (arrayArrayNumber == null) {
|
||||||
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
|
arrayArrayNumber = new ArrayList<>();
|
||||||
}
|
}
|
||||||
this.arrayArrayNumber.add(arrayArrayNumberItem);
|
arrayArrayNumber.add(arrayArrayNumberItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,7 +53,7 @@ public class ArrayOfArrayOfNumberOnly {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o;
|
ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o;
|
||||||
return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber);
|
return Objects.equals(arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -60,6 +61,7 @@ public class ArrayOfArrayOfNumberOnly {
|
|||||||
return Objects.hash(arrayArrayNumber);
|
return Objects.hash(arrayArrayNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* ArrayOfNumberOnly
|
* ArrayOfNumberOnly
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class ArrayOfNumberOnly {
|
public class ArrayOfNumberOnly {
|
||||||
@JsonProperty("ArrayNumber")
|
@JsonProperty("ArrayNumber")
|
||||||
private List<BigDecimal> arrayNumber = null;
|
private List<BigDecimal> arrayNumber = null;
|
||||||
@@ -22,10 +23,10 @@ public class ArrayOfNumberOnly {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
|
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
|
||||||
if (this.arrayNumber == null) {
|
if (arrayNumber == null) {
|
||||||
this.arrayNumber = new ArrayList<BigDecimal>();
|
arrayNumber = new ArrayList<>();
|
||||||
}
|
}
|
||||||
this.arrayNumber.add(arrayNumberItem);
|
arrayNumber.add(arrayNumberItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,7 +53,7 @@ public class ArrayOfNumberOnly {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o;
|
ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o;
|
||||||
return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber);
|
return Objects.equals(arrayNumber, arrayOfNumberOnly.arrayNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -60,6 +61,7 @@ public class ArrayOfNumberOnly {
|
|||||||
return Objects.hash(arrayNumber);
|
return Objects.hash(arrayNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import apimodels.ReadOnlyFirst;
|
import apimodels.ReadOnlyFirst;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* ArrayTest
|
* ArrayTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class ArrayTest {
|
public class ArrayTest {
|
||||||
@JsonProperty("array_of_string")
|
@JsonProperty("array_of_string")
|
||||||
private List<String> arrayOfString = null;
|
private List<String> arrayOfString = null;
|
||||||
@@ -28,10 +29,10 @@ public class ArrayTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
|
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
|
||||||
if (this.arrayOfString == null) {
|
if (arrayOfString == null) {
|
||||||
this.arrayOfString = new ArrayList<String>();
|
arrayOfString = new ArrayList<>();
|
||||||
}
|
}
|
||||||
this.arrayOfString.add(arrayOfStringItem);
|
arrayOfString.add(arrayOfStringItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,10 +54,10 @@ public class ArrayTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
|
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
|
||||||
if (this.arrayArrayOfInteger == null) {
|
if (arrayArrayOfInteger == null) {
|
||||||
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
|
arrayArrayOfInteger = new ArrayList<>();
|
||||||
}
|
}
|
||||||
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
|
arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,10 +80,10 @@ public class ArrayTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
|
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
|
||||||
if (this.arrayArrayOfModel == null) {
|
if (arrayArrayOfModel == null) {
|
||||||
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
|
arrayArrayOfModel = new ArrayList<>();
|
||||||
}
|
}
|
||||||
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
|
arrayArrayOfModel.add(arrayArrayOfModelItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,9 +110,9 @@ public class ArrayTest {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ArrayTest arrayTest = (ArrayTest) o;
|
ArrayTest arrayTest = (ArrayTest) o;
|
||||||
return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) &&
|
return Objects.equals(arrayOfString, arrayTest.arrayOfString) &&
|
||||||
Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) &&
|
Objects.equals(arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) &&
|
||||||
Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel);
|
Objects.equals(arrayArrayOfModel, arrayTest.arrayArrayOfModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -119,6 +120,7 @@ public class ArrayTest {
|
|||||||
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel);
|
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Capitalization
|
* Capitalization
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Capitalization {
|
public class Capitalization {
|
||||||
@JsonProperty("smallCamel")
|
@JsonProperty("smallCamel")
|
||||||
private String smallCamel = null;
|
private String smallCamel = null;
|
||||||
@@ -140,12 +141,12 @@ public class Capitalization {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Capitalization capitalization = (Capitalization) o;
|
Capitalization capitalization = (Capitalization) o;
|
||||||
return Objects.equals(this.smallCamel, capitalization.smallCamel) &&
|
return Objects.equals(smallCamel, capitalization.smallCamel) &&
|
||||||
Objects.equals(this.capitalCamel, capitalization.capitalCamel) &&
|
Objects.equals(capitalCamel, capitalization.capitalCamel) &&
|
||||||
Objects.equals(this.smallSnake, capitalization.smallSnake) &&
|
Objects.equals(smallSnake, capitalization.smallSnake) &&
|
||||||
Objects.equals(this.capitalSnake, capitalization.capitalSnake) &&
|
Objects.equals(capitalSnake, capitalization.capitalSnake) &&
|
||||||
Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
|
Objects.equals(scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
|
||||||
Objects.equals(this.ATT_NAME, capitalization.ATT_NAME);
|
Objects.equals(ATT_NAME, capitalization.ATT_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -153,6 +154,7 @@ public class Capitalization {
|
|||||||
return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
|
return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import apimodels.Animal;
|
import apimodels.Animal;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
@JsonProperty("declawed")
|
@JsonProperty("declawed")
|
||||||
private Boolean declawed = null;
|
private Boolean declawed = null;
|
||||||
@@ -41,7 +42,7 @@ public class Cat extends Animal {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Cat cat = (Cat) o;
|
Cat cat = (Cat) o;
|
||||||
return Objects.equals(this.declawed, cat.declawed) &&
|
return Objects.equals(declawed, cat.declawed) &&
|
||||||
super.equals(o);
|
super.equals(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,6 +51,7 @@ public class Cat extends Animal {
|
|||||||
return Objects.hash(declawed, super.hashCode());
|
return Objects.hash(declawed, super.hashCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Category
|
* Category
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Category {
|
public class Category {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -60,8 +61,8 @@ public class Category {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Category category = (Category) o;
|
Category category = (Category) o;
|
||||||
return Objects.equals(this.id, category.id) &&
|
return Objects.equals(id, category.id) &&
|
||||||
Objects.equals(this.name, category.name);
|
Objects.equals(name, category.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,6 +70,7 @@ public class Category {
|
|||||||
return Objects.hash(id, name);
|
return Objects.hash(id, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Model for testing model with \"_class\" property
|
* Model for testing model with \"_class\" property
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class ClassModel {
|
public class ClassModel {
|
||||||
@JsonProperty("_class")
|
@JsonProperty("_class")
|
||||||
private String propertyClass = null;
|
private String propertyClass = null;
|
||||||
@@ -40,7 +41,7 @@ public class ClassModel {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ClassModel classModel = (ClassModel) o;
|
ClassModel classModel = (ClassModel) o;
|
||||||
return Objects.equals(this.propertyClass, classModel.propertyClass);
|
return Objects.equals(propertyClass, classModel.propertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -48,6 +49,7 @@ public class ClassModel {
|
|||||||
return Objects.hash(propertyClass);
|
return Objects.hash(propertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Client
|
* Client
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Client {
|
public class Client {
|
||||||
@JsonProperty("client")
|
@JsonProperty("client")
|
||||||
private String client = null;
|
private String client = null;
|
||||||
@@ -40,7 +41,7 @@ public class Client {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Client client = (Client) o;
|
Client client = (Client) o;
|
||||||
return Objects.equals(this.client, client.client);
|
return Objects.equals(client, client.client);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -48,6 +49,7 @@ public class Client {
|
|||||||
return Objects.hash(client);
|
return Objects.hash(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import apimodels.Animal;
|
import apimodels.Animal;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
@JsonProperty("breed")
|
@JsonProperty("breed")
|
||||||
private String breed = null;
|
private String breed = null;
|
||||||
@@ -41,7 +42,7 @@ public class Dog extends Animal {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Dog dog = (Dog) o;
|
Dog dog = (Dog) o;
|
||||||
return Objects.equals(this.breed, dog.breed) &&
|
return Objects.equals(breed, dog.breed) &&
|
||||||
super.equals(o);
|
super.equals(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,6 +51,7 @@ public class Dog extends Animal {
|
|||||||
return Objects.hash(breed, super.hashCode());
|
return Objects.hash(breed, super.hashCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* EnumArrays
|
* EnumArrays
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class EnumArrays {
|
public class EnumArrays {
|
||||||
/**
|
/**
|
||||||
* Gets or Sets justSymbol
|
* Gets or Sets justSymbol
|
||||||
@@ -20,7 +21,7 @@ public class EnumArrays {
|
|||||||
|
|
||||||
DOLLAR("$");
|
DOLLAR("$");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
JustSymbolEnum(String value) {
|
JustSymbolEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -54,7 +55,7 @@ public class EnumArrays {
|
|||||||
|
|
||||||
CRAB("crab");
|
CRAB("crab");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
ArrayEnumEnum(String value) {
|
ArrayEnumEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -103,10 +104,10 @@ public class EnumArrays {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
|
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
|
||||||
if (this.arrayEnum == null) {
|
if (arrayEnum == null) {
|
||||||
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
|
arrayEnum = new ArrayList<>();
|
||||||
}
|
}
|
||||||
this.arrayEnum.add(arrayEnumItem);
|
arrayEnum.add(arrayEnumItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,8 +133,8 @@ public class EnumArrays {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
EnumArrays enumArrays = (EnumArrays) o;
|
EnumArrays enumArrays = (EnumArrays) o;
|
||||||
return Objects.equals(this.justSymbol, enumArrays.justSymbol) &&
|
return Objects.equals(justSymbol, enumArrays.justSymbol) &&
|
||||||
Objects.equals(this.arrayEnum, enumArrays.arrayEnum);
|
Objects.equals(arrayEnum, enumArrays.arrayEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -141,6 +142,7 @@ public class EnumArrays {
|
|||||||
return Objects.hash(justSymbol, arrayEnum);
|
return Objects.hash(justSymbol, arrayEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -18,7 +16,7 @@ public enum EnumClass {
|
|||||||
|
|
||||||
_XYZ_("(xyz)");
|
_XYZ_("(xyz)");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
EnumClass(String value) {
|
EnumClass(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import apimodels.OuterEnum;
|
import apimodels.OuterEnum;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* EnumTest
|
* EnumTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class EnumTest {
|
public class EnumTest {
|
||||||
/**
|
/**
|
||||||
* Gets or Sets enumString
|
* Gets or Sets enumString
|
||||||
@@ -21,7 +22,7 @@ public class EnumTest {
|
|||||||
|
|
||||||
EMPTY("");
|
EMPTY("");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
EnumStringEnum(String value) {
|
EnumStringEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -55,7 +56,7 @@ public class EnumTest {
|
|||||||
|
|
||||||
NUMBER_MINUS_1(-1);
|
NUMBER_MINUS_1(-1);
|
||||||
|
|
||||||
private Integer value;
|
private final Integer value;
|
||||||
|
|
||||||
EnumIntegerEnum(Integer value) {
|
EnumIntegerEnum(Integer value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -89,7 +90,7 @@ public class EnumTest {
|
|||||||
|
|
||||||
NUMBER_MINUS_1_DOT_2(-1.2);
|
NUMBER_MINUS_1_DOT_2(-1.2);
|
||||||
|
|
||||||
private Double value;
|
private final Double value;
|
||||||
|
|
||||||
EnumNumberEnum(Double value) {
|
EnumNumberEnum(Double value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -197,10 +198,10 @@ public class EnumTest {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
EnumTest enumTest = (EnumTest) o;
|
EnumTest enumTest = (EnumTest) o;
|
||||||
return Objects.equals(this.enumString, enumTest.enumString) &&
|
return Objects.equals(enumString, enumTest.enumString) &&
|
||||||
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
|
Objects.equals(enumInteger, enumTest.enumInteger) &&
|
||||||
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
|
Objects.equals(enumNumber, enumTest.enumNumber) &&
|
||||||
Objects.equals(this.outerEnum, enumTest.outerEnum);
|
Objects.equals(outerEnum, enumTest.outerEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -208,6 +209,7 @@ public class EnumTest {
|
|||||||
return Objects.hash(enumString, enumInteger, enumNumber, outerEnum);
|
return Objects.hash(enumString, enumInteger, enumNumber, outerEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@@ -8,11 +7,13 @@ import java.util.UUID;
|
|||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* FormatTest
|
* FormatTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class FormatTest {
|
public class FormatTest {
|
||||||
@JsonProperty("integer")
|
@JsonProperty("integer")
|
||||||
private Integer integer = null;
|
private Integer integer = null;
|
||||||
@@ -315,19 +316,19 @@ public class FormatTest {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
FormatTest formatTest = (FormatTest) o;
|
FormatTest formatTest = (FormatTest) o;
|
||||||
return Objects.equals(this.integer, formatTest.integer) &&
|
return Objects.equals(integer, formatTest.integer) &&
|
||||||
Objects.equals(this.int32, formatTest.int32) &&
|
Objects.equals(int32, formatTest.int32) &&
|
||||||
Objects.equals(this.int64, formatTest.int64) &&
|
Objects.equals(int64, formatTest.int64) &&
|
||||||
Objects.equals(this.number, formatTest.number) &&
|
Objects.equals(number, formatTest.number) &&
|
||||||
Objects.equals(this._float, formatTest._float) &&
|
Objects.equals(_float, formatTest._float) &&
|
||||||
Objects.equals(this._double, formatTest._double) &&
|
Objects.equals(_double, formatTest._double) &&
|
||||||
Objects.equals(this.string, formatTest.string) &&
|
Objects.equals(string, formatTest.string) &&
|
||||||
Objects.equals(this._byte, formatTest._byte) &&
|
Objects.equals(_byte, formatTest._byte) &&
|
||||||
Objects.equals(this.binary, formatTest.binary) &&
|
Objects.equals(binary, formatTest.binary) &&
|
||||||
Objects.equals(this.date, formatTest.date) &&
|
Objects.equals(date, formatTest.date) &&
|
||||||
Objects.equals(this.dateTime, formatTest.dateTime) &&
|
Objects.equals(dateTime, formatTest.dateTime) &&
|
||||||
Objects.equals(this.uuid, formatTest.uuid) &&
|
Objects.equals(uuid, formatTest.uuid) &&
|
||||||
Objects.equals(this.password, formatTest.password);
|
Objects.equals(password, formatTest.password);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -335,6 +336,7 @@ public class FormatTest {
|
|||||||
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password);
|
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* HasOnlyReadOnly
|
* HasOnlyReadOnly
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class HasOnlyReadOnly {
|
public class HasOnlyReadOnly {
|
||||||
@JsonProperty("bar")
|
@JsonProperty("bar")
|
||||||
private String bar = null;
|
private String bar = null;
|
||||||
@@ -60,8 +61,8 @@ public class HasOnlyReadOnly {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o;
|
HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o;
|
||||||
return Objects.equals(this.bar, hasOnlyReadOnly.bar) &&
|
return Objects.equals(bar, hasOnlyReadOnly.bar) &&
|
||||||
Objects.equals(this.foo, hasOnlyReadOnly.foo);
|
Objects.equals(foo, hasOnlyReadOnly.foo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,6 +70,7 @@ public class HasOnlyReadOnly {
|
|||||||
return Objects.hash(bar, foo);
|
return Objects.hash(bar, foo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* MapTest
|
* MapTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class MapTest {
|
public class MapTest {
|
||||||
@JsonProperty("map_map_of_string")
|
@JsonProperty("map_map_of_string")
|
||||||
private Map<String, Map<String, String>> mapMapOfString = null;
|
private Map<String, Map<String, String>> mapMapOfString = null;
|
||||||
@@ -24,7 +25,7 @@ public class MapTest {
|
|||||||
|
|
||||||
LOWER("lower");
|
LOWER("lower");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
InnerEnum(String value) {
|
InnerEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -57,7 +58,7 @@ public class MapTest {
|
|||||||
|
|
||||||
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
|
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
|
||||||
if (this.mapMapOfString == null) {
|
if (this.mapMapOfString == null) {
|
||||||
this.mapMapOfString = new HashMap<String, Map<String, String>>();
|
this.mapMapOfString = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.mapMapOfString.put(key, mapMapOfStringItem);
|
this.mapMapOfString.put(key, mapMapOfStringItem);
|
||||||
return this;
|
return this;
|
||||||
@@ -83,7 +84,7 @@ public class MapTest {
|
|||||||
|
|
||||||
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
|
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
|
||||||
if (this.mapOfEnumString == null) {
|
if (this.mapOfEnumString == null) {
|
||||||
this.mapOfEnumString = new HashMap<String, InnerEnum>();
|
this.mapOfEnumString = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.mapOfEnumString.put(key, mapOfEnumStringItem);
|
this.mapOfEnumString.put(key, mapOfEnumStringItem);
|
||||||
return this;
|
return this;
|
||||||
@@ -111,8 +112,8 @@ public class MapTest {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
MapTest mapTest = (MapTest) o;
|
MapTest mapTest = (MapTest) o;
|
||||||
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
|
return Objects.equals(mapMapOfString, mapTest.mapMapOfString) &&
|
||||||
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
|
Objects.equals(mapOfEnumString, mapTest.mapOfEnumString);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -120,6 +121,7 @@ public class MapTest {
|
|||||||
return Objects.hash(mapMapOfString, mapOfEnumString);
|
return Objects.hash(mapMapOfString, mapOfEnumString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import apimodels.Animal;
|
import apimodels.Animal;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -10,11 +9,13 @@ import java.util.UUID;
|
|||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* MixedPropertiesAndAdditionalPropertiesClass
|
* MixedPropertiesAndAdditionalPropertiesClass
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class MixedPropertiesAndAdditionalPropertiesClass {
|
public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||||
@JsonProperty("uuid")
|
@JsonProperty("uuid")
|
||||||
private UUID uuid = null;
|
private UUID uuid = null;
|
||||||
@@ -68,7 +69,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
|||||||
|
|
||||||
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
|
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
|
||||||
if (this.map == null) {
|
if (this.map == null) {
|
||||||
this.map = new HashMap<String, Animal>();
|
this.map = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.map.put(key, mapItem);
|
this.map.put(key, mapItem);
|
||||||
return this;
|
return this;
|
||||||
@@ -97,9 +98,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o;
|
MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o;
|
||||||
return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) &&
|
return Objects.equals(uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) &&
|
||||||
Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) &&
|
Objects.equals(dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) &&
|
||||||
Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map);
|
Objects.equals(map, mixedPropertiesAndAdditionalPropertiesClass.map);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -107,6 +108,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
|||||||
return Objects.hash(uuid, dateTime, map);
|
return Objects.hash(uuid, dateTime, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Model for testing model name starting with number
|
* Model for testing model name starting with number
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Model200Response {
|
public class Model200Response {
|
||||||
@JsonProperty("name")
|
@JsonProperty("name")
|
||||||
private Integer name = null;
|
private Integer name = null;
|
||||||
@@ -60,8 +61,8 @@ public class Model200Response {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Model200Response _200Response = (Model200Response) o;
|
Model200Response _200Response = (Model200Response) o;
|
||||||
return Objects.equals(this.name, _200Response.name) &&
|
return Objects.equals(name, _200Response.name) &&
|
||||||
Objects.equals(this.propertyClass, _200Response.propertyClass);
|
Objects.equals(propertyClass, _200Response.propertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,6 +70,7 @@ public class Model200Response {
|
|||||||
return Objects.hash(name, propertyClass);
|
return Objects.hash(name, propertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* ModelApiResponse
|
* ModelApiResponse
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class ModelApiResponse {
|
public class ModelApiResponse {
|
||||||
@JsonProperty("code")
|
@JsonProperty("code")
|
||||||
private Integer code = null;
|
private Integer code = null;
|
||||||
@@ -80,9 +81,9 @@ public class ModelApiResponse {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ModelApiResponse _apiResponse = (ModelApiResponse) o;
|
ModelApiResponse _apiResponse = (ModelApiResponse) o;
|
||||||
return Objects.equals(this.code, _apiResponse.code) &&
|
return Objects.equals(code, _apiResponse.code) &&
|
||||||
Objects.equals(this.type, _apiResponse.type) &&
|
Objects.equals(type, _apiResponse.type) &&
|
||||||
Objects.equals(this.message, _apiResponse.message);
|
Objects.equals(message, _apiResponse.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -90,6 +91,7 @@ public class ModelApiResponse {
|
|||||||
return Objects.hash(code, type, message);
|
return Objects.hash(code, type, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Model for testing reserved words
|
* Model for testing reserved words
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class ModelReturn {
|
public class ModelReturn {
|
||||||
@JsonProperty("return")
|
@JsonProperty("return")
|
||||||
private Integer _return = null;
|
private Integer _return = null;
|
||||||
@@ -40,7 +41,7 @@ public class ModelReturn {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ModelReturn _return = (ModelReturn) o;
|
ModelReturn _return = (ModelReturn) o;
|
||||||
return Objects.equals(this._return, _return._return);
|
return Objects.equals(_return, _return._return);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -48,6 +49,7 @@ public class ModelReturn {
|
|||||||
return Objects.hash(_return);
|
return Objects.hash(_return);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Model for testing model name same as property name
|
* Model for testing model name same as property name
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Name {
|
public class Name {
|
||||||
@JsonProperty("name")
|
@JsonProperty("name")
|
||||||
private Integer name = null;
|
private Integer name = null;
|
||||||
@@ -101,10 +102,10 @@ public class Name {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Name name = (Name) o;
|
Name name = (Name) o;
|
||||||
return Objects.equals(this.name, name.name) &&
|
return Objects.equals(name, name.name) &&
|
||||||
Objects.equals(this.snakeCase, name.snakeCase) &&
|
Objects.equals(snakeCase, name.snakeCase) &&
|
||||||
Objects.equals(this.property, name.property) &&
|
Objects.equals(property, name.property) &&
|
||||||
Objects.equals(this._123Number, name._123Number);
|
Objects.equals(_123Number, name._123Number);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -112,6 +113,7 @@ public class Name {
|
|||||||
return Objects.hash(name, snakeCase, property, _123Number);
|
return Objects.hash(name, snakeCase, property, _123Number);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* NumberOnly
|
* NumberOnly
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class NumberOnly {
|
public class NumberOnly {
|
||||||
@JsonProperty("JustNumber")
|
@JsonProperty("JustNumber")
|
||||||
private BigDecimal justNumber = null;
|
private BigDecimal justNumber = null;
|
||||||
@@ -42,7 +43,7 @@ public class NumberOnly {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
NumberOnly numberOnly = (NumberOnly) o;
|
NumberOnly numberOnly = (NumberOnly) o;
|
||||||
return Objects.equals(this.justNumber, numberOnly.justNumber);
|
return Objects.equals(justNumber, numberOnly.justNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -50,6 +51,7 @@ public class NumberOnly {
|
|||||||
return Objects.hash(justNumber);
|
return Objects.hash(justNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Order
|
* Order
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Order {
|
public class Order {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -33,7 +34,7 @@ public class Order {
|
|||||||
|
|
||||||
DELIVERED("delivered");
|
DELIVERED("delivered");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
StatusEnum(String value) {
|
StatusEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -175,12 +176,12 @@ public class Order {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Order order = (Order) o;
|
Order order = (Order) o;
|
||||||
return Objects.equals(this.id, order.id) &&
|
return Objects.equals(id, order.id) &&
|
||||||
Objects.equals(this.petId, order.petId) &&
|
Objects.equals(petId, order.petId) &&
|
||||||
Objects.equals(this.quantity, order.quantity) &&
|
Objects.equals(quantity, order.quantity) &&
|
||||||
Objects.equals(this.shipDate, order.shipDate) &&
|
Objects.equals(shipDate, order.shipDate) &&
|
||||||
Objects.equals(this.status, order.status) &&
|
Objects.equals(status, order.status) &&
|
||||||
Objects.equals(this.complete, order.complete);
|
Objects.equals(complete, order.complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -188,6 +189,7 @@ public class Order {
|
|||||||
return Objects.hash(id, petId, quantity, shipDate, status, complete);
|
return Objects.hash(id, petId, quantity, shipDate, status, complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* OuterComposite
|
* OuterComposite
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class OuterComposite {
|
public class OuterComposite {
|
||||||
@JsonProperty("my_number")
|
@JsonProperty("my_number")
|
||||||
private BigDecimal myNumber = null;
|
private BigDecimal myNumber = null;
|
||||||
@@ -82,9 +83,9 @@ public class OuterComposite {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
OuterComposite outerComposite = (OuterComposite) o;
|
OuterComposite outerComposite = (OuterComposite) o;
|
||||||
return Objects.equals(this.myNumber, outerComposite.myNumber) &&
|
return Objects.equals(myNumber, outerComposite.myNumber) &&
|
||||||
Objects.equals(this.myString, outerComposite.myString) &&
|
Objects.equals(myString, outerComposite.myString) &&
|
||||||
Objects.equals(this.myBoolean, outerComposite.myBoolean);
|
Objects.equals(myBoolean, outerComposite.myBoolean);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -92,6 +93,7 @@ public class OuterComposite {
|
|||||||
return Objects.hash(myNumber, myString, myBoolean);
|
return Objects.hash(myNumber, myString, myBoolean);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -18,7 +16,7 @@ public enum OuterEnum {
|
|||||||
|
|
||||||
DELIVERED("delivered");
|
DELIVERED("delivered");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
OuterEnum(String value) {
|
OuterEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import apimodels.Category;
|
import apimodels.Category;
|
||||||
import apimodels.Tag;
|
import apimodels.Tag;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -8,11 +7,13 @@ import java.util.List;
|
|||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Pet
|
* Pet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Pet {
|
public class Pet {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -24,7 +25,7 @@ public class Pet {
|
|||||||
private String name = null;
|
private String name = null;
|
||||||
|
|
||||||
@JsonProperty("photoUrls")
|
@JsonProperty("photoUrls")
|
||||||
private List<String> photoUrls = new ArrayList<String>();
|
private List<String> photoUrls = new ArrayList<>();
|
||||||
|
|
||||||
@JsonProperty("tags")
|
@JsonProperty("tags")
|
||||||
private List<Tag> tags = null;
|
private List<Tag> tags = null;
|
||||||
@@ -39,7 +40,7 @@ public class Pet {
|
|||||||
|
|
||||||
SOLD("sold");
|
SOLD("sold");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
StatusEnum(String value) {
|
StatusEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -124,7 +125,7 @@ public class Pet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
||||||
this.photoUrls.add(photoUrlsItem);
|
photoUrls.add(photoUrlsItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,10 +148,10 @@ public class Pet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Pet addTagsItem(Tag tagsItem) {
|
public Pet addTagsItem(Tag tagsItem) {
|
||||||
if (this.tags == null) {
|
if (tags == null) {
|
||||||
this.tags = new ArrayList<Tag>();
|
tags = new ArrayList<>();
|
||||||
}
|
}
|
||||||
this.tags.add(tagsItem);
|
tags.add(tagsItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,12 +195,12 @@ public class Pet {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Pet pet = (Pet) o;
|
Pet pet = (Pet) o;
|
||||||
return Objects.equals(this.id, pet.id) &&
|
return Objects.equals(id, pet.id) &&
|
||||||
Objects.equals(this.category, pet.category) &&
|
Objects.equals(category, pet.category) &&
|
||||||
Objects.equals(this.name, pet.name) &&
|
Objects.equals(name, pet.name) &&
|
||||||
Objects.equals(this.photoUrls, pet.photoUrls) &&
|
Objects.equals(photoUrls, pet.photoUrls) &&
|
||||||
Objects.equals(this.tags, pet.tags) &&
|
Objects.equals(tags, pet.tags) &&
|
||||||
Objects.equals(this.status, pet.status);
|
Objects.equals(status, pet.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -207,6 +208,7 @@ public class Pet {
|
|||||||
return Objects.hash(id, category, name, photoUrls, tags, status);
|
return Objects.hash(id, category, name, photoUrls, tags, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* ReadOnlyFirst
|
* ReadOnlyFirst
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class ReadOnlyFirst {
|
public class ReadOnlyFirst {
|
||||||
@JsonProperty("bar")
|
@JsonProperty("bar")
|
||||||
private String bar = null;
|
private String bar = null;
|
||||||
@@ -60,8 +61,8 @@ public class ReadOnlyFirst {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o;
|
ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o;
|
||||||
return Objects.equals(this.bar, readOnlyFirst.bar) &&
|
return Objects.equals(bar, readOnlyFirst.bar) &&
|
||||||
Objects.equals(this.baz, readOnlyFirst.baz);
|
Objects.equals(baz, readOnlyFirst.baz);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,6 +70,7 @@ public class ReadOnlyFirst {
|
|||||||
return Objects.hash(bar, baz);
|
return Objects.hash(bar, baz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* SpecialModelName
|
* SpecialModelName
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class SpecialModelName {
|
public class SpecialModelName {
|
||||||
@JsonProperty("$special[property.name]")
|
@JsonProperty("$special[property.name]")
|
||||||
private Long specialPropertyName = null;
|
private Long specialPropertyName = null;
|
||||||
@@ -40,7 +41,7 @@ public class SpecialModelName {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SpecialModelName specialModelName = (SpecialModelName) o;
|
SpecialModelName specialModelName = (SpecialModelName) o;
|
||||||
return Objects.equals(this.specialPropertyName, specialModelName.specialPropertyName);
|
return Objects.equals(specialPropertyName, specialModelName.specialPropertyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -48,6 +49,7 @@ public class SpecialModelName {
|
|||||||
return Objects.hash(specialPropertyName);
|
return Objects.hash(specialPropertyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Tag
|
* Tag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Tag {
|
public class Tag {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -60,8 +61,8 @@ public class Tag {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Tag tag = (Tag) o;
|
Tag tag = (Tag) o;
|
||||||
return Objects.equals(this.id, tag.id) &&
|
return Objects.equals(id, tag.id) &&
|
||||||
Objects.equals(this.name, tag.name);
|
Objects.equals(name, tag.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,6 +70,7 @@ public class Tag {
|
|||||||
return Objects.hash(id, name);
|
return Objects.hash(id, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* User
|
* User
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class User {
|
public class User {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -180,14 +181,14 @@ public class User {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
User user = (User) o;
|
User user = (User) o;
|
||||||
return Objects.equals(this.id, user.id) &&
|
return Objects.equals(id, user.id) &&
|
||||||
Objects.equals(this.username, user.username) &&
|
Objects.equals(username, user.username) &&
|
||||||
Objects.equals(this.firstName, user.firstName) &&
|
Objects.equals(firstName, user.firstName) &&
|
||||||
Objects.equals(this.lastName, user.lastName) &&
|
Objects.equals(lastName, user.lastName) &&
|
||||||
Objects.equals(this.email, user.email) &&
|
Objects.equals(email, user.email) &&
|
||||||
Objects.equals(this.password, user.password) &&
|
Objects.equals(password, user.password) &&
|
||||||
Objects.equals(this.phone, user.phone) &&
|
Objects.equals(phone, user.phone) &&
|
||||||
Objects.equals(this.userStatus, user.userStatus);
|
Objects.equals(userStatus, user.userStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -195,6 +196,7 @@ public class User {
|
|||||||
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
|
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.io.IOException;
|
import java.io.File;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -50,8 +50,6 @@ public class FakeApiController extends Controller {
|
|||||||
Boolean obj = imp.fakeOuterBooleanSerialize(body);
|
Boolean obj = imp.fakeOuterBooleanSerialize(body);
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -69,8 +67,6 @@ public class FakeApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -88,8 +84,6 @@ public class FakeApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -106,8 +100,6 @@ public class FakeApiController extends Controller {
|
|||||||
String obj = imp.fakeOuterStringSerialize(body);
|
String obj = imp.fakeOuterStringSerialize(body);
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -122,8 +114,6 @@ public class FakeApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -173,7 +163,7 @@ public class FakeApiController extends Controller {
|
|||||||
String valuestring = (request().body().asMultipartFormData().asFormUrlEncoded().get("string"))[0];
|
String valuestring = (request().body().asMultipartFormData().asFormUrlEncoded().get("string"))[0];
|
||||||
String string;
|
String string;
|
||||||
if (valuestring != null) {
|
if (valuestring != null) {
|
||||||
string = (String)valuestring;
|
string = valuestring;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
string = null;
|
string = null;
|
||||||
@@ -181,12 +171,12 @@ public class FakeApiController extends Controller {
|
|||||||
String valuepatternWithoutDelimiter = (request().body().asMultipartFormData().asFormUrlEncoded().get("pattern_without_delimiter"))[0];
|
String valuepatternWithoutDelimiter = (request().body().asMultipartFormData().asFormUrlEncoded().get("pattern_without_delimiter"))[0];
|
||||||
String patternWithoutDelimiter;
|
String patternWithoutDelimiter;
|
||||||
|
|
||||||
patternWithoutDelimiter = (String)valuepatternWithoutDelimiter;
|
patternWithoutDelimiter = valuepatternWithoutDelimiter;
|
||||||
|
|
||||||
String value_byte = (request().body().asMultipartFormData().asFormUrlEncoded().get("byte"))[0];
|
String value_byte = (request().body().asMultipartFormData().asFormUrlEncoded().get("byte"))[0];
|
||||||
byte[] _byte;
|
byte[] _byte;
|
||||||
|
|
||||||
_byte = (String)value_byte;
|
_byte = value_byte;
|
||||||
|
|
||||||
String valuebinary = (request().body().asMultipartFormData().asFormUrlEncoded().get("binary"))[0];
|
String valuebinary = (request().body().asMultipartFormData().asFormUrlEncoded().get("binary"))[0];
|
||||||
byte[] binary;
|
byte[] binary;
|
||||||
@@ -215,7 +205,7 @@ public class FakeApiController extends Controller {
|
|||||||
String valuepassword = (request().body().asMultipartFormData().asFormUrlEncoded().get("password"))[0];
|
String valuepassword = (request().body().asMultipartFormData().asFormUrlEncoded().get("password"))[0];
|
||||||
String password;
|
String password;
|
||||||
if (valuepassword != null) {
|
if (valuepassword != null) {
|
||||||
password = (String)valuepassword;
|
password = valuepassword;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
password = null;
|
password = null;
|
||||||
@@ -223,15 +213,13 @@ public class FakeApiController extends Controller {
|
|||||||
String valueparamCallback = (request().body().asMultipartFormData().asFormUrlEncoded().get("callback"))[0];
|
String valueparamCallback = (request().body().asMultipartFormData().asFormUrlEncoded().get("callback"))[0];
|
||||||
String paramCallback;
|
String paramCallback;
|
||||||
if (valueparamCallback != null) {
|
if (valueparamCallback != null) {
|
||||||
paramCallback = (String)valueparamCallback;
|
paramCallback = valueparamCallback;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
paramCallback = null;
|
paramCallback = null;
|
||||||
}
|
}
|
||||||
imp.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
imp.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -245,7 +233,7 @@ public class FakeApiController extends Controller {
|
|||||||
String valueenumQueryString = request().getQueryString("enumQueryString");
|
String valueenumQueryString = request().getQueryString("enumQueryString");
|
||||||
String enumQueryString;
|
String enumQueryString;
|
||||||
if (valueenumQueryString != null) {
|
if (valueenumQueryString != null) {
|
||||||
enumQueryString = (String)valueenumQueryString;
|
enumQueryString = valueenumQueryString;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
enumQueryString = "-efg";
|
enumQueryString = "-efg";
|
||||||
@@ -267,7 +255,7 @@ public class FakeApiController extends Controller {
|
|||||||
String valueenumFormString = (request().body().asMultipartFormData().asFormUrlEncoded().get("enum_form_string"))[0];
|
String valueenumFormString = (request().body().asMultipartFormData().asFormUrlEncoded().get("enum_form_string"))[0];
|
||||||
String enumFormString;
|
String enumFormString;
|
||||||
if (valueenumFormString != null) {
|
if (valueenumFormString != null) {
|
||||||
enumFormString = (String)valueenumFormString;
|
enumFormString = valueenumFormString;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
enumFormString = "-efg";
|
enumFormString = "-efg";
|
||||||
@@ -289,15 +277,13 @@ public class FakeApiController extends Controller {
|
|||||||
String valueenumHeaderString = request().getHeader("enum_header_string");
|
String valueenumHeaderString = request().getHeader("enum_header_string");
|
||||||
String enumHeaderString;
|
String enumHeaderString;
|
||||||
if (valueenumHeaderString != null) {
|
if (valueenumHeaderString != null) {
|
||||||
enumHeaderString = (String)valueenumHeaderString;
|
enumHeaderString = valueenumHeaderString;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
enumHeaderString = "-efg";
|
enumHeaderString = "-efg";
|
||||||
}
|
}
|
||||||
imp.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
|
imp.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -305,16 +291,14 @@ public class FakeApiController extends Controller {
|
|||||||
String valueparam = (request().body().asMultipartFormData().asFormUrlEncoded().get("param"))[0];
|
String valueparam = (request().body().asMultipartFormData().asFormUrlEncoded().get("param"))[0];
|
||||||
String param;
|
String param;
|
||||||
|
|
||||||
param = (String)valueparam;
|
param = valueparam;
|
||||||
|
|
||||||
String valueparam2 = (request().body().asMultipartFormData().asFormUrlEncoded().get("param2"))[0];
|
String valueparam2 = (request().body().asMultipartFormData().asFormUrlEncoded().get("param2"))[0];
|
||||||
String param2;
|
String param2;
|
||||||
|
|
||||||
param2 = (String)valueparam2;
|
param2 = valueparam2;
|
||||||
|
|
||||||
imp.testJsonFormData(param, param2);
|
imp.testJsonFormData(param, param2);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface FakeApiControllerImpInterface {
|
public interface FakeApiControllerImpInterface {
|
||||||
Boolean fakeOuterBooleanSerialize(Boolean body) throws Exception;
|
Boolean fakeOuterBooleanSerialize(Boolean body) throws Exception;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.io.IOException;
|
import java.io.File;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -44,7 +44,5 @@ public class FakeClassnameTags123ApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface FakeClassnameTags123ApiControllerImpInterface {
|
public interface FakeClassnameTags123ApiControllerImpInterface {
|
||||||
Client testClassname(Client body) throws Exception;
|
Client testClassname(Client body) throws Exception;
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.io.IOException;
|
import java.io.File;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -43,9 +43,7 @@ public class PetApiController extends Controller {
|
|||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
imp.addPet(body);
|
imp.addPet(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -53,15 +51,13 @@ public class PetApiController extends Controller {
|
|||||||
String valueapiKey = request().getHeader("api_key");
|
String valueapiKey = request().getHeader("api_key");
|
||||||
String apiKey;
|
String apiKey;
|
||||||
if (valueapiKey != null) {
|
if (valueapiKey != null) {
|
||||||
apiKey = (String)valueapiKey;
|
apiKey = valueapiKey;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
apiKey = null;
|
apiKey = null;
|
||||||
}
|
}
|
||||||
imp.deletePet(petId, apiKey);
|
imp.deletePet(petId, apiKey);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -78,8 +74,6 @@ public class PetApiController extends Controller {
|
|||||||
}
|
}
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -96,8 +90,6 @@ public class PetApiController extends Controller {
|
|||||||
}
|
}
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -106,8 +98,6 @@ public class PetApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -119,9 +109,7 @@ public class PetApiController extends Controller {
|
|||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
imp.updatePet(body);
|
imp.updatePet(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -129,7 +117,7 @@ public class PetApiController extends Controller {
|
|||||||
String valuename = (request().body().asMultipartFormData().asFormUrlEncoded().get("name"))[0];
|
String valuename = (request().body().asMultipartFormData().asFormUrlEncoded().get("name"))[0];
|
||||||
String name;
|
String name;
|
||||||
if (valuename != null) {
|
if (valuename != null) {
|
||||||
name = (String)valuename;
|
name = valuename;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
name = null;
|
name = null;
|
||||||
@@ -137,15 +125,13 @@ public class PetApiController extends Controller {
|
|||||||
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||||
String status;
|
String status;
|
||||||
if (valuestatus != null) {
|
if (valuestatus != null) {
|
||||||
status = (String)valuestatus;
|
status = valuestatus;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
status = null;
|
status = null;
|
||||||
}
|
}
|
||||||
imp.updatePetWithForm(petId, name, status);
|
imp.updatePetWithForm(petId, name, status);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -153,17 +139,15 @@ public class PetApiController extends Controller {
|
|||||||
String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0];
|
String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0];
|
||||||
String additionalMetadata;
|
String additionalMetadata;
|
||||||
if (valueadditionalMetadata != null) {
|
if (valueadditionalMetadata != null) {
|
||||||
additionalMetadata = (String)valueadditionalMetadata;
|
additionalMetadata = valueadditionalMetadata;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
additionalMetadata = null;
|
additionalMetadata = null;
|
||||||
}
|
}
|
||||||
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
||||||
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface PetApiControllerImpInterface {
|
public interface PetApiControllerImpInterface {
|
||||||
void addPet(Pet body) throws Exception;
|
void addPet(Pet body) throws Exception;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.io.IOException;
|
import java.io.File;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -36,9 +36,7 @@ public class StoreApiController extends Controller {
|
|||||||
@ApiAction
|
@ApiAction
|
||||||
public Result deleteOrder(String orderId) throws Exception {
|
public Result deleteOrder(String orderId) throws Exception {
|
||||||
imp.deleteOrder(orderId);
|
imp.deleteOrder(orderId);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -46,8 +44,6 @@ public class StoreApiController extends Controller {
|
|||||||
Map<String, Integer> obj = imp.getInventory();
|
Map<String, Integer> obj = imp.getInventory();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -56,8 +52,6 @@ public class StoreApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -72,7 +66,5 @@ public class StoreApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface StoreApiControllerImpInterface {
|
public interface StoreApiControllerImpInterface {
|
||||||
void deleteOrder(String orderId) throws Exception;
|
void deleteOrder(String orderId) throws Exception;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.io.IOException;
|
import java.io.File;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -42,9 +42,7 @@ public class UserApiController extends Controller {
|
|||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
imp.createUser(body);
|
imp.createUser(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -58,9 +56,7 @@ public class UserApiController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
imp.createUsersWithArrayInput(body);
|
imp.createUsersWithArrayInput(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -74,17 +70,13 @@ public class UserApiController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
imp.createUsersWithListInput(body);
|
imp.createUsersWithListInput(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result deleteUser(String username) throws Exception {
|
public Result deleteUser(String username) throws Exception {
|
||||||
imp.deleteUser(username);
|
imp.deleteUser(username);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -93,8 +85,6 @@ public class UserApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -102,26 +92,22 @@ public class UserApiController extends Controller {
|
|||||||
String valueusername = request().getQueryString("username");
|
String valueusername = request().getQueryString("username");
|
||||||
String username;
|
String username;
|
||||||
|
|
||||||
username = (String)valueusername;
|
username = valueusername;
|
||||||
|
|
||||||
String valuepassword = request().getQueryString("password");
|
String valuepassword = request().getQueryString("password");
|
||||||
String password;
|
String password;
|
||||||
|
|
||||||
password = (String)valuepassword;
|
password = valuepassword;
|
||||||
|
|
||||||
String obj = imp.loginUser(username, password);
|
String obj = imp.loginUser(username, password);
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result logoutUser() throws Exception {
|
public Result logoutUser() throws Exception {
|
||||||
imp.logoutUser();
|
imp.logoutUser();
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -133,8 +119,6 @@ public class UserApiController extends Controller {
|
|||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
imp.updateUser(username, body);
|
imp.updateUser(username, body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface UserApiControllerImpInterface {
|
public interface UserApiControllerImpInterface {
|
||||||
void createUser(User body) throws Exception;
|
void createUser(User body) throws Exception;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
|
import java.util.Set;
|
||||||
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
/**
|
/**
|
||||||
* A category for a pet
|
* A category for a pet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Category {
|
public class Category {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -57,8 +60,8 @@ public class Category {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Category category = (Category) o;
|
Category category = (Category) o;
|
||||||
return Objects.equals(this.id, category.id) &&
|
return Objects.equals(id, category.id) &&
|
||||||
Objects.equals(this.name, category.name);
|
Objects.equals(name, category.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -66,6 +69,7 @@ public class Category {
|
|||||||
return Objects.hash(id, name);
|
return Objects.hash(id, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
|
import java.util.Set;
|
||||||
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
/**
|
/**
|
||||||
* Describes the result of uploading an image resource
|
* Describes the result of uploading an image resource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class ModelApiResponse {
|
public class ModelApiResponse {
|
||||||
@JsonProperty("code")
|
@JsonProperty("code")
|
||||||
private Integer code = null;
|
private Integer code = null;
|
||||||
@@ -77,9 +80,9 @@ public class ModelApiResponse {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ModelApiResponse _apiResponse = (ModelApiResponse) o;
|
ModelApiResponse _apiResponse = (ModelApiResponse) o;
|
||||||
return Objects.equals(this.code, _apiResponse.code) &&
|
return Objects.equals(code, _apiResponse.code) &&
|
||||||
Objects.equals(this.type, _apiResponse.type) &&
|
Objects.equals(type, _apiResponse.type) &&
|
||||||
Objects.equals(this.message, _apiResponse.message);
|
Objects.equals(message, _apiResponse.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -87,6 +90,7 @@ public class ModelApiResponse {
|
|||||||
return Objects.hash(code, type, message);
|
return Objects.hash(code, type, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
|
import java.util.Set;
|
||||||
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
/**
|
/**
|
||||||
* An order for a pets from the pet store
|
* An order for a pets from the pet store
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Order {
|
public class Order {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -30,7 +33,7 @@ public class Order {
|
|||||||
|
|
||||||
DELIVERED("delivered");
|
DELIVERED("delivered");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
StatusEnum(String value) {
|
StatusEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -171,12 +174,12 @@ public class Order {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Order order = (Order) o;
|
Order order = (Order) o;
|
||||||
return Objects.equals(this.id, order.id) &&
|
return Objects.equals(id, order.id) &&
|
||||||
Objects.equals(this.petId, order.petId) &&
|
Objects.equals(petId, order.petId) &&
|
||||||
Objects.equals(this.quantity, order.quantity) &&
|
Objects.equals(quantity, order.quantity) &&
|
||||||
Objects.equals(this.shipDate, order.shipDate) &&
|
Objects.equals(shipDate, order.shipDate) &&
|
||||||
Objects.equals(this.status, order.status) &&
|
Objects.equals(status, order.status) &&
|
||||||
Objects.equals(this.complete, order.complete);
|
Objects.equals(complete, order.complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -184,6 +187,7 @@ public class Order {
|
|||||||
return Objects.hash(id, petId, quantity, shipDate, status, complete);
|
return Objects.hash(id, petId, quantity, shipDate, status, complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import apimodels.Category;
|
import apimodels.Category;
|
||||||
import apimodels.Tag;
|
import apimodels.Tag;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
|
import java.util.Set;
|
||||||
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
/**
|
/**
|
||||||
* A pet for sale in the pet store
|
* A pet for sale in the pet store
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Pet {
|
public class Pet {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -21,7 +24,7 @@ public class Pet {
|
|||||||
private String name = null;
|
private String name = null;
|
||||||
|
|
||||||
@JsonProperty("photoUrls")
|
@JsonProperty("photoUrls")
|
||||||
private List<String> photoUrls = new ArrayList<String>();
|
private List<String> photoUrls = new ArrayList<>();
|
||||||
|
|
||||||
@JsonProperty("tags")
|
@JsonProperty("tags")
|
||||||
private List<Tag> tags = null;
|
private List<Tag> tags = null;
|
||||||
@@ -36,7 +39,7 @@ public class Pet {
|
|||||||
|
|
||||||
SOLD("sold");
|
SOLD("sold");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
StatusEnum(String value) {
|
StatusEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -119,7 +122,7 @@ public class Pet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
||||||
this.photoUrls.add(photoUrlsItem);
|
photoUrls.add(photoUrlsItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,10 +144,10 @@ public class Pet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Pet addTagsItem(Tag tagsItem) {
|
public Pet addTagsItem(Tag tagsItem) {
|
||||||
if (this.tags == null) {
|
if (tags == null) {
|
||||||
this.tags = new ArrayList<Tag>();
|
tags = new ArrayList<>();
|
||||||
}
|
}
|
||||||
this.tags.add(tagsItem);
|
tags.add(tagsItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,12 +190,12 @@ public class Pet {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Pet pet = (Pet) o;
|
Pet pet = (Pet) o;
|
||||||
return Objects.equals(this.id, pet.id) &&
|
return Objects.equals(id, pet.id) &&
|
||||||
Objects.equals(this.category, pet.category) &&
|
Objects.equals(category, pet.category) &&
|
||||||
Objects.equals(this.name, pet.name) &&
|
Objects.equals(name, pet.name) &&
|
||||||
Objects.equals(this.photoUrls, pet.photoUrls) &&
|
Objects.equals(photoUrls, pet.photoUrls) &&
|
||||||
Objects.equals(this.tags, pet.tags) &&
|
Objects.equals(tags, pet.tags) &&
|
||||||
Objects.equals(this.status, pet.status);
|
Objects.equals(status, pet.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -200,6 +203,7 @@ public class Pet {
|
|||||||
return Objects.hash(id, category, name, photoUrls, tags, status);
|
return Objects.hash(id, category, name, photoUrls, tags, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
|
import java.util.Set;
|
||||||
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
/**
|
/**
|
||||||
* A tag for a pet
|
* A tag for a pet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Tag {
|
public class Tag {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -57,8 +60,8 @@ public class Tag {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Tag tag = (Tag) o;
|
Tag tag = (Tag) o;
|
||||||
return Objects.equals(this.id, tag.id) &&
|
return Objects.equals(id, tag.id) &&
|
||||||
Objects.equals(this.name, tag.name);
|
Objects.equals(name, tag.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -66,6 +69,7 @@ public class Tag {
|
|||||||
return Objects.hash(id, name);
|
return Objects.hash(id, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
|
import java.util.Set;
|
||||||
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
/**
|
/**
|
||||||
* A User who is purchasing from the pet store
|
* A User who is purchasing from the pet store
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class User {
|
public class User {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -177,14 +180,14 @@ public class User {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
User user = (User) o;
|
User user = (User) o;
|
||||||
return Objects.equals(this.id, user.id) &&
|
return Objects.equals(id, user.id) &&
|
||||||
Objects.equals(this.username, user.username) &&
|
Objects.equals(username, user.username) &&
|
||||||
Objects.equals(this.firstName, user.firstName) &&
|
Objects.equals(firstName, user.firstName) &&
|
||||||
Objects.equals(this.lastName, user.lastName) &&
|
Objects.equals(lastName, user.lastName) &&
|
||||||
Objects.equals(this.email, user.email) &&
|
Objects.equals(email, user.email) &&
|
||||||
Objects.equals(this.password, user.password) &&
|
Objects.equals(password, user.password) &&
|
||||||
Objects.equals(this.phone, user.phone) &&
|
Objects.equals(phone, user.phone) &&
|
||||||
Objects.equals(this.userStatus, user.userStatus);
|
Objects.equals(userStatus, user.userStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -192,6 +195,7 @@ public class User {
|
|||||||
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
|
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.io.IOException;
|
import java.io.File;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -41,9 +41,7 @@ public class PetApiController extends Controller {
|
|||||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
body = mapper.readValue(nodebody.toString(), Pet.class);
|
||||||
|
|
||||||
imp.addPet(body);
|
imp.addPet(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -51,15 +49,13 @@ public class PetApiController extends Controller {
|
|||||||
String valueapiKey = request().getHeader("api_key");
|
String valueapiKey = request().getHeader("api_key");
|
||||||
String apiKey;
|
String apiKey;
|
||||||
if (valueapiKey != null) {
|
if (valueapiKey != null) {
|
||||||
apiKey = (String)valueapiKey;
|
apiKey = valueapiKey;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
apiKey = null;
|
apiKey = null;
|
||||||
}
|
}
|
||||||
imp.deletePet(petId, apiKey);
|
imp.deletePet(petId, apiKey);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -73,8 +69,6 @@ public class PetApiController extends Controller {
|
|||||||
List<Pet> obj = imp.findPetsByStatus(status);
|
List<Pet> obj = imp.findPetsByStatus(status);
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -88,8 +82,6 @@ public class PetApiController extends Controller {
|
|||||||
List<Pet> obj = imp.findPetsByTags(tags);
|
List<Pet> obj = imp.findPetsByTags(tags);
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -97,8 +89,6 @@ public class PetApiController extends Controller {
|
|||||||
Pet obj = imp.getPetById(petId);
|
Pet obj = imp.getPetById(petId);
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -109,9 +99,7 @@ public class PetApiController extends Controller {
|
|||||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
body = mapper.readValue(nodebody.toString(), Pet.class);
|
||||||
|
|
||||||
imp.updatePet(body);
|
imp.updatePet(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -119,7 +107,7 @@ public class PetApiController extends Controller {
|
|||||||
String valuename = (request().body().asMultipartFormData().asFormUrlEncoded().get("name"))[0];
|
String valuename = (request().body().asMultipartFormData().asFormUrlEncoded().get("name"))[0];
|
||||||
String name;
|
String name;
|
||||||
if (valuename != null) {
|
if (valuename != null) {
|
||||||
name = (String)valuename;
|
name = valuename;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
name = null;
|
name = null;
|
||||||
@@ -127,15 +115,13 @@ public class PetApiController extends Controller {
|
|||||||
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||||
String status;
|
String status;
|
||||||
if (valuestatus != null) {
|
if (valuestatus != null) {
|
||||||
status = (String)valuestatus;
|
status = valuestatus;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
status = null;
|
status = null;
|
||||||
}
|
}
|
||||||
imp.updatePetWithForm(petId, name, status);
|
imp.updatePetWithForm(petId, name, status);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -143,16 +129,14 @@ public class PetApiController extends Controller {
|
|||||||
String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0];
|
String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0];
|
||||||
String additionalMetadata;
|
String additionalMetadata;
|
||||||
if (valueadditionalMetadata != null) {
|
if (valueadditionalMetadata != null) {
|
||||||
additionalMetadata = (String)valueadditionalMetadata;
|
additionalMetadata = valueadditionalMetadata;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
additionalMetadata = null;
|
additionalMetadata = null;
|
||||||
}
|
}
|
||||||
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
||||||
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface PetApiControllerImpInterface {
|
public interface PetApiControllerImpInterface {
|
||||||
void addPet(Pet body) throws Exception;
|
void addPet(Pet body) throws Exception;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.io.IOException;
|
import java.io.File;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -35,9 +35,7 @@ public class StoreApiController extends Controller {
|
|||||||
@ApiAction
|
@ApiAction
|
||||||
public Result deleteOrder(String orderId) throws Exception {
|
public Result deleteOrder(String orderId) throws Exception {
|
||||||
imp.deleteOrder(orderId);
|
imp.deleteOrder(orderId);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -45,8 +43,6 @@ public class StoreApiController extends Controller {
|
|||||||
Map<String, Integer> obj = imp.getInventory();
|
Map<String, Integer> obj = imp.getInventory();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -54,8 +50,6 @@ public class StoreApiController extends Controller {
|
|||||||
Order obj = imp.getOrderById(orderId);
|
Order obj = imp.getOrderById(orderId);
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -68,7 +62,5 @@ public class StoreApiController extends Controller {
|
|||||||
Order obj = imp.placeOrder(body);
|
Order obj = imp.placeOrder(body);
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface StoreApiControllerImpInterface {
|
public interface StoreApiControllerImpInterface {
|
||||||
void deleteOrder(String orderId) throws Exception;
|
void deleteOrder(String orderId) throws Exception;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.io.IOException;
|
import java.io.File;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -40,9 +40,7 @@ public class UserApiController extends Controller {
|
|||||||
body = mapper.readValue(nodebody.toString(), User.class);
|
body = mapper.readValue(nodebody.toString(), User.class);
|
||||||
|
|
||||||
imp.createUser(body);
|
imp.createUser(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -53,9 +51,7 @@ public class UserApiController extends Controller {
|
|||||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
||||||
|
|
||||||
imp.createUsersWithArrayInput(body);
|
imp.createUsersWithArrayInput(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -66,17 +62,13 @@ public class UserApiController extends Controller {
|
|||||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
||||||
|
|
||||||
imp.createUsersWithListInput(body);
|
imp.createUsersWithListInput(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result deleteUser(String username) throws Exception {
|
public Result deleteUser(String username) throws Exception {
|
||||||
imp.deleteUser(username);
|
imp.deleteUser(username);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -84,8 +76,6 @@ public class UserApiController extends Controller {
|
|||||||
User obj = imp.getUserByName(username);
|
User obj = imp.getUserByName(username);
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -93,26 +83,22 @@ public class UserApiController extends Controller {
|
|||||||
String valueusername = request().getQueryString("username");
|
String valueusername = request().getQueryString("username");
|
||||||
String username;
|
String username;
|
||||||
|
|
||||||
username = (String)valueusername;
|
username = valueusername;
|
||||||
|
|
||||||
String valuepassword = request().getQueryString("password");
|
String valuepassword = request().getQueryString("password");
|
||||||
String password;
|
String password;
|
||||||
|
|
||||||
password = (String)valuepassword;
|
password = valuepassword;
|
||||||
|
|
||||||
String obj = imp.loginUser(username, password);
|
String obj = imp.loginUser(username, password);
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result logoutUser() throws Exception {
|
public Result logoutUser() throws Exception {
|
||||||
imp.logoutUser();
|
imp.logoutUser();
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -123,8 +109,6 @@ public class UserApiController extends Controller {
|
|||||||
body = mapper.readValue(nodebody.toString(), User.class);
|
body = mapper.readValue(nodebody.toString(), User.class);
|
||||||
|
|
||||||
imp.updateUser(username, body);
|
imp.updateUser(username, body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface UserApiControllerImpInterface {
|
public interface UserApiControllerImpInterface {
|
||||||
void createUser(User body) throws Exception;
|
void createUser(User body) throws Exception;
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
2017-08-08 12:59:36,779 [INFO] from play.api.Play in ForkJoinPool-1-worker-1 - Application started (Dev)
|
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* A category for a pet
|
* A category for a pet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Category {
|
public class Category {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -60,8 +61,8 @@ public class Category {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Category category = (Category) o;
|
Category category = (Category) o;
|
||||||
return Objects.equals(this.id, category.id) &&
|
return Objects.equals(id, category.id) &&
|
||||||
Objects.equals(this.name, category.name);
|
Objects.equals(name, category.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,6 +70,7 @@ public class Category {
|
|||||||
return Objects.hash(id, name);
|
return Objects.hash(id, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Describes the result of uploading an image resource
|
* Describes the result of uploading an image resource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class ModelApiResponse {
|
public class ModelApiResponse {
|
||||||
@JsonProperty("code")
|
@JsonProperty("code")
|
||||||
private Integer code = null;
|
private Integer code = null;
|
||||||
@@ -80,9 +81,9 @@ public class ModelApiResponse {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ModelApiResponse _apiResponse = (ModelApiResponse) o;
|
ModelApiResponse _apiResponse = (ModelApiResponse) o;
|
||||||
return Objects.equals(this.code, _apiResponse.code) &&
|
return Objects.equals(code, _apiResponse.code) &&
|
||||||
Objects.equals(this.type, _apiResponse.type) &&
|
Objects.equals(type, _apiResponse.type) &&
|
||||||
Objects.equals(this.message, _apiResponse.message);
|
Objects.equals(message, _apiResponse.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -90,6 +91,7 @@ public class ModelApiResponse {
|
|||||||
return Objects.hash(code, type, message);
|
return Objects.hash(code, type, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* An order for a pets from the pet store
|
* An order for a pets from the pet store
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Order {
|
public class Order {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -33,7 +34,7 @@ public class Order {
|
|||||||
|
|
||||||
DELIVERED("delivered");
|
DELIVERED("delivered");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
StatusEnum(String value) {
|
StatusEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -175,12 +176,12 @@ public class Order {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Order order = (Order) o;
|
Order order = (Order) o;
|
||||||
return Objects.equals(this.id, order.id) &&
|
return Objects.equals(id, order.id) &&
|
||||||
Objects.equals(this.petId, order.petId) &&
|
Objects.equals(petId, order.petId) &&
|
||||||
Objects.equals(this.quantity, order.quantity) &&
|
Objects.equals(quantity, order.quantity) &&
|
||||||
Objects.equals(this.shipDate, order.shipDate) &&
|
Objects.equals(shipDate, order.shipDate) &&
|
||||||
Objects.equals(this.status, order.status) &&
|
Objects.equals(status, order.status) &&
|
||||||
Objects.equals(this.complete, order.complete);
|
Objects.equals(complete, order.complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -188,6 +189,7 @@ public class Order {
|
|||||||
return Objects.hash(id, petId, quantity, shipDate, status, complete);
|
return Objects.hash(id, petId, quantity, shipDate, status, complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import apimodels.Category;
|
import apimodels.Category;
|
||||||
import apimodels.Tag;
|
import apimodels.Tag;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -8,11 +7,13 @@ import java.util.List;
|
|||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* A pet for sale in the pet store
|
* A pet for sale in the pet store
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Pet {
|
public class Pet {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -24,7 +25,7 @@ public class Pet {
|
|||||||
private String name = null;
|
private String name = null;
|
||||||
|
|
||||||
@JsonProperty("photoUrls")
|
@JsonProperty("photoUrls")
|
||||||
private List<String> photoUrls = new ArrayList<String>();
|
private List<String> photoUrls = new ArrayList<>();
|
||||||
|
|
||||||
@JsonProperty("tags")
|
@JsonProperty("tags")
|
||||||
private List<Tag> tags = null;
|
private List<Tag> tags = null;
|
||||||
@@ -39,7 +40,7 @@ public class Pet {
|
|||||||
|
|
||||||
SOLD("sold");
|
SOLD("sold");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
StatusEnum(String value) {
|
StatusEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -124,7 +125,7 @@ public class Pet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
||||||
this.photoUrls.add(photoUrlsItem);
|
photoUrls.add(photoUrlsItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,10 +148,10 @@ public class Pet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Pet addTagsItem(Tag tagsItem) {
|
public Pet addTagsItem(Tag tagsItem) {
|
||||||
if (this.tags == null) {
|
if (tags == null) {
|
||||||
this.tags = new ArrayList<Tag>();
|
tags = new ArrayList<>();
|
||||||
}
|
}
|
||||||
this.tags.add(tagsItem);
|
tags.add(tagsItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,12 +195,12 @@ public class Pet {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Pet pet = (Pet) o;
|
Pet pet = (Pet) o;
|
||||||
return Objects.equals(this.id, pet.id) &&
|
return Objects.equals(id, pet.id) &&
|
||||||
Objects.equals(this.category, pet.category) &&
|
Objects.equals(category, pet.category) &&
|
||||||
Objects.equals(this.name, pet.name) &&
|
Objects.equals(name, pet.name) &&
|
||||||
Objects.equals(this.photoUrls, pet.photoUrls) &&
|
Objects.equals(photoUrls, pet.photoUrls) &&
|
||||||
Objects.equals(this.tags, pet.tags) &&
|
Objects.equals(tags, pet.tags) &&
|
||||||
Objects.equals(this.status, pet.status);
|
Objects.equals(status, pet.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -207,6 +208,7 @@ public class Pet {
|
|||||||
return Objects.hash(id, category, name, photoUrls, tags, status);
|
return Objects.hash(id, category, name, photoUrls, tags, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* A tag for a pet
|
* A tag for a pet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Tag {
|
public class Tag {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -60,8 +61,8 @@ public class Tag {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Tag tag = (Tag) o;
|
Tag tag = (Tag) o;
|
||||||
return Objects.equals(this.id, tag.id) &&
|
return Objects.equals(id, tag.id) &&
|
||||||
Objects.equals(this.name, tag.name);
|
Objects.equals(name, tag.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,6 +70,7 @@ public class Tag {
|
|||||||
return Objects.hash(id, name);
|
return Objects.hash(id, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* A User who is purchasing from the pet store
|
* A User who is purchasing from the pet store
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class User {
|
public class User {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -180,14 +181,14 @@ public class User {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
User user = (User) o;
|
User user = (User) o;
|
||||||
return Objects.equals(this.id, user.id) &&
|
return Objects.equals(id, user.id) &&
|
||||||
Objects.equals(this.username, user.username) &&
|
Objects.equals(username, user.username) &&
|
||||||
Objects.equals(this.firstName, user.firstName) &&
|
Objects.equals(firstName, user.firstName) &&
|
||||||
Objects.equals(this.lastName, user.lastName) &&
|
Objects.equals(lastName, user.lastName) &&
|
||||||
Objects.equals(this.email, user.email) &&
|
Objects.equals(email, user.email) &&
|
||||||
Objects.equals(this.password, user.password) &&
|
Objects.equals(password, user.password) &&
|
||||||
Objects.equals(this.phone, user.phone) &&
|
Objects.equals(phone, user.phone) &&
|
||||||
Objects.equals(this.userStatus, user.userStatus);
|
Objects.equals(userStatus, user.userStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -195,6 +196,7 @@ public class User {
|
|||||||
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
|
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
@@ -43,9 +44,7 @@ public class PetApiController extends Controller {
|
|||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
imp.addPet(body);
|
imp.addPet(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -53,15 +52,13 @@ public class PetApiController extends Controller {
|
|||||||
String valueapiKey = request().getHeader("api_key");
|
String valueapiKey = request().getHeader("api_key");
|
||||||
String apiKey;
|
String apiKey;
|
||||||
if (valueapiKey != null) {
|
if (valueapiKey != null) {
|
||||||
apiKey = (String)valueapiKey;
|
apiKey = valueapiKey;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
apiKey = null;
|
apiKey = null;
|
||||||
}
|
}
|
||||||
imp.deletePet(petId, apiKey);
|
imp.deletePet(petId, apiKey);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -78,8 +75,6 @@ public class PetApiController extends Controller {
|
|||||||
}
|
}
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -96,8 +91,6 @@ public class PetApiController extends Controller {
|
|||||||
}
|
}
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -106,8 +99,6 @@ public class PetApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -119,9 +110,7 @@ public class PetApiController extends Controller {
|
|||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
imp.updatePet(body);
|
imp.updatePet(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -129,7 +118,7 @@ public class PetApiController extends Controller {
|
|||||||
String valuename = (request().body().asMultipartFormData().asFormUrlEncoded().get("name"))[0];
|
String valuename = (request().body().asMultipartFormData().asFormUrlEncoded().get("name"))[0];
|
||||||
String name;
|
String name;
|
||||||
if (valuename != null) {
|
if (valuename != null) {
|
||||||
name = (String)valuename;
|
name = valuename;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
name = null;
|
name = null;
|
||||||
@@ -137,15 +126,13 @@ public class PetApiController extends Controller {
|
|||||||
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||||
String status;
|
String status;
|
||||||
if (valuestatus != null) {
|
if (valuestatus != null) {
|
||||||
status = (String)valuestatus;
|
status = valuestatus;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
status = null;
|
status = null;
|
||||||
}
|
}
|
||||||
imp.updatePetWithForm(petId, name, status);
|
imp.updatePetWithForm(petId, name, status);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -153,17 +140,15 @@ public class PetApiController extends Controller {
|
|||||||
String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0];
|
String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0];
|
||||||
String additionalMetadata;
|
String additionalMetadata;
|
||||||
if (valueadditionalMetadata != null) {
|
if (valueadditionalMetadata != null) {
|
||||||
additionalMetadata = (String)valueadditionalMetadata;
|
additionalMetadata = valueadditionalMetadata;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
additionalMetadata = null;
|
additionalMetadata = null;
|
||||||
}
|
}
|
||||||
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
||||||
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface PetApiControllerImpInterface {
|
public interface PetApiControllerImpInterface {
|
||||||
void addPet(Pet body) ;
|
void addPet(Pet body) ;
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
@@ -36,9 +37,7 @@ public class StoreApiController extends Controller {
|
|||||||
@ApiAction
|
@ApiAction
|
||||||
public Result deleteOrder(String orderId) {
|
public Result deleteOrder(String orderId) {
|
||||||
imp.deleteOrder(orderId);
|
imp.deleteOrder(orderId);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -46,8 +45,6 @@ public class StoreApiController extends Controller {
|
|||||||
Map<String, Integer> obj = imp.getInventory();
|
Map<String, Integer> obj = imp.getInventory();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -56,8 +53,6 @@ public class StoreApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -72,7 +67,5 @@ public class StoreApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface StoreApiControllerImpInterface {
|
public interface StoreApiControllerImpInterface {
|
||||||
void deleteOrder(String orderId) ;
|
void deleteOrder(String orderId) ;
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
@@ -42,9 +43,7 @@ public class UserApiController extends Controller {
|
|||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
imp.createUser(body);
|
imp.createUser(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -58,9 +57,7 @@ public class UserApiController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
imp.createUsersWithArrayInput(body);
|
imp.createUsersWithArrayInput(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -74,17 +71,13 @@ public class UserApiController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
imp.createUsersWithListInput(body);
|
imp.createUsersWithListInput(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result deleteUser(String username) {
|
public Result deleteUser(String username) {
|
||||||
imp.deleteUser(username);
|
imp.deleteUser(username);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -93,8 +86,6 @@ public class UserApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -102,26 +93,22 @@ public class UserApiController extends Controller {
|
|||||||
String valueusername = request().getQueryString("username");
|
String valueusername = request().getQueryString("username");
|
||||||
String username;
|
String username;
|
||||||
|
|
||||||
username = (String)valueusername;
|
username = valueusername;
|
||||||
|
|
||||||
String valuepassword = request().getQueryString("password");
|
String valuepassword = request().getQueryString("password");
|
||||||
String password;
|
String password;
|
||||||
|
|
||||||
password = (String)valuepassword;
|
password = valuepassword;
|
||||||
|
|
||||||
String obj = imp.loginUser(username, password);
|
String obj = imp.loginUser(username, password);
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result logoutUser() {
|
public Result logoutUser() {
|
||||||
imp.logoutUser();
|
imp.logoutUser();
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -133,8 +120,6 @@ public class UserApiController extends Controller {
|
|||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
imp.updateUser(username, body);
|
imp.updateUser(username, body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface UserApiControllerImpInterface {
|
public interface UserApiControllerImpInterface {
|
||||||
void createUser(User body) ;
|
void createUser(User body) ;
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
2017-08-08 13:00:03,356 [INFO] from play.api.Play in ForkJoinPool-1-worker-1 - Application started (Dev)
|
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* A category for a pet
|
* A category for a pet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Category {
|
public class Category {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -60,8 +61,8 @@ public class Category {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Category category = (Category) o;
|
Category category = (Category) o;
|
||||||
return Objects.equals(this.id, category.id) &&
|
return Objects.equals(id, category.id) &&
|
||||||
Objects.equals(this.name, category.name);
|
Objects.equals(name, category.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,6 +70,7 @@ public class Category {
|
|||||||
return Objects.hash(id, name);
|
return Objects.hash(id, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* Describes the result of uploading an image resource
|
* Describes the result of uploading an image resource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class ModelApiResponse {
|
public class ModelApiResponse {
|
||||||
@JsonProperty("code")
|
@JsonProperty("code")
|
||||||
private Integer code = null;
|
private Integer code = null;
|
||||||
@@ -80,9 +81,9 @@ public class ModelApiResponse {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ModelApiResponse _apiResponse = (ModelApiResponse) o;
|
ModelApiResponse _apiResponse = (ModelApiResponse) o;
|
||||||
return Objects.equals(this.code, _apiResponse.code) &&
|
return Objects.equals(code, _apiResponse.code) &&
|
||||||
Objects.equals(this.type, _apiResponse.type) &&
|
Objects.equals(type, _apiResponse.type) &&
|
||||||
Objects.equals(this.message, _apiResponse.message);
|
Objects.equals(message, _apiResponse.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -90,6 +91,7 @@ public class ModelApiResponse {
|
|||||||
return Objects.hash(code, type, message);
|
return Objects.hash(code, type, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* An order for a pets from the pet store
|
* An order for a pets from the pet store
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Order {
|
public class Order {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -33,7 +34,7 @@ public class Order {
|
|||||||
|
|
||||||
DELIVERED("delivered");
|
DELIVERED("delivered");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
StatusEnum(String value) {
|
StatusEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -175,12 +176,12 @@ public class Order {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Order order = (Order) o;
|
Order order = (Order) o;
|
||||||
return Objects.equals(this.id, order.id) &&
|
return Objects.equals(id, order.id) &&
|
||||||
Objects.equals(this.petId, order.petId) &&
|
Objects.equals(petId, order.petId) &&
|
||||||
Objects.equals(this.quantity, order.quantity) &&
|
Objects.equals(quantity, order.quantity) &&
|
||||||
Objects.equals(this.shipDate, order.shipDate) &&
|
Objects.equals(shipDate, order.shipDate) &&
|
||||||
Objects.equals(this.status, order.status) &&
|
Objects.equals(status, order.status) &&
|
||||||
Objects.equals(this.complete, order.complete);
|
Objects.equals(complete, order.complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -188,6 +189,7 @@ public class Order {
|
|||||||
return Objects.hash(id, petId, quantity, shipDate, status, complete);
|
return Objects.hash(id, petId, quantity, shipDate, status, complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import apimodels.Category;
|
import apimodels.Category;
|
||||||
import apimodels.Tag;
|
import apimodels.Tag;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -8,11 +7,13 @@ import java.util.List;
|
|||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* A pet for sale in the pet store
|
* A pet for sale in the pet store
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Pet {
|
public class Pet {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -24,7 +25,7 @@ public class Pet {
|
|||||||
private String name = null;
|
private String name = null;
|
||||||
|
|
||||||
@JsonProperty("photoUrls")
|
@JsonProperty("photoUrls")
|
||||||
private List<String> photoUrls = new ArrayList<String>();
|
private List<String> photoUrls = new ArrayList<>();
|
||||||
|
|
||||||
@JsonProperty("tags")
|
@JsonProperty("tags")
|
||||||
private List<Tag> tags = null;
|
private List<Tag> tags = null;
|
||||||
@@ -39,7 +40,7 @@ public class Pet {
|
|||||||
|
|
||||||
SOLD("sold");
|
SOLD("sold");
|
||||||
|
|
||||||
private String value;
|
private final String value;
|
||||||
|
|
||||||
StatusEnum(String value) {
|
StatusEnum(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
@@ -124,7 +125,7 @@ public class Pet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
||||||
this.photoUrls.add(photoUrlsItem);
|
photoUrls.add(photoUrlsItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,10 +148,10 @@ public class Pet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Pet addTagsItem(Tag tagsItem) {
|
public Pet addTagsItem(Tag tagsItem) {
|
||||||
if (this.tags == null) {
|
if (tags == null) {
|
||||||
this.tags = new ArrayList<Tag>();
|
tags = new ArrayList<>();
|
||||||
}
|
}
|
||||||
this.tags.add(tagsItem);
|
tags.add(tagsItem);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,12 +195,12 @@ public class Pet {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Pet pet = (Pet) o;
|
Pet pet = (Pet) o;
|
||||||
return Objects.equals(this.id, pet.id) &&
|
return Objects.equals(id, pet.id) &&
|
||||||
Objects.equals(this.category, pet.category) &&
|
Objects.equals(category, pet.category) &&
|
||||||
Objects.equals(this.name, pet.name) &&
|
Objects.equals(name, pet.name) &&
|
||||||
Objects.equals(this.photoUrls, pet.photoUrls) &&
|
Objects.equals(photoUrls, pet.photoUrls) &&
|
||||||
Objects.equals(this.tags, pet.tags) &&
|
Objects.equals(tags, pet.tags) &&
|
||||||
Objects.equals(this.status, pet.status);
|
Objects.equals(status, pet.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -207,6 +208,7 @@ public class Pet {
|
|||||||
return Objects.hash(id, category, name, photoUrls, tags, status);
|
return Objects.hash(id, category, name, photoUrls, tags, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* A tag for a pet
|
* A tag for a pet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class Tag {
|
public class Tag {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -60,8 +61,8 @@ public class Tag {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Tag tag = (Tag) o;
|
Tag tag = (Tag) o;
|
||||||
return Objects.equals(this.id, tag.id) &&
|
return Objects.equals(id, tag.id) &&
|
||||||
Objects.equals(this.name, tag.name);
|
Objects.equals(name, tag.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,6 +70,7 @@ public class Tag {
|
|||||||
return Objects.hash(id, name);
|
return Objects.hash(id, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
/**
|
/**
|
||||||
* A User who is purchasing from the pet store
|
* A User who is purchasing from the pet store
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class User {
|
public class User {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@@ -180,14 +181,14 @@ public class User {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
User user = (User) o;
|
User user = (User) o;
|
||||||
return Objects.equals(this.id, user.id) &&
|
return Objects.equals(id, user.id) &&
|
||||||
Objects.equals(this.username, user.username) &&
|
Objects.equals(username, user.username) &&
|
||||||
Objects.equals(this.firstName, user.firstName) &&
|
Objects.equals(firstName, user.firstName) &&
|
||||||
Objects.equals(this.lastName, user.lastName) &&
|
Objects.equals(lastName, user.lastName) &&
|
||||||
Objects.equals(this.email, user.email) &&
|
Objects.equals(email, user.email) &&
|
||||||
Objects.equals(this.password, user.password) &&
|
Objects.equals(password, user.password) &&
|
||||||
Objects.equals(this.phone, user.phone) &&
|
Objects.equals(phone, user.phone) &&
|
||||||
Objects.equals(this.userStatus, user.userStatus);
|
Objects.equals(userStatus, user.userStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -195,6 +196,7 @@ public class User {
|
|||||||
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
|
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.io.IOException;
|
import java.io.File;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -43,9 +43,7 @@ public class PetApiController extends Controller {
|
|||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
imp.addPet(body);
|
imp.addPet(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -53,15 +51,13 @@ public class PetApiController extends Controller {
|
|||||||
String valueapiKey = request().getHeader("api_key");
|
String valueapiKey = request().getHeader("api_key");
|
||||||
String apiKey;
|
String apiKey;
|
||||||
if (valueapiKey != null) {
|
if (valueapiKey != null) {
|
||||||
apiKey = (String)valueapiKey;
|
apiKey = valueapiKey;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
apiKey = null;
|
apiKey = null;
|
||||||
}
|
}
|
||||||
imp.deletePet(petId, apiKey);
|
imp.deletePet(petId, apiKey);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -78,8 +74,6 @@ public class PetApiController extends Controller {
|
|||||||
}
|
}
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -96,8 +90,6 @@ public class PetApiController extends Controller {
|
|||||||
}
|
}
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -106,8 +98,6 @@ public class PetApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -119,9 +109,7 @@ public class PetApiController extends Controller {
|
|||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
imp.updatePet(body);
|
imp.updatePet(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -129,7 +117,7 @@ public class PetApiController extends Controller {
|
|||||||
String valuename = (request().body().asMultipartFormData().asFormUrlEncoded().get("name"))[0];
|
String valuename = (request().body().asMultipartFormData().asFormUrlEncoded().get("name"))[0];
|
||||||
String name;
|
String name;
|
||||||
if (valuename != null) {
|
if (valuename != null) {
|
||||||
name = (String)valuename;
|
name = valuename;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
name = null;
|
name = null;
|
||||||
@@ -137,15 +125,13 @@ public class PetApiController extends Controller {
|
|||||||
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||||
String status;
|
String status;
|
||||||
if (valuestatus != null) {
|
if (valuestatus != null) {
|
||||||
status = (String)valuestatus;
|
status = valuestatus;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
status = null;
|
status = null;
|
||||||
}
|
}
|
||||||
imp.updatePetWithForm(petId, name, status);
|
imp.updatePetWithForm(petId, name, status);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -153,17 +139,15 @@ public class PetApiController extends Controller {
|
|||||||
String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0];
|
String valueadditionalMetadata = (request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0];
|
||||||
String additionalMetadata;
|
String additionalMetadata;
|
||||||
if (valueadditionalMetadata != null) {
|
if (valueadditionalMetadata != null) {
|
||||||
additionalMetadata = (String)valueadditionalMetadata;
|
additionalMetadata = valueadditionalMetadata;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
additionalMetadata = null;
|
additionalMetadata = null;
|
||||||
}
|
}
|
||||||
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
||||||
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package controllers;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import apimodels.ModelApiResponse;
|
||||||
|
import apimodels.Pet;
|
||||||
|
|
||||||
|
import play.mvc.Http;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
|
interface PetApiControllerImpInterface {
|
||||||
|
void addPet(Pet body) throws Exception;
|
||||||
|
|
||||||
|
void deletePet(Long petId, String apiKey) throws Exception;
|
||||||
|
|
||||||
|
List<Pet> findPetsByStatus( @NotNull List<String> status) throws Exception;
|
||||||
|
|
||||||
|
List<Pet> findPetsByTags( @NotNull List<String> tags) throws Exception;
|
||||||
|
|
||||||
|
Pet getPetById(Long petId) throws Exception;
|
||||||
|
|
||||||
|
void updatePet(Pet body) throws Exception;
|
||||||
|
|
||||||
|
void updatePetWithForm(Long petId, String name, String status) throws Exception;
|
||||||
|
|
||||||
|
ModelApiResponse uploadFile(Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) throws Exception;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -12,7 +12,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.io.IOException;
|
import java.io.File;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -36,9 +36,7 @@ public class StoreApiController extends Controller {
|
|||||||
@ApiAction
|
@ApiAction
|
||||||
public Result deleteOrder(String orderId) throws Exception {
|
public Result deleteOrder(String orderId) throws Exception {
|
||||||
imp.deleteOrder(orderId);
|
imp.deleteOrder(orderId);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -46,8 +44,6 @@ public class StoreApiController extends Controller {
|
|||||||
Map<String, Integer> obj = imp.getInventory();
|
Map<String, Integer> obj = imp.getInventory();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -56,8 +52,6 @@ public class StoreApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -72,7 +66,5 @@ public class StoreApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package controllers;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import apimodels.Order;
|
||||||
|
|
||||||
|
import play.mvc.Http;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
|
interface StoreApiControllerImpInterface {
|
||||||
|
void deleteOrder(String orderId) throws Exception;
|
||||||
|
|
||||||
|
Map<String, Integer> getInventory() throws Exception;
|
||||||
|
|
||||||
|
Order getOrderById( @Min(1) @Max(5)Long orderId) throws Exception;
|
||||||
|
|
||||||
|
Order placeOrder(Order body) throws Exception;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -12,7 +12,7 @@ import java.util.ArrayList;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.io.IOException;
|
import java.io.File;
|
||||||
import swagger.SwaggerUtils;
|
import swagger.SwaggerUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
|
||||||
@@ -42,9 +42,7 @@ public class UserApiController extends Controller {
|
|||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
imp.createUser(body);
|
imp.createUser(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -58,9 +56,7 @@ public class UserApiController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
imp.createUsersWithArrayInput(body);
|
imp.createUsersWithArrayInput(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -74,17 +70,13 @@ public class UserApiController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
imp.createUsersWithListInput(body);
|
imp.createUsersWithListInput(body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result deleteUser(String username) throws Exception {
|
public Result deleteUser(String username) throws Exception {
|
||||||
imp.deleteUser(username);
|
imp.deleteUser(username);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -93,8 +85,6 @@ public class UserApiController extends Controller {
|
|||||||
obj.validate();
|
obj.validate();
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -102,26 +92,22 @@ public class UserApiController extends Controller {
|
|||||||
String valueusername = request().getQueryString("username");
|
String valueusername = request().getQueryString("username");
|
||||||
String username;
|
String username;
|
||||||
|
|
||||||
username = (String)valueusername;
|
username = valueusername;
|
||||||
|
|
||||||
String valuepassword = request().getQueryString("password");
|
String valuepassword = request().getQueryString("password");
|
||||||
String password;
|
String password;
|
||||||
|
|
||||||
password = (String)valuepassword;
|
password = valuepassword;
|
||||||
|
|
||||||
String obj = imp.loginUser(username, password);
|
String obj = imp.loginUser(username, password);
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result logoutUser() throws Exception {
|
public Result logoutUser() throws Exception {
|
||||||
imp.logoutUser();
|
imp.logoutUser();
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
@@ -133,8 +119,6 @@ public class UserApiController extends Controller {
|
|||||||
body.validate();
|
body.validate();
|
||||||
|
|
||||||
imp.updateUser(username, body);
|
imp.updateUser(username, body);
|
||||||
|
|
||||||
return ok();
|
return ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package controllers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import apimodels.User;
|
||||||
|
|
||||||
|
import play.mvc.Http;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@SuppressWarnings("RedundantThrows")
|
||||||
|
interface UserApiControllerImpInterface {
|
||||||
|
void createUser(User body) throws Exception;
|
||||||
|
|
||||||
|
void createUsersWithArrayInput(List<User> body) throws Exception;
|
||||||
|
|
||||||
|
void createUsersWithListInput(List<User> body) throws Exception;
|
||||||
|
|
||||||
|
void deleteUser(String username) throws Exception;
|
||||||
|
|
||||||
|
User getUserByName(String username) throws Exception;
|
||||||
|
|
||||||
|
String loginUser( @NotNull String username, @NotNull String password) throws Exception;
|
||||||
|
|
||||||
|
void logoutUser() throws Exception;
|
||||||
|
|
||||||
|
void updateUser(String username, User body) throws Exception;
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user