[Java][jaxrs-spec] Make contextPath template parameter available as a string constant for use in @ApplicationPath (#13377)

* generate a RestResourceRoot with a string constant holding the jax-rs resource root to be used in the @ApplicationPath annotation to make it easier for people, who want to write their own jax-rs Application class

* build and update samples as per PR guide

* renamed introduced constant from ROOT to APPLICATION_PATH to make its use more obvious
This commit is contained in:
Bjorn R. Jensen 2022-10-03 17:34:10 +02:00 committed by GitHub
parent c39fc1e31b
commit 2f48c596d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
70 changed files with 645 additions and 872 deletions

View File

@ -169,6 +169,10 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
supportingFiles.clear(); // Don't need extra files provided by AbstractJAX-RS & Java Codegen supportingFiles.clear(); // Don't need extra files provided by AbstractJAX-RS & Java Codegen
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md") supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")
.doNotOverwrite()); .doNotOverwrite());
supportingFiles.add(new SupportingFile("RestResourceRoot.mustache",
(sourceFolder + '/' + invokerPackage).replace(".", "/"), "RestResourceRoot.java")
.doNotOverwrite());
if (generatePom) { if (generatePom) {
supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml") supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml")
.doNotOverwrite()); .doNotOverwrite());

View File

@ -3,7 +3,7 @@ package {{invokerPackage}};
import javax.ws.rs.ApplicationPath; import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application; import javax.ws.rs.core.Application;
@ApplicationPath("{{{contextPath}}}") @ApplicationPath(RestResourceRoot.APPLICATION_PATH)
public class RestApplication extends Application { public class RestApplication extends Application {
} }

View File

@ -0,0 +1,5 @@
package {{invokerPackage}};
public class RestResourceRoot {
public static final String APPLICATION_PATH = "{{{contextPath}}}";
}

View File

@ -4,6 +4,7 @@ src/gen/java/org/openapitools/api/AnotherFakeApi.java
src/gen/java/org/openapitools/api/FakeApi.java src/gen/java/org/openapitools/api/FakeApi.java
src/gen/java/org/openapitools/api/FakeClassnameTestApi.java src/gen/java/org/openapitools/api/FakeClassnameTestApi.java
src/gen/java/org/openapitools/api/PetApi.java src/gen/java/org/openapitools/api/PetApi.java
src/gen/java/org/openapitools/api/RestResourceRoot.java
src/gen/java/org/openapitools/api/StoreApi.java src/gen/java/org/openapitools/api/StoreApi.java
src/gen/java/org/openapitools/api/UserApi.java src/gen/java/org/openapitools/api/UserApi.java
src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java

View File

@ -1 +1 @@
6.0.0-SNAPSHOT 6.1.0-SNAPSHOT

View File

@ -93,6 +93,7 @@
<java.version>1.8</java.version> <java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target> <maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jackson-version>2.9.9</jackson-version> <jackson-version>2.9.9</jackson-version>
<junit-version>4.13.2</junit-version> <junit-version>4.13.2</junit-version>
<joda-version>2.10.13</joda-version> <joda-version>2.10.13</joda-version>

View File

