[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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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";
@ -37,8 +38,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("className") @JsonProperty("className")
@NotNull @NotNull
@ -59,8 +58,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("color") @JsonProperty("color")
public String getColor() { public String getColor() {

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() {
@ -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() {
@ -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,9 +17,8 @@ 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,9 +17,8 @@ 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() {
@ -54,8 +52,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("CapitalCamel") @JsonProperty("CapitalCamel")
public String getCapitalCamel() { public String getCapitalCamel() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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,9 +18,8 @@ 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,7 +68,6 @@ 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() {
@ -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,9 +18,8 @@ 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,7 +68,6 @@ 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,7 +116,6 @@ 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,7 +164,6 @@ 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() {
@ -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
@ -209,8 +261,6 @@ public enum EnumNumberEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("enum_integer") @JsonProperty("enum_integer")
public EnumIntegerEnum getEnumInteger() { public EnumIntegerEnum getEnumInteger() {
@ -230,8 +280,6 @@ public enum EnumNumberEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("enum_number") @JsonProperty("enum_number")
public EnumNumberEnum getEnumNumber() { public EnumNumberEnum getEnumNumber() {
@ -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() {
@ -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() {
@ -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() {
@ -93,8 +90,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("int64") @JsonProperty("int64")
public Long getInt64() { public Long getInt64() {
@ -116,8 +111,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("number") @JsonProperty("number")
@NotNull @NotNull
@ -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() {
@ -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() {
@ -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() {
@ -205,8 +192,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("byte") @JsonProperty("byte")
@NotNull @NotNull
@ -227,8 +212,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("binary") @JsonProperty("binary")
public File getBinary() { public File getBinary() {
@ -248,8 +231,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("date") @JsonProperty("date")
@NotNull @NotNull
@ -270,8 +251,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("dateTime") @JsonProperty("dateTime")
public Date getDateTime() { public Date getDateTime() {
@ -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() {
@ -312,8 +289,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("password") @JsonProperty("password")
@NotNull @NotNull
@ -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() {
@ -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,10 +18,9 @@ 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() {
@ -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() {
@ -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() {
@ -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() {
@ -57,8 +54,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("dateTime") @JsonProperty("dateTime")
public Date getDateTime() { public Date getDateTime() {
@ -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() {
@ -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() {
@ -52,8 +50,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("type") @JsonProperty("type")
public String getType() { public String getType() {
@ -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
@ -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() {
@ -76,8 +72,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("property") @JsonProperty("property")
public String getProperty() { public String getProperty() {
@ -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,13 +17,12 @@ 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() {
@ -88,8 +100,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("petId") @JsonProperty("petId")
public Long getPetId() { public Long getPetId() {
@ -109,8 +119,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("quantity") @JsonProperty("quantity")
public Integer getQuantity() { public Integer getQuantity() {
@ -130,8 +138,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("shipDate") @JsonProperty("shipDate")
public Date getShipDate() { public Date getShipDate() {
@ -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() {
@ -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() {
@ -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() {
@ -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,14 +23,13 @@ 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() {
@ -94,8 +106,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("category") @JsonProperty("category")
public Category getCategory() { public Category getCategory() {
@ -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
@ -137,8 +145,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
@NotNull @NotNull
@ -176,8 +182,6 @@ public enum StatusEnum {
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("tags") @JsonProperty("tags")
public List<Tag> getTags() { public List<Tag> getTags() {
@ -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() {
@ -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() {
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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() {
@ -56,8 +54,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("username") @JsonProperty("username")
public String getUsername() { public String getUsername() {
@ -77,8 +73,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("firstName") @JsonProperty("firstName")
public String getFirstName() { public String getFirstName() {
@ -98,8 +92,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("lastName") @JsonProperty("lastName")
public String getLastName() { public String getLastName() {
@ -119,8 +111,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("email") @JsonProperty("email")
public String getEmail() { public String getEmail() {
@ -140,8 +130,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("password") @JsonProperty("password")
public String getPassword() { public String getPassword() {
@ -161,8 +149,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
} }
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("phone") @JsonProperty("phone")
public String getPhone() { public String getPhone() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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() {
@ -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";
}