@ -15,7 +15,8 @@ import javax.validation.Valid;
@Path("/another-fake/dummy") @Path("/another-fake/dummy")
@Api(description = "the another-fake API") @Api(description = "the another-fake API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public interface AnotherFakeApi { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public interface AnotherFakeApi {
@PATCH @PATCH
@Consumes({ "application/json" }) @Consumes({ "application/json" })

View File

@ -25,7 +25,8 @@ import javax.validation.Valid;
@Path("/fake") @Path("/fake")
@Api(description = "the fake API") @Api(description = "the fake API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public interface FakeApi { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public interface FakeApi {
@POST @POST
@Path("/create_xml_item") @Path("/create_xml_item")

View File

@ -1,29 +0,0 @@
package org.openapitools.api;
import org.openapitools.model.Client;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import io.swagger.annotations.*;
import java.io.InputStream;
import java.util.Map;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;
@Path("/FakeClassnameTags123")
@Api(description = "the FakeClassnameTags123 API")
public interface FakeClassnameTags123Api {
@PATCH
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "To test class name in snake case", notes = "To test class name in snake case", authorizations = {
@Authorization(value = "api_key_query")
}, tags={ "fake_classname_tags 123#$%^" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
Response testClassname(@Valid Client body);
}

View File

@ -15,7 +15,8 @@ import javax.validation.Valid;
@Path("/fake_classname_test") @Path("/fake_classname_test")
@Api(description = "the fake_classname_test API") @Api(description = "the fake_classname_test API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public interface FakeClassnameTestApi { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public interface FakeClassnameTestApi {
@PATCH @PATCH
@Consumes({ "application/json" }) @Consumes({ "application/json" })

View File

@ -18,7 +18,8 @@ import javax.validation.Valid;
@Path("/pet") @Path("/pet")
@Api(description = "the pet API") @Api(description = "the pet API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public interface PetApi { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public interface PetApi {
@POST @POST
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })

View File

@ -0,0 +1,5 @@
package org.openapitools.api;
public class RestResourceRoot {
public static final String APPLICATION_PATH = "/v2";
}

View File

@ -16,7 +16,8 @@ import javax.validation.Valid;
@Path("/store") @Path("/store")
@Api(description = "the store API") @Api(description = "the store API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public interface StoreApi { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public interface StoreApi {
@DELETE @DELETE
@Path("/order/{order_id}") @Path("/order/{order_id}")

View File

@ -17,7 +17,8 @@ import javax.validation.Valid;
@Path("/user") @Path("/user")
@Api(description = "the user API") @Api(description = "the user API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public interface UserApi { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public interface UserApi {
@POST @POST
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user" }) @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user" })

View File

@ -18,8 +18,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesAnyType") @JsonTypeName("AdditionalPropertiesAnyType")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesAnyType extends HashMap<String, Object> implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class AdditionalPropertiesAnyType extends HashMap<String, Object> implements Serializable {
private @Valid String name; private @Valid String name;
/** /**
@ -30,8 +30,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {

View File

@ -19,8 +19,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesArray") @JsonTypeName("AdditionalPropertiesArray")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesArray extends HashMap<String, List> implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class AdditionalPropertiesArray extends HashMap<String, List> implements Serializable {
private @Valid String name; private @Valid String name;
/** /**
@ -31,8 +31,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {

View File

@ -18,8 +18,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesBoolean") @JsonTypeName("AdditionalPropertiesBoolean")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> implements Serializable {
private @Valid String name; private @Valid String name;
/** /**
@ -30,8 +30,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {

View File

@ -20,16 +20,16 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesClass") @JsonTypeName("AdditionalPropertiesClass")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesClass implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class AdditionalPropertiesClass implements Serializable {
private @Valid Map<String, String> mapString = new HashMap<>(); private @Valid Map<String, String> mapString = null;
private @Valid Map<String, BigDecimal> mapNumber = new HashMap<>(); private @Valid Map<String, BigDecimal> mapNumber = null;
private @Valid Map<String, Integer> mapInteger = new HashMap<>(); private @Valid Map<String, Integer> mapInteger = null;
private @Valid Map<String, Boolean> mapBoolean = new HashMap<>(); private @Valid Map<String, Boolean> mapBoolean = null;
private @Valid Map<String, List<Integer>> mapArrayInteger = new HashMap<>(); private @Valid Map<String, List<Integer>> mapArrayInteger = null;
private @Valid Map<String, List<Object>> mapArrayAnytype = new HashMap<>(); private @Valid Map<String, List<Object>> mapArrayAnytype = null;
private @Valid Map<String, Map<String, String>> mapMapString = new HashMap<>(); private @Valid Map<String, Map<String, String>> mapMapString = null;
private @Valid Map<String, Map<String, Object>> mapMapAnytype = new HashMap<>(); private @Valid Map<String, Map<String, Object>> mapMapAnytype = null;
private @Valid Object anytype1; private @Valid Object anytype1;
private @Valid Object anytype2; private @Valid Object anytype2;
private @Valid Object anytype3; private @Valid Object anytype3;
@ -42,8 +42,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("map_string") @JsonProperty("map_string")
public Map<String, String> getMapString() { public Map<String, String> getMapString() {
@ -71,7 +69,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public AdditionalPropertiesClass mapNumber(Map<String, BigDecimal> mapNumber) { public AdditionalPropertiesClass mapNumber(Map<String, BigDecimal> mapNumber) {
this.mapNumber = mapNumber; this.mapNumber = mapNumber;
@ -79,8 +77,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("map_number") @JsonProperty("map_number")
public Map<String, BigDecimal> getMapNumber() { public Map<String, BigDecimal> getMapNumber() {
@ -108,7 +104,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public AdditionalPropertiesClass mapInteger(Map<String, Integer> mapInteger) { public AdditionalPropertiesClass mapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger; this.mapInteger = mapInteger;
@ -116,8 +112,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("map_integer") @JsonProperty("map_integer")
public Map<String, Integer> getMapInteger() { public Map<String, Integer> getMapInteger() {
@ -145,7 +139,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public AdditionalPropertiesClass mapBoolean(Map<String, Boolean> mapBoolean) { public AdditionalPropertiesClass mapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean; this.mapBoolean = mapBoolean;
@ -153,8 +147,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("map_boolean") @JsonProperty("map_boolean")
public Map<String, Boolean> getMapBoolean() { public Map<String, Boolean> getMapBoolean() {
@ -182,7 +174,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public AdditionalPropertiesClass mapArrayInteger(Map<String, List<Integer>> mapArrayInteger) { public AdditionalPropertiesClass mapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger; this.mapArrayInteger = mapArrayInteger;
@ -190,8 +182,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("map_array_integer") @JsonProperty("map_array_integer")
public Map<String, List<Integer>> getMapArrayInteger() { public Map<String, List<Integer>> getMapArrayInteger() {
@ -219,7 +209,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public AdditionalPropertiesClass mapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) { public AdditionalPropertiesClass mapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype; this.mapArrayAnytype = mapArrayAnytype;
@ -227,8 +217,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("map_array_anytype") @JsonProperty("map_array_anytype")
public Map<String, List<Object>> getMapArrayAnytype() { public Map<String, List<Object>> getMapArrayAnytype() {
@ -256,7 +244,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public AdditionalPropertiesClass mapMapString(Map<String, Map<String, String>> mapMapString) { public AdditionalPropertiesClass mapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString; this.mapMapString = mapMapString;
@ -264,8 +252,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("map_map_string") @JsonProperty("map_map_string")
public Map<String, Map<String, String>> getMapMapString() { public Map<String, Map<String, String>> getMapMapString() {
@ -293,7 +279,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public AdditionalPropertiesClass mapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) { public AdditionalPropertiesClass mapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype; this.mapMapAnytype = mapMapAnytype;
@ -301,8 +287,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("map_map_anytype") @JsonProperty("map_map_anytype")
public Map<String, Map<String, Object>> getMapMapAnytype() { public Map<String, Map<String, Object>> getMapMapAnytype() {
@ -330,7 +314,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public AdditionalPropertiesClass anytype1(Object anytype1) { public AdditionalPropertiesClass anytype1(Object anytype1) {
this.anytype1 = anytype1; this.anytype1 = anytype1;
@ -338,8 +322,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("anytype_1") @JsonProperty("anytype_1")
public Object getAnytype1() { public Object getAnytype1() {
@ -351,7 +333,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.anytype1 = anytype1; this.anytype1 = anytype1;
} }
/** /**
**/ **/
public AdditionalPropertiesClass anytype2(Object anytype2) { public AdditionalPropertiesClass anytype2(Object anytype2) {
this.anytype2 = anytype2; this.anytype2 = anytype2;
@ -359,8 +341,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("anytype_2") @JsonProperty("anytype_2")
public Object getAnytype2() { public Object getAnytype2() {
@ -372,7 +352,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.anytype2 = anytype2; this.anytype2 = anytype2;
} }
/** /**
**/ **/
public AdditionalPropertiesClass anytype3(Object anytype3) { public AdditionalPropertiesClass anytype3(Object anytype3) {
this.anytype3 = anytype3; this.anytype3 = anytype3;
@ -380,8 +360,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("anytype_3") @JsonProperty("anytype_3")
public Object getAnytype3() { public Object getAnytype3() {

View File

@ -18,8 +18,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesInteger") @JsonTypeName("AdditionalPropertiesInteger")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesInteger extends HashMap<String, Integer> implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class AdditionalPropertiesInteger extends HashMap<String, Integer> implements Serializable {
private @Valid String name; private @Valid String name;
/** /**
@ -30,8 +30,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {

View File

@ -19,8 +19,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesNumber") @JsonTypeName("AdditionalPropertiesNumber")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> implements Serializable {
private @Valid String name; private @Valid String name;
/** /**
@ -31,8 +31,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {

View File

@ -18,8 +18,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesObject") @JsonTypeName("AdditionalPropertiesObject")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesObject extends HashMap<String, Map> implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class AdditionalPropertiesObject extends HashMap<String, Map> implements Serializable {
private @Valid String name; private @Valid String name;
/** /**
@ -30,8 +30,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {

View File

@ -18,8 +18,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesString") @JsonTypeName("AdditionalPropertiesString")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class AdditionalPropertiesString extends HashMap<String, String> implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class AdditionalPropertiesString extends HashMap<String, String> implements Serializable {
private @Valid String name; private @Valid String name;
/** /**
@ -30,8 +30,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {

View File

@ -1,5 +1,6 @@
package org.openapitools.model; package org.openapitools.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
@ -24,8 +25,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("Animal") @JsonTypeName("Animal")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Animal implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class Animal implements Serializable {
private @Valid String className; private @Valid String className;
private @Valid String color = "red"; private @Valid String color = "red";
@ -36,9 +37,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("className") @JsonProperty("className")
@NotNull @NotNull
@ -51,15 +50,13 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.className = className; this.className = className;
} }
/** /**
**/ **/
public Animal color(String color) { public Animal color(String color) {
this.color = color; this.color = color;
return this; return this;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("color") @JsonProperty("color")
@ -95,7 +92,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Animal {\n"); sb.append("class Animal {\n");
sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" className: ").append(toIndentedString(className)).append("\n");
sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n");
sb.append("}"); sb.append("}");

View File

@ -1,59 +0,0 @@
package org.openapitools.model;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.model.Animal;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
public class AnimalFarm extends ArrayList<Animal> implements Serializable {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AnimalFarm animalFarm = (AnimalFarm) o;
return true;
}
@Override
public int hashCode() {
return Objects.hash();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AnimalFarm {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("ArrayOfArrayOfNumberOnly") @JsonTypeName("ArrayOfArrayOfNumberOnly")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayOfArrayOfNumberOnly implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class ArrayOfArrayOfNumberOnly implements Serializable {
private @Valid List<List<BigDecimal>> arrayArrayNumber = new ArrayList<>(); private @Valid List<List<BigDecimal>> arrayArrayNumber = null;
/** /**
**/ **/
@ -31,8 +31,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("ArrayArrayNumber") @JsonProperty("ArrayArrayNumber")
public List<List<BigDecimal>> getArrayArrayNumber() { public List<List<BigDecimal>> getArrayArrayNumber() {

View File

@ -19,9 +19,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("ArrayOfNumberOnly") @JsonTypeName("ArrayOfNumberOnly")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayOfNumberOnly implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class ArrayOfNumberOnly implements Serializable {
private @Valid List<BigDecimal> arrayNumber = new ArrayList<>(); private @Valid List<BigDecimal> arrayNumber = null;
/** /**
**/ **/
@ -31,8 +31,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("ArrayNumber") @JsonProperty("ArrayNumber")
public List<BigDecimal> getArrayNumber() { public List<BigDecimal> getArrayNumber() {

View File

@ -19,11 +19,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("ArrayTest") @JsonTypeName("ArrayTest")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ArrayTest implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class ArrayTest implements Serializable {
private @Valid List<String> arrayOfString = new ArrayList<>(); private @Valid List<String> arrayOfString = null;
private @Valid List<List<Long>> arrayArrayOfInteger = new ArrayList<>(); private @Valid List<List<Long>> arrayArrayOfInteger = null;
private @Valid List<List<ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<>(); private @Valid List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
/** /**
**/ **/
@ -33,8 +33,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("array_of_string") @JsonProperty("array_of_string")
public List<String> getArrayOfString() { public List<String> getArrayOfString() {
@ -62,7 +60,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public ArrayTest arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) { public ArrayTest arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger; this.arrayArrayOfInteger = arrayArrayOfInteger;
@ -70,8 +68,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("array_array_of_integer") @JsonProperty("array_array_of_integer")
public List<List<Long>> getArrayArrayOfInteger() { public List<List<Long>> getArrayArrayOfInteger() {
@ -99,7 +95,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public ArrayTest arrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) { public ArrayTest arrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel; this.arrayArrayOfModel = arrayArrayOfModel;
@ -107,8 +103,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("array_array_of_model") @JsonProperty("array_array_of_model")
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() { public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {

View File

@ -2,7 +2,6 @@ package org.openapitools.model;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.BigCatAllOf;
import org.openapitools.model.Cat; import org.openapitools.model.Cat;
import java.io.Serializable; import java.io.Serializable;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@ -18,10 +17,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("BigCat") @JsonTypeName("BigCat")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class BigCat extends Cat implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class BigCat extends Cat implements Serializable {
public enum KindEnum {
public enum KindEnum {
LIONS(String.valueOf("lions")), TIGERS(String.valueOf("tigers")), LEOPARDS(String.valueOf("leopards")), JAGUARS(String.valueOf("jaguars")); LIONS(String.valueOf("lions")), TIGERS(String.valueOf("tigers")), LEOPARDS(String.valueOf("leopards")), JAGUARS(String.valueOf("jaguars"));
@ -42,6 +40,21 @@ public enum KindEnum {
return String.valueOf(value); return String.valueOf(value);
} }
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static KindEnum fromString(String s) {
for (KindEnum b : KindEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@JsonCreator @JsonCreator
public static KindEnum fromValue(String value) { public static KindEnum fromValue(String value) {
for (KindEnum b : KindEnum.values()) { for (KindEnum b : KindEnum.values()) {
@ -63,8 +76,6 @@ public enum KindEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("kind") @JsonProperty("kind")
public KindEnum getKind() { public KindEnum getKind() {

View File

@ -17,10 +17,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("BigCat_allOf") @JsonTypeName("BigCat_allOf")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class BigCatAllOf implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class BigCatAllOf implements Serializable {
public enum KindEnum {
public enum KindEnum {
LIONS(String.valueOf("lions")), TIGERS(String.valueOf("tigers")), LEOPARDS(String.valueOf("leopards")), JAGUARS(String.valueOf("jaguars")); LIONS(String.valueOf("lions")), TIGERS(String.valueOf("tigers")), LEOPARDS(String.valueOf("leopards")), JAGUARS(String.valueOf("jaguars"));
@ -41,6 +40,21 @@ public enum KindEnum {
return String.valueOf(value); return String.valueOf(value);
} }
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static KindEnum fromString(String s) {
for (KindEnum b : KindEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@JsonCreator @JsonCreator
public static KindEnum fromValue(String value) { public static KindEnum fromValue(String value) {
for (KindEnum b : KindEnum.values()) { for (KindEnum b : KindEnum.values()) {
@ -62,8 +76,6 @@ public enum KindEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("kind") @JsonProperty("kind")
public KindEnum getKind() { public KindEnum getKind() {

View File

@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("Capitalization") @JsonTypeName("Capitalization")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Capitalization implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class Capitalization implements Serializable {
private @Valid String smallCamel; private @Valid String smallCamel;
private @Valid String capitalCamel; private @Valid String capitalCamel;
private @Valid String smallSnake; private @Valid String smallSnake;
@ -33,8 +33,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("smallCamel") @JsonProperty("smallCamel")
public String getSmallCamel() { public String getSmallCamel() {
@ -46,7 +44,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.smallCamel = smallCamel; this.smallCamel = smallCamel;
} }
/** /**
**/ **/
public Capitalization capitalCamel(String capitalCamel) { public Capitalization capitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel; this.capitalCamel = capitalCamel;
@ -54,8 +52,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("CapitalCamel") @JsonProperty("CapitalCamel")
public String getCapitalCamel() { public String getCapitalCamel() {
@ -67,7 +63,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.capitalCamel = capitalCamel; this.capitalCamel = capitalCamel;
} }
/** /**
**/ **/
public Capitalization smallSnake(String smallSnake) { public Capitalization smallSnake(String smallSnake) {
this.smallSnake = smallSnake; this.smallSnake = smallSnake;
@ -75,8 +71,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("small_Snake") @JsonProperty("small_Snake")
public String getSmallSnake() { public String getSmallSnake() {
@ -88,7 +82,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.smallSnake = smallSnake; this.smallSnake = smallSnake;
} }
/** /**
**/ **/
public Capitalization capitalSnake(String capitalSnake) { public Capitalization capitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake; this.capitalSnake = capitalSnake;
@ -96,8 +90,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("Capital_Snake") @JsonProperty("Capital_Snake")
public String getCapitalSnake() { public String getCapitalSnake() {
@ -109,7 +101,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.capitalSnake = capitalSnake; this.capitalSnake = capitalSnake;
} }
/** /**
**/ **/
public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints; this.scAETHFlowPoints = scAETHFlowPoints;
@ -117,8 +109,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("SCA_ETH_Flow_Points") @JsonProperty("SCA_ETH_Flow_Points")
public String getScAETHFlowPoints() { public String getScAETHFlowPoints() {
@ -130,7 +120,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.scAETHFlowPoints = scAETHFlowPoints; this.scAETHFlowPoints = scAETHFlowPoints;
} }
/** /**
* Name of the pet * Name of the pet
**/ **/
public Capitalization ATT_NAME(String ATT_NAME) { public Capitalization ATT_NAME(String ATT_NAME) {
@ -139,8 +129,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "Name of the pet ") @ApiModelProperty(value = "Name of the pet ")
@JsonProperty("ATT_NAME") @JsonProperty("ATT_NAME")
public String getATTNAME() { public String getATTNAME() {

View File

@ -3,7 +3,6 @@ package org.openapitools.model;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.Animal; import org.openapitools.model.Animal;
import org.openapitools.model.CatAllOf;
import java.io.Serializable; import java.io.Serializable;
import javax.validation.constraints.*; import javax.validation.constraints.*;
import javax.validation.Valid; import javax.validation.Valid;
@ -18,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("Cat") @JsonTypeName("Cat")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Cat extends Animal implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class Cat extends Animal implements Serializable {
private @Valid Boolean declawed; private @Valid Boolean declawed;
/** /**
@ -30,8 +29,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("declawed") @JsonProperty("declawed")
public Boolean getDeclawed() { public Boolean getDeclawed() {

View File

@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("Cat_allOf") @JsonTypeName("Cat_allOf")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class CatAllOf implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class CatAllOf implements Serializable {
private @Valid Boolean declawed; private @Valid Boolean declawed;
/** /**
@ -29,8 +29,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("declawed") @JsonProperty("declawed")
public Boolean getDeclawed() { public Boolean getDeclawed() {

View File

@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("Category") @JsonTypeName("Category")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Category implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class Category implements Serializable {
private @Valid Long id; private @Valid Long id;
private @Valid String name = "default-name"; private @Valid String name = "default-name";
@ -29,8 +29,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -42,7 +40,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.id = id; this.id = id;
} }
/** /**
**/ **/
public Category name(String name) { public Category name(String name) {
this.name = name; this.name = name;
@ -50,8 +48,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("name") @JsonProperty("name")
@NotNull @NotNull

View File

@ -18,8 +18,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
**/ **/
@ApiModel(description = "Model for testing model with \"_class\" property") @ApiModel(description = "Model for testing model with \"_class\" property")
@JsonTypeName("ClassModel") @JsonTypeName("ClassModel")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ClassModel implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class ClassModel implements Serializable {
private @Valid String propertyClass; private @Valid String propertyClass;
/** /**
@ -30,8 +30,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("_class") @JsonProperty("_class")
public String getPropertyClass() { public String getPropertyClass() {

View File

@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("Client") @JsonTypeName("Client")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Client implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class Client implements Serializable {
private @Valid String client; private @Valid String client;
/** /**
@ -28,8 +28,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("client") @JsonProperty("client")
public String getClient() { public String getClient() {

View File

@ -3,7 +3,6 @@ package org.openapitools.model;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.Animal; import org.openapitools.model.Animal;
import org.openapitools.model.DogAllOf;
import java.io.Serializable; import java.io.Serializable;
import javax.validation.constraints.*; import javax.validation.constraints.*;
import javax.validation.Valid; import javax.validation.Valid;
@ -18,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("Dog") @JsonTypeName("Dog")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Dog extends Animal implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class Dog extends Animal implements Serializable {
private @Valid String breed; private @Valid String breed;
/** /**
@ -30,8 +29,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("breed") @JsonProperty("breed")
public String getBreed() { public String getBreed() {

View File

@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("Dog_allOf") @JsonTypeName("Dog_allOf")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class DogAllOf implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class DogAllOf implements Serializable {
private @Valid String breed; private @Valid String breed;
/** /**
@ -29,8 +29,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("breed") @JsonProperty("breed")
public String getBreed() { public String getBreed() {

View File

@ -18,10 +18,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("EnumArrays") @JsonTypeName("EnumArrays")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class EnumArrays implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class EnumArrays implements Serializable {
public enum JustSymbolEnum {
public enum JustSymbolEnum {
GREATER_THAN_OR_EQUAL_TO(String.valueOf(">=")), DOLLAR(String.valueOf("$")); GREATER_THAN_OR_EQUAL_TO(String.valueOf(">=")), DOLLAR(String.valueOf("$"));
@ -42,6 +41,21 @@ public enum JustSymbolEnum {
return String.valueOf(value); return String.valueOf(value);
} }
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static JustSymbolEnum fromString(String s) {
for (JustSymbolEnum b : JustSymbolEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@JsonCreator @JsonCreator
public static JustSymbolEnum fromValue(String value) { public static JustSymbolEnum fromValue(String value) {
for (JustSymbolEnum b : JustSymbolEnum.values()) { for (JustSymbolEnum b : JustSymbolEnum.values()) {
@ -54,8 +68,7 @@ public enum JustSymbolEnum {
} }
private @Valid JustSymbolEnum justSymbol; private @Valid JustSymbolEnum justSymbol;
public enum ArrayEnumEnum {
public enum ArrayEnumEnum {
FISH(String.valueOf("fish")), CRAB(String.valueOf("crab")); FISH(String.valueOf("fish")), CRAB(String.valueOf("crab"));
@ -76,6 +89,21 @@ public enum ArrayEnumEnum {
return String.valueOf(value); return String.valueOf(value);
} }
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static ArrayEnumEnum fromString(String s) {
for (ArrayEnumEnum b : ArrayEnumEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@JsonCreator @JsonCreator
public static ArrayEnumEnum fromValue(String value) { public static ArrayEnumEnum fromValue(String value) {
for (ArrayEnumEnum b : ArrayEnumEnum.values()) { for (ArrayEnumEnum b : ArrayEnumEnum.values()) {
@ -87,7 +115,7 @@ public enum ArrayEnumEnum {
} }
} }
private @Valid List<ArrayEnumEnum> arrayEnum = new ArrayList<>(); private @Valid List<ArrayEnumEnum> arrayEnum = null;
/** /**
**/ **/
@ -97,8 +125,6 @@ public enum ArrayEnumEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("just_symbol") @JsonProperty("just_symbol")
public JustSymbolEnum getJustSymbol() { public JustSymbolEnum getJustSymbol() {
@ -110,7 +136,7 @@ public enum ArrayEnumEnum {
this.justSymbol = justSymbol; this.justSymbol = justSymbol;
} }
/** /**
**/ **/
public EnumArrays arrayEnum(List<ArrayEnumEnum> arrayEnum) { public EnumArrays arrayEnum(List<ArrayEnumEnum> arrayEnum) {
this.arrayEnum = arrayEnum; this.arrayEnum = arrayEnum;
@ -118,8 +144,6 @@ public enum ArrayEnumEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("array_enum") @JsonProperty("array_enum")
public List<ArrayEnumEnum> getArrayEnum() { public List<ArrayEnumEnum> getArrayEnum() {

View File

@ -24,6 +24,21 @@ public enum EnumClass {
this.value = value; this.value = value;
} }
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static EnumClass fromString(String s) {
for (EnumClass b : EnumClass.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@Override @Override
@JsonValue @JsonValue
public String toString() { public String toString() {

View File

@ -18,10 +18,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("Enum_Test") @JsonTypeName("Enum_Test")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class EnumTest implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class EnumTest implements Serializable {
public enum EnumStringEnum {
public enum EnumStringEnum {
UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf("")); UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf(""));
@ -42,6 +41,21 @@ public enum EnumStringEnum {
return String.valueOf(value); return String.valueOf(value);
} }
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static EnumStringEnum fromString(String s) {
for (EnumStringEnum b : EnumStringEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@JsonCreator @JsonCreator
public static EnumStringEnum fromValue(String value) { public static EnumStringEnum fromValue(String value) {
for (EnumStringEnum b : EnumStringEnum.values()) { for (EnumStringEnum b : EnumStringEnum.values()) {
@ -54,8 +68,7 @@ public enum EnumStringEnum {
} }
private @Valid EnumStringEnum enumString; private @Valid EnumStringEnum enumString;
public enum EnumStringRequiredEnum {
public enum EnumStringRequiredEnum {
UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf("")); UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf(""));
@ -76,6 +89,21 @@ public enum EnumStringRequiredEnum {
return String.valueOf(value); return String.valueOf(value);
} }
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static EnumStringRequiredEnum fromString(String s) {
for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@JsonCreator @JsonCreator
public static EnumStringRequiredEnum fromValue(String value) { public static EnumStringRequiredEnum fromValue(String value) {
for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) {
@ -88,8 +116,7 @@ public enum EnumStringRequiredEnum {
} }
private @Valid EnumStringRequiredEnum enumStringRequired; private @Valid EnumStringRequiredEnum enumStringRequired;
public enum EnumIntegerEnum {
public enum EnumIntegerEnum {
NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1));
@ -110,6 +137,21 @@ public enum EnumIntegerEnum {
return String.valueOf(value); return String.valueOf(value);
} }
/**
* Convert a String into Integer, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static EnumIntegerEnum fromString(String s) {
for (EnumIntegerEnum b : EnumIntegerEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@JsonCreator @JsonCreator
public static EnumIntegerEnum fromValue(Integer value) { public static EnumIntegerEnum fromValue(Integer value) {
for (EnumIntegerEnum b : EnumIntegerEnum.values()) { for (EnumIntegerEnum b : EnumIntegerEnum.values()) {
@ -122,8 +164,7 @@ public enum EnumIntegerEnum {
} }
private @Valid EnumIntegerEnum enumInteger; private @Valid EnumIntegerEnum enumInteger;
public enum EnumNumberEnum {
public enum EnumNumberEnum {
NUMBER_1_DOT_1(Double.valueOf(1.1)), NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2)); NUMBER_1_DOT_1(Double.valueOf(1.1)), NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2));
@ -144,6 +185,21 @@ public enum EnumNumberEnum {
return String.valueOf(value); return String.valueOf(value);
} }
/**
* Convert a String into Double, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static EnumNumberEnum fromString(String s) {
for (EnumNumberEnum b : EnumNumberEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@JsonCreator @JsonCreator
public static EnumNumberEnum fromValue(Double value) { public static EnumNumberEnum fromValue(Double value) {
for (EnumNumberEnum b : EnumNumberEnum.values()) { for (EnumNumberEnum b : EnumNumberEnum.values()) {
@ -166,8 +222,6 @@ public enum EnumNumberEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("enum_string") @JsonProperty("enum_string")
public EnumStringEnum getEnumString() { public EnumStringEnum getEnumString() {
@ -179,7 +233,7 @@ public enum EnumNumberEnum {
this.enumString = enumString; this.enumString = enumString;
} }
/** /**
**/ **/
public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) {
this.enumStringRequired = enumStringRequired; this.enumStringRequired = enumStringRequired;
@ -187,8 +241,6 @@ public enum EnumNumberEnum {
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("enum_string_required") @JsonProperty("enum_string_required")
@NotNull @NotNull
@ -201,7 +253,7 @@ public enum EnumNumberEnum {
this.enumStringRequired = enumStringRequired; this.enumStringRequired = enumStringRequired;
} }
/** /**
**/ **/
public EnumTest enumInteger(EnumIntegerEnum enumInteger) { public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger; this.enumInteger = enumInteger;
@ -209,8 +261,6 @@ public enum EnumNumberEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("enum_integer") @JsonProperty("enum_integer")
public EnumIntegerEnum getEnumInteger() { public EnumIntegerEnum getEnumInteger() {
@ -222,7 +272,7 @@ public enum EnumNumberEnum {
this.enumInteger = enumInteger; this.enumInteger = enumInteger;
} }
/** /**
**/ **/
public EnumTest enumNumber(EnumNumberEnum enumNumber) { public EnumTest enumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber; this.enumNumber = enumNumber;
@ -230,8 +280,6 @@ public enum EnumNumberEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("enum_number") @JsonProperty("enum_number")
public EnumNumberEnum getEnumNumber() { public EnumNumberEnum getEnumNumber() {
@ -243,7 +291,7 @@ public enum EnumNumberEnum {
this.enumNumber = enumNumber; this.enumNumber = enumNumber;
} }
/** /**
**/ **/
public EnumTest outerEnum(OuterEnum outerEnum) { public EnumTest outerEnum(OuterEnum outerEnum) {
this.outerEnum = outerEnum; this.outerEnum = outerEnum;
@ -251,8 +299,6 @@ public enum EnumNumberEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("outerEnum") @JsonProperty("outerEnum")
public OuterEnum getOuterEnum() { public OuterEnum getOuterEnum() {

View File

@ -19,10 +19,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("FileSchemaTestClass") @JsonTypeName("FileSchemaTestClass")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class FileSchemaTestClass implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class FileSchemaTestClass implements Serializable {
private @Valid ModelFile _file; private @Valid ModelFile _file;
private @Valid List<ModelFile> files = new ArrayList<>(); private @Valid List<ModelFile> files = null;
/** /**
**/ **/
@ -32,8 +32,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("file") @JsonProperty("file")
public ModelFile getFile() { public ModelFile getFile() {
@ -45,7 +43,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this._file = _file; this._file = _file;
} }
/** /**
**/ **/
public FileSchemaTestClass files(List<ModelFile> files) { public FileSchemaTestClass files(List<ModelFile> files) {
this.files = files; this.files = files;
@ -53,8 +51,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("files") @JsonProperty("files")
public List<ModelFile> getFiles() { public List<ModelFile> getFiles() {

View File

@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.io.File; import java.io.File;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.UUID; import java.util.UUID;
import org.joda.time.LocalDate; import org.joda.time.LocalDate;
@ -22,8 +23,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("format_test") @JsonTypeName("format_test")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class FormatTest implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class FormatTest implements Serializable {
private @Valid Integer integer; private @Valid Integer integer;
private @Valid Integer int32; private @Valid Integer int32;
private @Valid Long int64; private @Valid Long int64;
@ -49,8 +50,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("integer") @JsonProperty("integer")
@Min(10) @Max(100) public Integer getInteger() { @Min(10) @Max(100) public Integer getInteger() {
@ -62,7 +61,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.integer = integer; this.integer = integer;
} }
/** /**
* minimum: 20 * minimum: 20
* maximum: 200 * maximum: 200
**/ **/
@ -72,8 +71,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("int32") @JsonProperty("int32")
@Min(20) @Max(200) public Integer getInt32() { @Min(20) @Max(200) public Integer getInt32() {
@ -85,7 +82,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.int32 = int32; this.int32 = int32;
} }
/** /**
**/ **/
public FormatTest int64(Long int64) { public FormatTest int64(Long int64) {
this.int64 = int64; this.int64 = int64;
@ -93,8 +90,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("int64") @JsonProperty("int64")
public Long getInt64() { public Long getInt64() {
@ -106,7 +101,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.int64 = int64; this.int64 = int64;
} }
/** /**
* minimum: 32.1 * minimum: 32.1
* maximum: 543.2 * maximum: 543.2
**/ **/
@ -116,8 +111,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("number") @JsonProperty("number")
@NotNull @NotNull
@ -130,7 +123,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.number = number; this.number = number;
} }
/** /**
* minimum: 54.3 * minimum: 54.3
* maximum: 987.6 * maximum: 987.6
**/ **/
@ -140,8 +133,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("float") @JsonProperty("float")
@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { @DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() {
@ -153,7 +144,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this._float = _float; this._float = _float;
} }
/** /**
* minimum: 67.8 * minimum: 67.8
* maximum: 123.4 * maximum: 123.4
**/ **/
@ -163,8 +154,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("double") @JsonProperty("double")
@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { @DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() {
@ -176,7 +165,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this._double = _double; this._double = _double;
} }
/** /**
**/ **/
public FormatTest string(String string) { public FormatTest string(String string) {
this.string = string; this.string = string;
@ -184,8 +173,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("string") @JsonProperty("string")
@Pattern(regexp="/[a-z]/i") public String getString() { @Pattern(regexp="/[a-z]/i") public String getString() {
@ -197,7 +184,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.string = string; this.string = string;
} }
/** /**
**/ **/
public FormatTest _byte(byte[] _byte) { public FormatTest _byte(byte[] _byte) {
this._byte = _byte; this._byte = _byte;
@ -205,8 +192,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("byte") @JsonProperty("byte")
@NotNull @NotNull
@ -219,7 +204,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this._byte = _byte; this._byte = _byte;
} }
/** /**
**/ **/
public FormatTest binary(File binary) { public FormatTest binary(File binary) {
this.binary = binary; this.binary = binary;
@ -227,8 +212,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("binary") @JsonProperty("binary")
public File getBinary() { public File getBinary() {
@ -240,7 +223,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.binary = binary; this.binary = binary;
} }
/** /**
**/ **/
public FormatTest date(LocalDate date) { public FormatTest date(LocalDate date) {
this.date = date; this.date = date;
@ -248,8 +231,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("date") @JsonProperty("date")
@NotNull @NotNull
@ -262,7 +243,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.date = date; this.date = date;
} }
/** /**
**/ **/
public FormatTest dateTime(Date dateTime) { public FormatTest dateTime(Date dateTime) {
this.dateTime = dateTime; this.dateTime = dateTime;
@ -270,8 +251,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("dateTime") @JsonProperty("dateTime")
public Date getDateTime() { public Date getDateTime() {
@ -283,7 +262,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.dateTime = dateTime; this.dateTime = dateTime;
} }
/** /**
**/ **/
public FormatTest uuid(UUID uuid) { public FormatTest uuid(UUID uuid) {
this.uuid = uuid; this.uuid = uuid;
@ -291,8 +270,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "")
@JsonProperty("uuid") @JsonProperty("uuid")
public UUID getUuid() { public UUID getUuid() {
@ -304,7 +281,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.uuid = uuid; this.uuid = uuid;
} }
/** /**
**/ **/
public FormatTest password(String password) { public FormatTest password(String password) {
this.password = password; this.password = password;
@ -312,8 +289,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("password") @JsonProperty("password")
@NotNull @NotNull
@ -326,7 +301,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.password = password; this.password = password;
} }
/** /**
**/ **/
public FormatTest bigDecimal(BigDecimal bigDecimal) { public FormatTest bigDecimal(BigDecimal bigDecimal) {
this.bigDecimal = bigDecimal; this.bigDecimal = bigDecimal;
@ -334,8 +309,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("BigDecimal") @JsonProperty("BigDecimal")
public BigDecimal getBigDecimal() { public BigDecimal getBigDecimal() {
@ -364,7 +337,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
Objects.equals(this._float, formatTest._float) && Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) && Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.string, formatTest.string) && Objects.equals(this.string, formatTest.string) &&
Objects.equals(this._byte, formatTest._byte) && Arrays.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) && Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) && Objects.equals(this.dateTime, formatTest.dateTime) &&
@ -375,7 +348,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password, bigDecimal); return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal);
} }
@Override @Override

View File

@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("hasOnlyReadOnly") @JsonTypeName("hasOnlyReadOnly")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class HasOnlyReadOnly implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class HasOnlyReadOnly implements Serializable {
private @Valid String bar; private @Valid String bar;
private @Valid String foo; private @Valid String foo;
@ -30,8 +30,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("bar") @JsonProperty("bar")
public String getBar() { public String getBar() {
@ -43,7 +41,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.bar = bar; this.bar = bar;
} }
/** /**
**/ **/
public HasOnlyReadOnly foo(String foo) { public HasOnlyReadOnly foo(String foo) {
this.foo = foo; this.foo = foo;
@ -51,8 +49,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("foo") @JsonProperty("foo")
public String getFoo() { public String getFoo() {

View File

@ -3,7 +3,6 @@ package org.openapitools.model;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.io.Serializable; import java.io.Serializable;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@ -19,11 +18,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("MapTest") @JsonTypeName("MapTest")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class MapTest implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class MapTest implements Serializable {
private @Valid Map<String, Map<String, String>> mapMapOfString = new HashMap<>(); private @Valid Map<String, Map<String, String>> mapMapOfString = null;
public enum InnerEnum {
public enum InnerEnum {
UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")); UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower"));
@ -44,6 +42,21 @@ public enum InnerEnum {
return String.valueOf(value); return String.valueOf(value);
} }
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static InnerEnum fromString(String s) {
for (InnerEnum b : InnerEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@JsonCreator @JsonCreator
public static InnerEnum fromValue(String value) { public static InnerEnum fromValue(String value) {
for (InnerEnum b : InnerEnum.values()) { for (InnerEnum b : InnerEnum.values()) {
@ -55,9 +68,9 @@ public enum InnerEnum {
} }
} }
private @Valid Map<String, InnerEnum> mapOfEnumString = new HashMap<>(); private @Valid Map<String, InnerEnum> mapOfEnumString = null;
private @Valid Map<String, Boolean> directMap = new HashMap<>(); private @Valid Map<String, Boolean> directMap = null;
private @Valid Map<String, Boolean> indirectMap = new HashMap<>(); private @Valid Map<String, Boolean> indirectMap = null;
/** /**
**/ **/
@ -67,8 +80,6 @@ public enum InnerEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("map_map_of_string") @JsonProperty("map_map_of_string")
public Map<String, Map<String, String>> getMapMapOfString() { public Map<String, Map<String, String>> getMapMapOfString() {
@ -96,7 +107,7 @@ public enum InnerEnum {
return this; return this;
} }
/** /**
**/ **/
public MapTest mapOfEnumString(Map<String, InnerEnum> mapOfEnumString) { public MapTest mapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString; this.mapOfEnumString = mapOfEnumString;
@ -104,8 +115,6 @@ public enum InnerEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("map_of_enum_string") @JsonProperty("map_of_enum_string")
public Map<String, InnerEnum> getMapOfEnumString() { public Map<String, InnerEnum> getMapOfEnumString() {
@ -133,7 +142,7 @@ public enum InnerEnum {
return this; return this;
} }
/** /**
**/ **/
public MapTest directMap(Map<String, Boolean> directMap) { public MapTest directMap(Map<String, Boolean> directMap) {
this.directMap = directMap; this.directMap = directMap;
@ -141,8 +150,6 @@ public enum InnerEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("direct_map") @JsonProperty("direct_map")
public Map<String, Boolean> getDirectMap() { public Map<String, Boolean> getDirectMap() {
@ -170,7 +177,7 @@ public enum InnerEnum {
return this; return this;
} }
/** /**
**/ **/
public MapTest indirectMap(Map<String, Boolean> indirectMap) { public MapTest indirectMap(Map<String, Boolean> indirectMap) {
this.indirectMap = indirectMap; this.indirectMap = indirectMap;
@ -178,8 +185,6 @@ public enum InnerEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("indirect_map") @JsonProperty("indirect_map")
public Map<String, Boolean> getIndirectMap() { public Map<String, Boolean> getIndirectMap() {

View File

@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import org.openapitools.model.Animal; import org.openapitools.model.Animal;
@ -22,11 +21,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") @JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable {
private @Valid UUID uuid; private @Valid UUID uuid;
private @Valid Date dateTime; private @Valid Date dateTime;
private @Valid Map<String, Animal> map = new HashMap<>(); private @Valid Map<String, Animal> map = null;
/** /**
**/ **/
@ -36,8 +35,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("uuid") @JsonProperty("uuid")
public UUID getUuid() { public UUID getUuid() {
@ -49,7 +46,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.uuid = uuid; this.uuid = uuid;
} }
/** /**
**/ **/
public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) { public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) {
this.dateTime = dateTime; this.dateTime = dateTime;
@ -57,8 +54,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("dateTime") @JsonProperty("dateTime")
public Date getDateTime() { public Date getDateTime() {
@ -70,7 +65,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.dateTime = dateTime; this.dateTime = dateTime;
} }
/** /**
**/ **/
public MixedPropertiesAndAdditionalPropertiesClass map(Map<String, Animal> map) { public MixedPropertiesAndAdditionalPropertiesClass map(Map<String, Animal> map) {
this.map = map; this.map = map;
@ -78,8 +73,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("map") @JsonProperty("map")
public Map<String, Animal> getMap() { public Map<String, Animal> getMap() {

View File

@ -19,8 +19,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
**/ **/
@ApiModel(description = "Model for testing model name starting with number") @ApiModel(description = "Model for testing model name starting with number")
@JsonTypeName("200_response") @JsonTypeName("200_response")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Model200Response implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class Model200Response implements Serializable {
private @Valid Integer name; private @Valid Integer name;
private @Valid String propertyClass; private @Valid String propertyClass;
@ -32,8 +32,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("name") @JsonProperty("name")
public Integer getName() { public Integer getName() {
@ -45,7 +43,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.name = name; this.name = name;
} }
/** /**
**/ **/
public Model200Response propertyClass(String propertyClass) { public Model200Response propertyClass(String propertyClass) {
this.propertyClass = propertyClass; this.propertyClass = propertyClass;
@ -53,8 +51,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("class") @JsonProperty("class")
public String getPropertyClass() { public String getPropertyClass() {

View File

@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("ApiResponse") @JsonTypeName("ApiResponse")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelApiResponse implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class ModelApiResponse implements Serializable {
private @Valid Integer code; private @Valid Integer code;
private @Valid String type; private @Valid String type;
private @Valid String message; private @Valid String message;
@ -31,8 +31,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("code") @JsonProperty("code")
public Integer getCode() { public Integer getCode() {
@ -44,7 +42,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.code = code; this.code = code;
} }
/** /**
**/ **/
public ModelApiResponse type(String type) { public ModelApiResponse type(String type) {
this.type = type; this.type = type;
@ -52,8 +50,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("type") @JsonProperty("type")
public String getType() { public String getType() {
@ -65,7 +61,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.type = type; this.type = type;
} }
/** /**
**/ **/
public ModelApiResponse message(String message) { public ModelApiResponse message(String message) {
this.message = message; this.message = message;
@ -73,8 +69,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("message") @JsonProperty("message")
public String getMessage() { public String getMessage() {

View File

@ -19,8 +19,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
**/ **/
@ApiModel(description = "Must be named `File` for test.") @ApiModel(description = "Must be named `File` for test.")
@JsonTypeName("File") @JsonTypeName("File")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelFile implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class ModelFile implements Serializable {
private @Valid String sourceURI; private @Valid String sourceURI;
/** /**
@ -32,8 +32,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "Test capitalization") @ApiModelProperty(value = "Test capitalization")
@JsonProperty("sourceURI") @JsonProperty("sourceURI")
public String getSourceURI() { public String getSourceURI() {

View File

@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("List") @JsonTypeName("List")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelList implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class ModelList implements Serializable {
private @Valid String _123list; private @Valid String _123list;
/** /**
@ -29,8 +29,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("123-list") @JsonProperty("123-list")
public String get123list() { public String get123list() {

View File

@ -19,8 +19,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
**/ **/
@ApiModel(description = "Model for testing reserved words") @ApiModel(description = "Model for testing reserved words")
@JsonTypeName("Return") @JsonTypeName("Return")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ModelReturn implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class ModelReturn implements Serializable {
private @Valid Integer _return; private @Valid Integer _return;
/** /**
@ -31,8 +31,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("return") @JsonProperty("return")
public Integer getReturn() { public Integer getReturn() {

View File

@ -18,8 +18,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
**/ **/
@ApiModel(description = "Model for testing model name same as property name") @ApiModel(description = "Model for testing model name same as property name")
@JsonTypeName("Name") @JsonTypeName("Name")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Name implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class Name implements Serializable {
private @Valid Integer name; private @Valid Integer name;
private @Valid Integer snakeCase; private @Valid Integer snakeCase;
private @Valid String property; private @Valid String property;
@ -33,8 +33,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("name") @JsonProperty("name")
@NotNull @NotNull
@ -47,7 +45,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.name = name; this.name = name;
} }
/** /**
**/ **/
public Name snakeCase(Integer snakeCase) { public Name snakeCase(Integer snakeCase) {
this.snakeCase = snakeCase; this.snakeCase = snakeCase;
@ -55,8 +53,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("snake_case") @JsonProperty("snake_case")
public Integer getSnakeCase() { public Integer getSnakeCase() {
@ -68,7 +64,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.snakeCase = snakeCase; this.snakeCase = snakeCase;
} }
/** /**
**/ **/
public Name property(String property) { public Name property(String property) {
this.property = property; this.property = property;
@ -76,8 +72,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("property") @JsonProperty("property")
public String getProperty() { public String getProperty() {
@ -89,7 +83,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.property = property; this.property = property;
} }
/** /**
**/ **/
public Name _123number(Integer _123number) { public Name _123number(Integer _123number) {
this._123number = _123number; this._123number = _123number;
@ -97,8 +91,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("123Number") @JsonProperty("123Number")
public Integer get123number() { public Integer get123number() {

View File

@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("NumberOnly") @JsonTypeName("NumberOnly")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class NumberOnly implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class NumberOnly implements Serializable {
private @Valid BigDecimal justNumber; private @Valid BigDecimal justNumber;
/** /**
@ -29,8 +29,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("JustNumber") @JsonProperty("JustNumber")
public BigDecimal getJustNumber() { public BigDecimal getJustNumber() {

View File

@ -17,14 +17,13 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("Order") @JsonTypeName("Order")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Order implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class Order implements Serializable {
private @Valid Long id; private @Valid Long id;
private @Valid Long petId; private @Valid Long petId;
private @Valid Integer quantity; private @Valid Integer quantity;
private @Valid Date shipDate; private @Valid Date shipDate;
public enum StatusEnum {
public enum StatusEnum {
PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered"));
@ -45,6 +44,21 @@ public enum StatusEnum {
return String.valueOf(value); return String.valueOf(value);
} }
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static StatusEnum fromString(String s) {
for (StatusEnum b : StatusEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@JsonCreator @JsonCreator
public static StatusEnum fromValue(String value) { public static StatusEnum fromValue(String value) {
for (StatusEnum b : StatusEnum.values()) { for (StatusEnum b : StatusEnum.values()) {
@ -67,8 +81,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -80,7 +92,7 @@ public enum StatusEnum {
this.id = id; this.id = id;
} }
/** /**
**/ **/
public Order petId(Long petId) { public Order petId(Long petId) {
this.petId = petId; this.petId = petId;
@ -88,8 +100,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("petId") @JsonProperty("petId")
public Long getPetId() { public Long getPetId() {
@ -101,7 +111,7 @@ public enum StatusEnum {
this.petId = petId; this.petId = petId;
} }
/** /**
**/ **/
public Order quantity(Integer quantity) { public Order quantity(Integer quantity) {
this.quantity = quantity; this.quantity = quantity;
@ -109,8 +119,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("quantity") @JsonProperty("quantity")
public Integer getQuantity() { public Integer getQuantity() {
@ -122,7 +130,7 @@ public enum StatusEnum {
this.quantity = quantity; this.quantity = quantity;
} }
/** /**
**/ **/
public Order shipDate(Date shipDate) { public Order shipDate(Date shipDate) {
this.shipDate = shipDate; this.shipDate = shipDate;
@ -130,8 +138,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("shipDate") @JsonProperty("shipDate")
public Date getShipDate() { public Date getShipDate() {
@ -143,7 +149,7 @@ public enum StatusEnum {
this.shipDate = shipDate; this.shipDate = shipDate;
} }
/** /**
* Order Status * Order Status
**/ **/
public Order status(StatusEnum status) { public Order status(StatusEnum status) {
@ -152,8 +158,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "Order Status") @ApiModelProperty(value = "Order Status")
@JsonProperty("status") @JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
@ -165,7 +169,7 @@ public enum StatusEnum {
this.status = status; this.status = status;
} }
/** /**
**/ **/
public Order complete(Boolean complete) { public Order complete(Boolean complete) {
this.complete = complete; this.complete = complete;
@ -173,8 +177,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("complete") @JsonProperty("complete")
public Boolean getComplete() { public Boolean getComplete() {

View File

@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("OuterComposite") @JsonTypeName("OuterComposite")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class OuterComposite implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class OuterComposite implements Serializable {
private @Valid BigDecimal myNumber; private @Valid BigDecimal myNumber;
private @Valid String myString; private @Valid String myString;
private @Valid Boolean myBoolean; private @Valid Boolean myBoolean;
@ -31,8 +31,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("my_number") @JsonProperty("my_number")
public BigDecimal getMyNumber() { public BigDecimal getMyNumber() {
@ -44,7 +42,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.myNumber = myNumber; this.myNumber = myNumber;
} }
/** /**
**/ **/
public OuterComposite myString(String myString) { public OuterComposite myString(String myString) {
this.myString = myString; this.myString = myString;
@ -52,8 +50,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("my_string") @JsonProperty("my_string")
public String getMyString() { public String getMyString() {
@ -65,7 +61,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.myString = myString; this.myString = myString;
} }
/** /**
**/ **/
public OuterComposite myBoolean(Boolean myBoolean) { public OuterComposite myBoolean(Boolean myBoolean) {
this.myBoolean = myBoolean; this.myBoolean = myBoolean;
@ -73,8 +69,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("my_boolean") @JsonProperty("my_boolean")
public Boolean getMyBoolean() { public Boolean getMyBoolean() {

View File

@ -24,6 +24,21 @@ public enum OuterEnum {
this.value = value; this.value = value;
} }
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static OuterEnum fromString(String s) {
for (OuterEnum b : OuterEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@Override @Override
@JsonValue @JsonValue
public String toString() { public String toString() {

View File

@ -23,15 +23,14 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("Pet") @JsonTypeName("Pet")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Pet implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class Pet implements Serializable {
private @Valid Long id; private @Valid Long id;
private @Valid Category category; private @Valid Category category;
private @Valid String name; private @Valid String name;
private @Valid Set<String> photoUrls = new LinkedHashSet<>(); private @Valid Set<String> photoUrls = new LinkedHashSet<>();
private @Valid List<Tag> tags = new ArrayList<>(); private @Valid List<Tag> tags = null;
public enum StatusEnum {
public enum StatusEnum {
AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold"));
@ -52,6 +51,21 @@ public enum StatusEnum {
return String.valueOf(value); return String.valueOf(value);
} }
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static StatusEnum fromString(String s) {
for (StatusEnum b : StatusEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@JsonCreator @JsonCreator
public static StatusEnum fromValue(String value) { public static StatusEnum fromValue(String value) {
for (StatusEnum b : StatusEnum.values()) { for (StatusEnum b : StatusEnum.values()) {
@ -73,8 +87,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -86,7 +98,7 @@ public enum StatusEnum {
this.id = id; this.id = id;
} }
/** /**
**/ **/
public Pet category(Category category) { public Pet category(Category category) {
this.category = category; this.category = category;
@ -94,8 +106,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("category") @JsonProperty("category")
public Category getCategory() { public Category getCategory() {
@ -107,7 +117,7 @@ public enum StatusEnum {
this.category = category; this.category = category;
} }
/** /**
**/ **/
public Pet name(String name) { public Pet name(String name) {
this.name = name; this.name = name;
@ -115,8 +125,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(example = "doggie", required = true, value = "") @ApiModelProperty(example = "doggie", required = true, value = "")
@JsonProperty("name") @JsonProperty("name")
@NotNull @NotNull
@ -129,7 +137,7 @@ public enum StatusEnum {
this.name = name; this.name = name;
} }
/** /**
**/ **/
public Pet photoUrls(Set<String> photoUrls) { public Pet photoUrls(Set<String> photoUrls) {
this.photoUrls = photoUrls; this.photoUrls = photoUrls;
@ -137,8 +145,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
@NotNull @NotNull
@ -168,7 +174,7 @@ public enum StatusEnum {
return this; return this;
} }
/** /**
**/ **/
public Pet tags(List<Tag> tags) { public Pet tags(List<Tag> tags) {
this.tags = tags; this.tags = tags;
@ -176,8 +182,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("tags") @JsonProperty("tags")
public List<Tag> getTags() { public List<Tag> getTags() {
@ -205,7 +209,7 @@ public enum StatusEnum {
return this; return this;
} }
/** /**
* pet status in the store * pet status in the store
**/ **/
public Pet status(StatusEnum status) { public Pet status(StatusEnum status) {
@ -214,8 +218,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "pet status in the store") @ApiModelProperty(value = "pet status in the store")
@JsonProperty("status") @JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {

View File

@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("ReadOnlyFirst") @JsonTypeName("ReadOnlyFirst")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class ReadOnlyFirst implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class ReadOnlyFirst implements Serializable {
private @Valid String bar; private @Valid String bar;
private @Valid String baz; private @Valid String baz;
@ -29,8 +29,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("bar") @JsonProperty("bar")
public String getBar() { public String getBar() {
@ -42,7 +40,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.bar = bar; this.bar = bar;
} }
/** /**
**/ **/
public ReadOnlyFirst baz(String baz) { public ReadOnlyFirst baz(String baz) {
this.baz = baz; this.baz = baz;
@ -50,8 +48,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("baz") @JsonProperty("baz")
public String getBaz() { public String getBaz() {

View File

@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("$special[model.name]") @JsonTypeName("$special[model.name]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class SpecialModelName implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class SpecialModelName implements Serializable {
private @Valid Long $specialPropertyName; private @Valid Long $specialPropertyName;
/** /**
@ -29,8 +29,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("$special[property.name]") @JsonProperty("$special[property.name]")
public Long get$SpecialPropertyName() { public Long get$SpecialPropertyName() {

View File

@ -1,58 +0,0 @@
package org.openapitools.model;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
public class StringBooleanMap extends HashMap<String, Boolean> implements Serializable {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
StringBooleanMap stringBooleanMap = (StringBooleanMap) o;
return true;
}
@Override
public int hashCode() {
return Objects.hash();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class StringBooleanMap {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("Tag") @JsonTypeName("Tag")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class Tag implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class Tag implements Serializable {
private @Valid Long id; private @Valid Long id;
private @Valid String name; private @Valid String name;
@ -29,8 +29,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -42,7 +40,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.id = id; this.id = id;
} }
/** /**
**/ **/
public Tag name(String name) { public Tag name(String name) {
this.name = name; this.name = name;
@ -50,8 +48,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {

View File

@ -19,8 +19,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("TypeHolderDefault") @JsonTypeName("TypeHolderDefault")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class TypeHolderDefault implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class TypeHolderDefault implements Serializable {
private @Valid String stringItem = "what"; private @Valid String stringItem = "what";
private @Valid BigDecimal numberItem; private @Valid BigDecimal numberItem;
private @Valid Integer integerItem; private @Valid Integer integerItem;
@ -35,8 +35,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("string_item") @JsonProperty("string_item")
@NotNull @NotNull
@ -49,7 +47,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.stringItem = stringItem; this.stringItem = stringItem;
} }
/** /**
**/ **/
public TypeHolderDefault numberItem(BigDecimal numberItem) { public TypeHolderDefault numberItem(BigDecimal numberItem) {
this.numberItem = numberItem; this.numberItem = numberItem;
@ -57,8 +55,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("number_item") @JsonProperty("number_item")
@NotNull @NotNull
@ -71,7 +67,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.numberItem = numberItem; this.numberItem = numberItem;
} }
/** /**
**/ **/
public TypeHolderDefault integerItem(Integer integerItem) { public TypeHolderDefault integerItem(Integer integerItem) {
this.integerItem = integerItem; this.integerItem = integerItem;
@ -79,8 +75,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("integer_item") @JsonProperty("integer_item")
@NotNull @NotNull
@ -93,7 +87,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.integerItem = integerItem; this.integerItem = integerItem;
} }
/** /**
**/ **/
public TypeHolderDefault boolItem(Boolean boolItem) { public TypeHolderDefault boolItem(Boolean boolItem) {
this.boolItem = boolItem; this.boolItem = boolItem;
@ -101,8 +95,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("bool_item") @JsonProperty("bool_item")
@NotNull @NotNull
@ -115,7 +107,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.boolItem = boolItem; this.boolItem = boolItem;
} }
/** /**
**/ **/
public TypeHolderDefault arrayItem(List<Integer> arrayItem) { public TypeHolderDefault arrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem; this.arrayItem = arrayItem;
@ -123,8 +115,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("array_item") @JsonProperty("array_item")
@NotNull @NotNull

View File

@ -19,8 +19,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("TypeHolderExample") @JsonTypeName("TypeHolderExample")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class TypeHolderExample implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class TypeHolderExample implements Serializable {
private @Valid String stringItem; private @Valid String stringItem;
private @Valid BigDecimal numberItem; private @Valid BigDecimal numberItem;
private @Valid Float floatItem; private @Valid Float floatItem;
@ -36,8 +36,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "what", required = true, value = "") @ApiModelProperty(example = "what", required = true, value = "")
@JsonProperty("string_item") @JsonProperty("string_item")
@NotNull @NotNull
@ -50,7 +48,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.stringItem = stringItem; this.stringItem = stringItem;
} }
/** /**
**/ **/
public TypeHolderExample numberItem(BigDecimal numberItem) { public TypeHolderExample numberItem(BigDecimal numberItem) {
this.numberItem = numberItem; this.numberItem = numberItem;
@ -58,8 +56,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "1.234", required = true, value = "") @ApiModelProperty(example = "1.234", required = true, value = "")
@JsonProperty("number_item") @JsonProperty("number_item")
@NotNull @NotNull
@ -72,7 +68,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.numberItem = numberItem; this.numberItem = numberItem;
} }
/** /**
**/ **/
public TypeHolderExample floatItem(Float floatItem) { public TypeHolderExample floatItem(Float floatItem) {
this.floatItem = floatItem; this.floatItem = floatItem;
@ -80,8 +76,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "1.234", required = true, value = "") @ApiModelProperty(example = "1.234", required = true, value = "")
@JsonProperty("float_item") @JsonProperty("float_item")
@NotNull @NotNull
@ -94,7 +88,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.floatItem = floatItem; this.floatItem = floatItem;
} }
/** /**
**/ **/
public TypeHolderExample integerItem(Integer integerItem) { public TypeHolderExample integerItem(Integer integerItem) {
this.integerItem = integerItem; this.integerItem = integerItem;
@ -102,8 +96,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "-2", required = true, value = "") @ApiModelProperty(example = "-2", required = true, value = "")
@JsonProperty("integer_item") @JsonProperty("integer_item")
@NotNull @NotNull
@ -116,7 +108,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.integerItem = integerItem; this.integerItem = integerItem;
} }
/** /**
**/ **/
public TypeHolderExample boolItem(Boolean boolItem) { public TypeHolderExample boolItem(Boolean boolItem) {
this.boolItem = boolItem; this.boolItem = boolItem;
@ -124,8 +116,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "true", required = true, value = "") @ApiModelProperty(example = "true", required = true, value = "")
@JsonProperty("bool_item") @JsonProperty("bool_item")
@NotNull @NotNull
@ -138,7 +128,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.boolItem = boolItem; this.boolItem = boolItem;
} }
/** /**
**/ **/
public TypeHolderExample arrayItem(List<Integer> arrayItem) { public TypeHolderExample arrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem; this.arrayItem = arrayItem;
@ -146,8 +136,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "")
@JsonProperty("array_item") @JsonProperty("array_item")
@NotNull @NotNull

View File

@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("User") @JsonTypeName("User")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class User implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class User implements Serializable {
private @Valid Long id; private @Valid Long id;
private @Valid String username; private @Valid String username;
private @Valid String firstName; private @Valid String firstName;
@ -35,8 +35,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -48,7 +46,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.id = id; this.id = id;
} }
/** /**
**/ **/
public User username(String username) { public User username(String username) {
this.username = username; this.username = username;
@ -56,8 +54,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("username") @JsonProperty("username")
public String getUsername() { public String getUsername() {
@ -69,7 +65,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.username = username; this.username = username;
} }
/** /**
**/ **/
public User firstName(String firstName) { public User firstName(String firstName) {
this.firstName = firstName; this.firstName = firstName;
@ -77,8 +73,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("firstName") @JsonProperty("firstName")
public String getFirstName() { public String getFirstName() {
@ -90,7 +84,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.firstName = firstName; this.firstName = firstName;
} }
/** /**
**/ **/
public User lastName(String lastName) { public User lastName(String lastName) {
this.lastName = lastName; this.lastName = lastName;
@ -98,8 +92,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("lastName") @JsonProperty("lastName")
public String getLastName() { public String getLastName() {
@ -111,7 +103,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.lastName = lastName; this.lastName = lastName;
} }
/** /**
**/ **/
public User email(String email) { public User email(String email) {
this.email = email; this.email = email;
@ -119,8 +111,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("email") @JsonProperty("email")
public String getEmail() { public String getEmail() {
@ -132,7 +122,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.email = email; this.email = email;
} }
/** /**
**/ **/
public User password(String password) { public User password(String password) {
this.password = password; this.password = password;
@ -140,8 +130,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("password") @JsonProperty("password")
public String getPassword() { public String getPassword() {
@ -153,7 +141,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.password = password; this.password = password;
} }
/** /**
**/ **/
public User phone(String phone) { public User phone(String phone) {
this.phone = phone; this.phone = phone;
@ -161,8 +149,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("phone") @JsonProperty("phone")
public String getPhone() { public String getPhone() {
@ -174,7 +160,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.phone = phone; this.phone = phone;
} }
/** /**
* User Status * User Status
**/ **/
public User userStatus(Integer userStatus) { public User userStatus(Integer userStatus) {
@ -183,8 +169,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "User Status") @ApiModelProperty(value = "User Status")
@JsonProperty("userStatus") @JsonProperty("userStatus")
public Integer getUserStatus() { public Integer getUserStatus() {

View File

@ -19,37 +19,37 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("XmlItem") @JsonTypeName("XmlItem")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class XmlItem implements Serializable { @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")
public class XmlItem implements Serializable {
private @Valid String attributeString; private @Valid String attributeString;
private @Valid BigDecimal attributeNumber; private @Valid BigDecimal attributeNumber;
private @Valid Integer attributeInteger; private @Valid Integer attributeInteger;
private @Valid Boolean attributeBoolean; private @Valid Boolean attributeBoolean;
private @Valid List<Integer> wrappedArray = new ArrayList<>(); private @Valid List<Integer> wrappedArray = null;
private @Valid String nameString; private @Valid String nameString;
private @Valid BigDecimal nameNumber; private @Valid BigDecimal nameNumber;
private @Valid Integer nameInteger; private @Valid Integer nameInteger;
private @Valid Boolean nameBoolean; private @Valid Boolean nameBoolean;
private @Valid List<Integer> nameArray = new ArrayList<>(); private @Valid List<Integer> nameArray = null;
private @Valid List<Integer> nameWrappedArray = new ArrayList<>(); private @Valid List<Integer> nameWrappedArray = null;
private @Valid String prefixString; private @Valid String prefixString;
private @Valid BigDecimal prefixNumber; private @Valid BigDecimal prefixNumber;
private @Valid Integer prefixInteger; private @Valid Integer prefixInteger;
private @Valid Boolean prefixBoolean; private @Valid Boolean prefixBoolean;
private @Valid List<Integer> prefixArray = new ArrayList<>(); private @Valid List<Integer> prefixArray = null;
private @Valid List<Integer> prefixWrappedArray = new ArrayList<>(); private @Valid List<Integer> prefixWrappedArray = null;
private @Valid String namespaceString; private @Valid String namespaceString;
private @Valid BigDecimal namespaceNumber; private @Valid BigDecimal namespaceNumber;
private @Valid Integer namespaceInteger; private @Valid Integer namespaceInteger;
private @Valid Boolean namespaceBoolean; private @Valid Boolean namespaceBoolean;
private @Valid List<Integer> namespaceArray = new ArrayList<>(); private @Valid List<Integer> namespaceArray = null;
private @Valid List<Integer> namespaceWrappedArray = new ArrayList<>(); private @Valid List<Integer> namespaceWrappedArray = null;
private @Valid String prefixNsString; private @Valid String prefixNsString;
private @Valid BigDecimal prefixNsNumber; private @Valid BigDecimal prefixNsNumber;
private @Valid Integer prefixNsInteger; private @Valid Integer prefixNsInteger;
private @Valid Boolean prefixNsBoolean; private @Valid Boolean prefixNsBoolean;
private @Valid List<Integer> prefixNsArray = new ArrayList<>(); private @Valid List<Integer> prefixNsArray = null;
private @Valid List<Integer> prefixNsWrappedArray = new ArrayList<>(); private @Valid List<Integer> prefixNsWrappedArray = null;
/** /**
**/ **/
@ -59,8 +59,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "string", value = "") @ApiModelProperty(example = "string", value = "")
@JsonProperty("attribute_string") @JsonProperty("attribute_string")
public String getAttributeString() { public String getAttributeString() {
@ -72,7 +70,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.attributeString = attributeString; this.attributeString = attributeString;
} }
/** /**
**/ **/
public XmlItem attributeNumber(BigDecimal attributeNumber) { public XmlItem attributeNumber(BigDecimal attributeNumber) {
this.attributeNumber = attributeNumber; this.attributeNumber = attributeNumber;
@ -80,8 +78,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "1.234", value = "") @ApiModelProperty(example = "1.234", value = "")
@JsonProperty("attribute_number") @JsonProperty("attribute_number")
public BigDecimal getAttributeNumber() { public BigDecimal getAttributeNumber() {
@ -93,7 +89,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.attributeNumber = attributeNumber; this.attributeNumber = attributeNumber;
} }
/** /**
**/ **/
public XmlItem attributeInteger(Integer attributeInteger) { public XmlItem attributeInteger(Integer attributeInteger) {
this.attributeInteger = attributeInteger; this.attributeInteger = attributeInteger;
@ -101,8 +97,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "-2", value = "") @ApiModelProperty(example = "-2", value = "")
@JsonProperty("attribute_integer") @JsonProperty("attribute_integer")
public Integer getAttributeInteger() { public Integer getAttributeInteger() {
@ -114,7 +108,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.attributeInteger = attributeInteger; this.attributeInteger = attributeInteger;
} }
/** /**
**/ **/
public XmlItem attributeBoolean(Boolean attributeBoolean) { public XmlItem attributeBoolean(Boolean attributeBoolean) {
this.attributeBoolean = attributeBoolean; this.attributeBoolean = attributeBoolean;
@ -122,8 +116,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "true", value = "") @ApiModelProperty(example = "true", value = "")
@JsonProperty("attribute_boolean") @JsonProperty("attribute_boolean")
public Boolean getAttributeBoolean() { public Boolean getAttributeBoolean() {
@ -135,7 +127,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.attributeBoolean = attributeBoolean; this.attributeBoolean = attributeBoolean;
} }
/** /**
**/ **/
public XmlItem wrappedArray(List<Integer> wrappedArray) { public XmlItem wrappedArray(List<Integer> wrappedArray) {
this.wrappedArray = wrappedArray; this.wrappedArray = wrappedArray;
@ -143,8 +135,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("wrapped_array") @JsonProperty("wrapped_array")
public List<Integer> getWrappedArray() { public List<Integer> getWrappedArray() {
@ -172,7 +162,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public XmlItem nameString(String nameString) { public XmlItem nameString(String nameString) {
this.nameString = nameString; this.nameString = nameString;
@ -180,8 +170,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "string", value = "") @ApiModelProperty(example = "string", value = "")
@JsonProperty("name_string") @JsonProperty("name_string")
public String getNameString() { public String getNameString() {
@ -193,7 +181,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.nameString = nameString; this.nameString = nameString;
} }
/** /**
**/ **/
public XmlItem nameNumber(BigDecimal nameNumber) { public XmlItem nameNumber(BigDecimal nameNumber) {
this.nameNumber = nameNumber; this.nameNumber = nameNumber;
@ -201,8 +189,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "1.234", value = "") @ApiModelProperty(example = "1.234", value = "")
@JsonProperty("name_number") @JsonProperty("name_number")
public BigDecimal getNameNumber() { public BigDecimal getNameNumber() {
@ -214,7 +200,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.nameNumber = nameNumber; this.nameNumber = nameNumber;
} }
/** /**
**/ **/
public XmlItem nameInteger(Integer nameInteger) { public XmlItem nameInteger(Integer nameInteger) {
this.nameInteger = nameInteger; this.nameInteger = nameInteger;
@ -222,8 +208,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "-2", value = "") @ApiModelProperty(example = "-2", value = "")
@JsonProperty("name_integer") @JsonProperty("name_integer")
public Integer getNameInteger() { public Integer getNameInteger() {
@ -235,7 +219,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.nameInteger = nameInteger; this.nameInteger = nameInteger;
} }
/** /**
**/ **/
public XmlItem nameBoolean(Boolean nameBoolean) { public XmlItem nameBoolean(Boolean nameBoolean) {
this.nameBoolean = nameBoolean; this.nameBoolean = nameBoolean;
@ -243,8 +227,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "true", value = "") @ApiModelProperty(example = "true", value = "")
@JsonProperty("name_boolean") @JsonProperty("name_boolean")
public Boolean getNameBoolean() { public Boolean getNameBoolean() {
@ -256,7 +238,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.nameBoolean = nameBoolean; this.nameBoolean = nameBoolean;
} }
/** /**
**/ **/
public XmlItem nameArray(List<Integer> nameArray) { public XmlItem nameArray(List<Integer> nameArray) {
this.nameArray = nameArray; this.nameArray = nameArray;
@ -264,8 +246,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("name_array") @JsonProperty("name_array")
public List<Integer> getNameArray() { public List<Integer> getNameArray() {
@ -293,7 +273,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public XmlItem nameWrappedArray(List<Integer> nameWrappedArray) { public XmlItem nameWrappedArray(List<Integer> nameWrappedArray) {
this.nameWrappedArray = nameWrappedArray; this.nameWrappedArray = nameWrappedArray;
@ -301,8 +281,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("name_wrapped_array") @JsonProperty("name_wrapped_array")
public List<Integer> getNameWrappedArray() { public List<Integer> getNameWrappedArray() {
@ -330,7 +308,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public XmlItem prefixString(String prefixString) { public XmlItem prefixString(String prefixString) {
this.prefixString = prefixString; this.prefixString = prefixString;
@ -338,8 +316,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "string", value = "") @ApiModelProperty(example = "string", value = "")
@JsonProperty("prefix_string") @JsonProperty("prefix_string")
public String getPrefixString() { public String getPrefixString() {
@ -351,7 +327,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.prefixString = prefixString; this.prefixString = prefixString;
} }
/** /**
**/ **/
public XmlItem prefixNumber(BigDecimal prefixNumber) { public XmlItem prefixNumber(BigDecimal prefixNumber) {
this.prefixNumber = prefixNumber; this.prefixNumber = prefixNumber;
@ -359,8 +335,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "1.234", value = "") @ApiModelProperty(example = "1.234", value = "")
@JsonProperty("prefix_number") @JsonProperty("prefix_number")
public BigDecimal getPrefixNumber() { public BigDecimal getPrefixNumber() {
@ -372,7 +346,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.prefixNumber = prefixNumber; this.prefixNumber = prefixNumber;
} }
/** /**
**/ **/
public XmlItem prefixInteger(Integer prefixInteger) { public XmlItem prefixInteger(Integer prefixInteger) {
this.prefixInteger = prefixInteger; this.prefixInteger = prefixInteger;
@ -380,8 +354,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "-2", value = "") @ApiModelProperty(example = "-2", value = "")
@JsonProperty("prefix_integer") @JsonProperty("prefix_integer")
public Integer getPrefixInteger() { public Integer getPrefixInteger() {
@ -393,7 +365,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.prefixInteger = prefixInteger; this.prefixInteger = prefixInteger;
} }
/** /**
**/ **/
public XmlItem prefixBoolean(Boolean prefixBoolean) { public XmlItem prefixBoolean(Boolean prefixBoolean) {
this.prefixBoolean = prefixBoolean; this.prefixBoolean = prefixBoolean;
@ -401,8 +373,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "true", value = "") @ApiModelProperty(example = "true", value = "")
@JsonProperty("prefix_boolean") @JsonProperty("prefix_boolean")
public Boolean getPrefixBoolean() { public Boolean getPrefixBoolean() {
@ -414,7 +384,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.prefixBoolean = prefixBoolean; this.prefixBoolean = prefixBoolean;
} }
/** /**
**/ **/
public XmlItem prefixArray(List<Integer> prefixArray) { public XmlItem prefixArray(List<Integer> prefixArray) {
this.prefixArray = prefixArray; this.prefixArray = prefixArray;
@ -422,8 +392,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("prefix_array") @JsonProperty("prefix_array")
public List<Integer> getPrefixArray() { public List<Integer> getPrefixArray() {
@ -451,7 +419,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public XmlItem prefixWrappedArray(List<Integer> prefixWrappedArray) { public XmlItem prefixWrappedArray(List<Integer> prefixWrappedArray) {
this.prefixWrappedArray = prefixWrappedArray; this.prefixWrappedArray = prefixWrappedArray;
@ -459,8 +427,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("prefix_wrapped_array") @JsonProperty("prefix_wrapped_array")
public List<Integer> getPrefixWrappedArray() { public List<Integer> getPrefixWrappedArray() {
@ -488,7 +454,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public XmlItem namespaceString(String namespaceString) { public XmlItem namespaceString(String namespaceString) {
this.namespaceString = namespaceString; this.namespaceString = namespaceString;
@ -496,8 +462,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "string", value = "") @ApiModelProperty(example = "string", value = "")
@JsonProperty("namespace_string") @JsonProperty("namespace_string")
public String getNamespaceString() { public String getNamespaceString() {
@ -509,7 +473,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.namespaceString = namespaceString; this.namespaceString = namespaceString;
} }
/** /**
**/ **/
public XmlItem namespaceNumber(BigDecimal namespaceNumber) { public XmlItem namespaceNumber(BigDecimal namespaceNumber) {
this.namespaceNumber = namespaceNumber; this.namespaceNumber = namespaceNumber;
@ -517,8 +481,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "1.234", value = "") @ApiModelProperty(example = "1.234", value = "")
@JsonProperty("namespace_number") @JsonProperty("namespace_number")
public BigDecimal getNamespaceNumber() { public BigDecimal getNamespaceNumber() {
@ -530,7 +492,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.namespaceNumber = namespaceNumber; this.namespaceNumber = namespaceNumber;
} }
/** /**
**/ **/
public XmlItem namespaceInteger(Integer namespaceInteger) { public XmlItem namespaceInteger(Integer namespaceInteger) {
this.namespaceInteger = namespaceInteger; this.namespaceInteger = namespaceInteger;
@ -538,8 +500,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "-2", value = "") @ApiModelProperty(example = "-2", value = "")
@JsonProperty("namespace_integer") @JsonProperty("namespace_integer")
public Integer getNamespaceInteger() { public Integer getNamespaceInteger() {
@ -551,7 +511,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.namespaceInteger = namespaceInteger; this.namespaceInteger = namespaceInteger;
} }
/** /**
**/ **/
public XmlItem namespaceBoolean(Boolean namespaceBoolean) { public XmlItem namespaceBoolean(Boolean namespaceBoolean) {
this.namespaceBoolean = namespaceBoolean; this.namespaceBoolean = namespaceBoolean;
@ -559,8 +519,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "true", value = "") @ApiModelProperty(example = "true", value = "")
@JsonProperty("namespace_boolean") @JsonProperty("namespace_boolean")
public Boolean getNamespaceBoolean() { public Boolean getNamespaceBoolean() {
@ -572,7 +530,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.namespaceBoolean = namespaceBoolean; this.namespaceBoolean = namespaceBoolean;
} }
/** /**
**/ **/
public XmlItem namespaceArray(List<Integer> namespaceArray) { public XmlItem namespaceArray(List<Integer> namespaceArray) {
this.namespaceArray = namespaceArray; this.namespaceArray = namespaceArray;
@ -580,8 +538,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("namespace_array") @JsonProperty("namespace_array")
public List<Integer> getNamespaceArray() { public List<Integer> getNamespaceArray() {
@ -609,7 +565,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public XmlItem namespaceWrappedArray(List<Integer> namespaceWrappedArray) { public XmlItem namespaceWrappedArray(List<Integer> namespaceWrappedArray) {
this.namespaceWrappedArray = namespaceWrappedArray; this.namespaceWrappedArray = namespaceWrappedArray;
@ -617,8 +573,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("namespace_wrapped_array") @JsonProperty("namespace_wrapped_array")
public List<Integer> getNamespaceWrappedArray() { public List<Integer> getNamespaceWrappedArray() {
@ -646,7 +600,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public XmlItem prefixNsString(String prefixNsString) { public XmlItem prefixNsString(String prefixNsString) {
this.prefixNsString = prefixNsString; this.prefixNsString = prefixNsString;
@ -654,8 +608,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "string", value = "") @ApiModelProperty(example = "string", value = "")
@JsonProperty("prefix_ns_string") @JsonProperty("prefix_ns_string")
public String getPrefixNsString() { public String getPrefixNsString() {
@ -667,7 +619,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.prefixNsString = prefixNsString; this.prefixNsString = prefixNsString;
} }
/** /**
**/ **/
public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) {
this.prefixNsNumber = prefixNsNumber; this.prefixNsNumber = prefixNsNumber;
@ -675,8 +627,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "1.234", value = "") @ApiModelProperty(example = "1.234", value = "")
@JsonProperty("prefix_ns_number") @JsonProperty("prefix_ns_number")
public BigDecimal getPrefixNsNumber() { public BigDecimal getPrefixNsNumber() {
@ -688,7 +638,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.prefixNsNumber = prefixNsNumber; this.prefixNsNumber = prefixNsNumber;
} }
/** /**
**/ **/
public XmlItem prefixNsInteger(Integer prefixNsInteger) { public XmlItem prefixNsInteger(Integer prefixNsInteger) {
this.prefixNsInteger = prefixNsInteger; this.prefixNsInteger = prefixNsInteger;
@ -696,8 +646,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "-2", value = "") @ApiModelProperty(example = "-2", value = "")
@JsonProperty("prefix_ns_integer") @JsonProperty("prefix_ns_integer")
public Integer getPrefixNsInteger() { public Integer getPrefixNsInteger() {
@ -709,7 +657,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.prefixNsInteger = prefixNsInteger; this.prefixNsInteger = prefixNsInteger;
} }
/** /**
**/ **/
public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) {
this.prefixNsBoolean = prefixNsBoolean; this.prefixNsBoolean = prefixNsBoolean;
@ -717,8 +665,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(example = "true", value = "") @ApiModelProperty(example = "true", value = "")
@JsonProperty("prefix_ns_boolean") @JsonProperty("prefix_ns_boolean")
public Boolean getPrefixNsBoolean() { public Boolean getPrefixNsBoolean() {
@ -730,7 +676,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
this.prefixNsBoolean = prefixNsBoolean; this.prefixNsBoolean = prefixNsBoolean;
} }
/** /**
**/ **/
public XmlItem prefixNsArray(List<Integer> prefixNsArray) { public XmlItem prefixNsArray(List<Integer> prefixNsArray) {
this.prefixNsArray = prefixNsArray; this.prefixNsArray = prefixNsArray;
@ -738,8 +684,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("prefix_ns_array") @JsonProperty("prefix_ns_array")
public List<Integer> getPrefixNsArray() { public List<Integer> getPrefixNsArray() {
@ -767,7 +711,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
return this; return this;
} }
/** /**
**/ **/
public XmlItem prefixNsWrappedArray(List<Integer> prefixNsWrappedArray) { public XmlItem prefixNsWrappedArray(List<Integer> prefixNsWrappedArray) {
this.prefixNsWrappedArray = prefixNsWrappedArray; this.prefixNsWrappedArray = prefixNsWrappedArray;
@ -775,8 +719,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("prefix_ns_wrapped_array") @JsonProperty("prefix_ns_wrapped_array")
public List<Integer> getPrefixNsWrappedArray() { public List<Integer> getPrefixNsWrappedArray() {

View File

@ -46,7 +46,7 @@ paths:
tags: tags:
- pet - pet
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: application/json x-content-type: application/json
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: pet - tag: pet
@ -83,7 +83,7 @@ paths:
tags: tags:
- pet - pet
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: application/json x-content-type: application/json
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: pet - tag: pet
@ -262,13 +262,7 @@ paths:
content: content:
application/x-www-form-urlencoded: application/x-www-form-urlencoded:
schema: schema:
properties: $ref: '#/components/schemas/updatePetWithForm_request'
name:
description: Updated name of the pet
type: string
status:
description: Updated status of the pet
type: string
responses: responses:
"405": "405":
content: {} content: {}
@ -280,7 +274,7 @@ paths:
summary: Updates a pet in the store with form data summary: Updates a pet in the store with form data
tags: tags:
- pet - pet
x-contentType: application/x-www-form-urlencoded x-content-type: application/x-www-form-urlencoded
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: pet - tag: pet
@ -299,14 +293,7 @@ paths:
content: content:
multipart/form-data: multipart/form-data:
schema: schema:
properties: $ref: '#/components/schemas/uploadFile_request'
additionalMetadata:
description: Additional data to pass to server
type: string
file:
description: file to upload
format: binary
type: string
responses: responses:
"200": "200":
content: content:
@ -321,7 +308,7 @@ paths:
summary: uploads an image summary: uploads an image
tags: tags:
- pet - pet
x-contentType: multipart/form-data x-content-type: multipart/form-data
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: pet - tag: pet
@ -374,7 +361,7 @@ paths:
tags: tags:
- store - store
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: '*/*' x-content-type: '*/*'
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: store - tag: store
@ -458,7 +445,7 @@ paths:
tags: tags:
- user - user
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: '*/*' x-content-type: '*/*'
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: user - tag: user
@ -482,7 +469,7 @@ paths:
tags: tags:
- user - user
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: '*/*' x-content-type: '*/*'
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: user - tag: user
@ -506,7 +493,7 @@ paths:
tags: tags:
- user - user
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: '*/*' x-content-type: '*/*'
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: user - tag: user
@ -652,7 +639,7 @@ paths:
tags: tags:
- user - user
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: '*/*' x-content-type: '*/*'
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: user - tag: user
@ -680,7 +667,7 @@ paths:
tags: tags:
- fake_classname_tags 123#$%^ - fake_classname_tags 123#$%^
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: application/json x-content-type: application/json
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: fake_classname_tags 123#$%^ - tag: fake_classname_tags 123#$%^
@ -807,24 +794,7 @@ paths:
content: content:
application/x-www-form-urlencoded: application/x-www-form-urlencoded:
schema: schema:
properties: $ref: '#/components/schemas/testEnumParameters_request'
enum_form_string_array:
description: Form parameter enum test (string array)
items:
default: $
enum:
- '>'
- $
type: string
type: array
enum_form_string:
default: -efg
description: Form parameter enum test (string)
enum:
- _abc
- -efg
- (xyz)
type: string
responses: responses:
"400": "400":
content: {} content: {}
@ -835,7 +805,7 @@ paths:
summary: To test enum parameters summary: To test enum parameters
tags: tags:
- fake - fake
x-contentType: application/x-www-form-urlencoded x-content-type: application/x-www-form-urlencoded
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: fake - tag: fake
@ -860,7 +830,7 @@ paths:
tags: tags:
- fake - fake
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: application/json x-content-type: application/json
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: fake - tag: fake
@ -875,77 +845,7 @@ paths:
content: content:
application/x-www-form-urlencoded: application/x-www-form-urlencoded:
schema: schema:
properties: $ref: '#/components/schemas/testEndpointParameters_request'
integer:
description: None
format: int32
maximum: 100
minimum: 10
type: integer
int32:
description: None
format: int32
maximum: 200
minimum: 20
type: integer
int64:
description: None
format: int64
type: integer
number:
description: None
maximum: 543.2
minimum: 32.1
type: number
float:
description: None
format: float
maximum: 987.6
type: number
double:
description: None
format: double
maximum: 123.4
minimum: 67.8
type: number
string:
description: None
pattern: "/[a-z]/i"
type: string
pattern_without_delimiter:
description: None
pattern: "^[A-Z].*"
type: string
byte:
description: None
format: byte
type: string
binary:
description: None
format: binary
type: string
date:
description: None
format: date
type: string
dateTime:
description: None
format: date-time
type: string
password:
description: None
format: password
maxLength: 64
minLength: 10
type: string
callback:
description: None
type: string
required:
- byte
- double
- number
- pattern_without_delimiter
required: true required: true
responses: responses:
"400": "400":
@ -963,7 +863,7 @@ paths:
가짜 엔드 포인트 가짜 엔드 포인트
tags: tags:
- fake - fake
x-contentType: application/x-www-form-urlencoded x-content-type: application/x-www-form-urlencoded
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: fake - tag: fake
@ -988,7 +888,7 @@ paths:
tags: tags:
- fake - fake
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: '*/*' x-content-type: '*/*'
x-accepts: '*/*' x-accepts: '*/*'
x-tags: x-tags:
- tag: fake - tag: fake
@ -1013,7 +913,7 @@ paths:
tags: tags:
- fake - fake
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: '*/*' x-content-type: '*/*'
x-accepts: '*/*' x-accepts: '*/*'
x-tags: x-tags:
- tag: fake - tag: fake
@ -1038,7 +938,7 @@ paths:
tags: tags:
- fake - fake
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: '*/*' x-content-type: '*/*'
x-accepts: '*/*' x-accepts: '*/*'
x-tags: x-tags:
- tag: fake - tag: fake
@ -1063,7 +963,7 @@ paths:
tags: tags:
- fake - fake
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: '*/*' x-content-type: '*/*'
x-accepts: '*/*' x-accepts: '*/*'
x-tags: x-tags:
- tag: fake - tag: fake
@ -1074,16 +974,7 @@ paths:
content: content:
application/x-www-form-urlencoded: application/x-www-form-urlencoded:
schema: schema:
properties: $ref: '#/components/schemas/testJsonFormData_request'
param:
description: field1
type: string
param2:
description: field2
type: string
required:
- param
- param2
required: true required: true
responses: responses:
"200": "200":
@ -1092,7 +983,7 @@ paths:
summary: test json serialization of form data summary: test json serialization of form data
tags: tags:
- fake - fake
x-contentType: application/x-www-form-urlencoded x-content-type: application/x-www-form-urlencoded
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: fake - tag: fake
@ -1116,7 +1007,7 @@ paths:
tags: tags:
- fake - fake
x-codegen-request-body-name: param x-codegen-request-body-name: param
x-contentType: application/json x-content-type: application/json
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: fake - tag: fake
@ -1142,7 +1033,7 @@ paths:
tags: tags:
- fake - fake
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: application/json x-content-type: application/json
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: fake - tag: fake
@ -1180,7 +1071,7 @@ paths:
tags: tags:
- fake - fake
x-codegen-request-body-name: XmlItem x-codegen-request-body-name: XmlItem
x-contentType: application/xml x-content-type: application/xml
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: fake - tag: fake
@ -1206,7 +1097,7 @@ paths:
tags: tags:
- $another-fake? - $another-fake?
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: application/json x-content-type: application/json
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: $another-fake? - tag: $another-fake?
@ -1228,7 +1119,7 @@ paths:
tags: tags:
- fake - fake
x-codegen-request-body-name: body x-codegen-request-body-name: body
x-contentType: application/json x-content-type: application/json
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: fake - tag: fake
@ -1303,16 +1194,7 @@ paths:
content: content:
multipart/form-data: multipart/form-data:
schema: schema:
properties: $ref: '#/components/schemas/uploadFileWithRequiredFile_request'
additionalMetadata:
description: Additional data to pass to server
type: string
requiredFile:
description: file to upload
format: binary
type: string
required:
- requiredFile
required: true required: true
responses: responses:
"200": "200":
@ -1328,7 +1210,7 @@ paths:
summary: uploads an image (required) summary: uploads an image (required)
tags: tags:
- pet - pet
x-contentType: multipart/form-data x-content-type: multipart/form-data
x-accepts: application/json x-accepts: application/json
x-tags: x-tags:
- tag: pet - tag: pet
@ -2221,6 +2103,136 @@ components:
xml: xml:
namespace: http://a.com/schema namespace: http://a.com/schema
prefix: pre prefix: pre
updatePetWithForm_request:
properties:
name:
description: Updated name of the pet
type: string
status:
description: Updated status of the pet
type: string
uploadFile_request:
properties:
additionalMetadata:
description: Additional data to pass to server
type: string
file:
description: file to upload
format: binary
type: string
testEnumParameters_request:
properties:
enum_form_string_array:
description: Form parameter enum test (string array)
items:
default: $
enum:
- '>'
- $
type: string
type: array
enum_form_string:
default: -efg
description: Form parameter enum test (string)
enum:
- _abc
- -efg
- (xyz)
type: string
testEndpointParameters_request:
properties:
integer:
description: None
format: int32
maximum: 100
minimum: 10
type: integer
int32:
description: None
format: int32
maximum: 200
minimum: 20
type: integer
int64:
description: None
format: int64
type: integer
number:
description: None
maximum: 543.2
minimum: 32.1
type: number
float:
description: None
format: float
maximum: 987.6
type: number
double:
description: None
format: double
maximum: 123.4
minimum: 67.8
type: number
string:
description: None
pattern: "/[a-z]/i"
type: string
pattern_without_delimiter:
description: None
pattern: "^[A-Z].*"
type: string
byte:
description: None
format: byte
type: string
binary:
description: None
format: binary
type: string
date:
description: None
format: date
type: string
dateTime:
description: None
format: date-time
type: string
password:
description: None
format: password
maxLength: 64
minLength: 10
type: string
callback:
description: None
type: string
required:
- byte
- double
- number
- pattern_without_delimiter
testJsonFormData_request:
properties:
param:
description: field1
type: string
param2:
description: field2
type: string
required:
- param
- param2
uploadFileWithRequiredFile_request:
properties:
additionalMetadata:
description: Additional data to pass to server
type: string
requiredFile:
description: file to upload
format: binary
type: string
required:
- requiredFile
Dog_allOf: Dog_allOf:
properties: properties:
breed: breed:

View File

@ -4,6 +4,7 @@ src/gen/java/org/openapitools/api/AnotherFakeApi.java
src/gen/java/org/openapitools/api/FakeApi.java src/gen/java/org/openapitools/api/FakeApi.java
src/gen/java/org/openapitools/api/FakeClassnameTestApi.java src/gen/java/org/openapitools/api/FakeClassnameTestApi.java
src/gen/java/org/openapitools/api/PetApi.java src/gen/java/org/openapitools/api/PetApi.java
src/gen/java/org/openapitools/api/RestResourceRoot.java
src/gen/java/org/openapitools/api/StoreApi.java src/gen/java/org/openapitools/api/StoreApi.java
src/gen/java/org/openapitools/api/UserApi.java src/gen/java/org/openapitools/api/UserApi.java
src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java

View File

@ -0,0 +1,5 @@
package org.openapitools.api;
public class RestResourceRoot {
public static final String APPLICATION_PATH = "/v2";
}

View File

@ -5,6 +5,7 @@ src/gen/java/org/openapitools/api/FakeApi.java
src/gen/java/org/openapitools/api/FakeClassnameTestApi.java src/gen/java/org/openapitools/api/FakeClassnameTestApi.java
src/gen/java/org/openapitools/api/PetApi.java src/gen/java/org/openapitools/api/PetApi.java
src/gen/java/org/openapitools/api/RestApplication.java src/gen/java/org/openapitools/api/RestApplication.java
src/gen/java/org/openapitools/api/RestResourceRoot.java
src/gen/java/org/openapitools/api/StoreApi.java src/gen/java/org/openapitools/api/StoreApi.java
src/gen/java/org/openapitools/api/UserApi.java src/gen/java/org/openapitools/api/UserApi.java
src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java

View File

@ -3,7 +3,7 @@ package org.openapitools.api;
import javax.ws.rs.ApplicationPath; import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application; import javax.ws.rs.core.Application;
@ApplicationPath("/v2") @ApplicationPath(RestResourceRoot.APPLICATION_PATH)
public class RestApplication extends Application { public class RestApplication extends Application {
} }

View File

@ -0,0 +1,5 @@
package org.openapitools.api;
public class RestResourceRoot {
public static final String APPLICATION_PATH = "/v2";
}