@@ -185,14 +203,18 @@
1.7
${java.version}
${java.version}
- 1.5.15
+ 1.5.18
9.2.9.v20150224
4.12
1.1.7
2.5
+
1.1.0.Final
- 3.1.11
- 2.8.9
+
+
+
+ 3.2.1
+ 2.9.1
UTF-8
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/PetApi.java
index c576178bcc0..4b4d21d2c06 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/PetApi.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/PetApi.java
@@ -1,9 +1,9 @@
package io.swagger.api;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -18,139 +18,194 @@
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
+
import javax.validation.constraints.*;
import javax.validation.Valid;
+
+
/**
* Swagger Petstore
*
+
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
+
*/
+
@Path("/v2")
@Api(value = "/", description = "")
+
public interface PetApi {
+
+
+
/**
* Add a new pet to the store
*
- *
- *
+
*/
+
@POST
@Path("/pet")
+
@Consumes({ "application/json", "application/xml" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Add a new pet to the store", tags={ "pet", })
+
+
+ @ApiOperation(value = "Add a new pet to the store", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input") })
- public void addPet(@Valid Pet body);
+ public void addPet(@Valid Pet pet);
+
+
/**
* Deletes a pet
*
- *
- *
+
*/
+
@DELETE
@Path("/pet/{petId}")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Deletes a pet", tags={ "pet", })
+
+
+ @ApiOperation(value = "Deletes a pet", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid pet value") })
- public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey);
+ public void deletePet(@PathParam("petId") Integer petId, @HeaderParam("api_key") String apiKey);
+
+
/**
* Finds Pets by status
*
+
* Multiple status values can be provided with comma separated strings
*
+
*/
+
@GET
@Path("/pet/findByStatus")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Finds Pets by status", tags={ "pet", })
+
+ @ApiOperation(value = "Finds Pets by status", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid status value") })
public List findPetsByStatus(@QueryParam("status") @NotNull List status);
+
+
/**
* Finds Pets by tags
*
+
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
*
+
*/
+
@GET
@Path("/pet/findByTags")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Finds Pets by tags", tags={ "pet", })
+
+ @ApiOperation(value = "Finds Pets by tags", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid tag value") })
public List findPetsByTags(@QueryParam("tags") @NotNull List tags);
+
+
/**
* Find pet by ID
*
+
* Returns a single pet
*
+
*/
+
@GET
@Path("/pet/{petId}")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Find pet by ID", tags={ "pet", })
+
+ @ApiOperation(value = "Find pet by ID", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Pet not found") })
- public Pet getPetById(@PathParam("petId") Long petId);
+ public Pet getPetById(@PathParam("petId") Integer petId);
+
+
/**
* Update an existing pet
*
- *
- *
+
*/
+
@PUT
@Path("/pet")
+
@Consumes({ "application/json", "application/xml" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Update an existing pet", tags={ "pet", })
+
+
+ @ApiOperation(value = "Update an existing pet", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Pet not found"),
@ApiResponse(code = 405, message = "Validation exception") })
- public void updatePet(@Valid Pet body);
+ public void updatePet(@Valid Pet pet);
+
+
/**
* Updates a pet in the store with form data
*
- *
- *
+
*/
+
@POST
@Path("/pet/{petId}")
+
@Consumes({ "application/x-www-form-urlencoded" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Updates a pet in the store with form data", tags={ "pet", })
+
+
+ @ApiOperation(value = "Updates a pet in the store with form data", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input") })
- public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status);
+ public void updatePetWithForm(@PathParam("petId") Integer petId, @Valid Object body);
+
+
/**
* uploads an image
*
- *
- *
+
*/
+
@POST
@Path("/pet/{petId}/uploadImage")
+
@Consumes({ "multipart/form-data" })
+
+
@Produces({ "application/json" })
+
@ApiOperation(value = "uploads an image", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail);
+ public ModelApiResponse uploadFile(@PathParam("petId") Integer petId, @Valid Object body);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java
index 5e18529e1b5..bbdfa6722a4 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java
@@ -3,6 +3,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -17,77 +18,116 @@
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
+
import javax.validation.constraints.*;
import javax.validation.Valid;
+
+
/**
* Swagger Petstore
*
+
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
+
*/
+
@Path("/v2")
@Api(value = "/", description = "")
+
public interface StoreApi {
+
+
+
/**
* Delete purchase order by ID
*
+
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
*
+
*/
+
@DELETE
@Path("/store/order/{orderId}")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Delete purchase order by ID", tags={ "store", })
+
+
+ @ApiOperation(value = "Delete purchase order by ID", tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Order not found") })
public void deleteOrder(@PathParam("orderId") String orderId);
+
+
/**
* Returns pet inventories by status
*
+
* Returns a map of status codes to quantities
*
+
*/
+
@GET
@Path("/store/inventory")
+
+
@Produces({ "application/json" })
- @ApiOperation(value = "Returns pet inventories by status", tags={ "store", })
+
+ @ApiOperation(value = "Returns pet inventories by status", tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Map getInventory();
+
+
/**
* Find purchase order by ID
*
+
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
*
+
*/
+
@GET
@Path("/store/order/{orderId}")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Find purchase order by ID", tags={ "store", })
+
+ @ApiOperation(value = "Find purchase order by ID", tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Order not found") })
- public Order getOrderById(@PathParam("orderId") @Min(1) @Max(5) Long orderId);
+ public Order getOrderById(@PathParam("orderId") @DecimalMin("1") @DecimalMax("5") Integer orderId);
+
+
/**
* Place an order for a pet
*
- *
- *
+
*/
+
@POST
@Path("/store/order")
+
+ @Consumes({ "*/*" })
+
+
@Produces({ "application/xml", "application/json" })
+
@ApiOperation(value = "Place an order for a pet", tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order") })
- public Order placeOrder(@Valid Order body);
+ public Order placeOrder(@Valid Order order);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java
index a5fd5adf01c..9a058049225 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java
@@ -1,8 +1,8 @@
package io.swagger.api;
-import java.util.List;
import io.swagger.model.User;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -17,134 +17,189 @@
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
+
import javax.validation.constraints.*;
import javax.validation.Valid;
+
+
/**
* Swagger Petstore
*
+
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
+
*/
+
@Path("/v2")
@Api(value = "/", description = "")
+
public interface UserApi {
+
+
+
/**
* Create user
*
+
* This can only be done by the logged in user.
*
+
*/
+
@POST
@Path("/user")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Create user", tags={ "user", })
+
+ @Consumes({ "*/*" })
+
+
+ @ApiOperation(value = "Create user", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
- public void createUser(@Valid User body);
+ public void createUser(@Valid User user);
+
+
/**
* Creates list of users with given input array
*
- *
- *
+
*/
+
@POST
@Path("/user/createWithArray")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
+
+ @Consumes({ "*/*" })
+
+
+ @ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
public void createUsersWithArrayInput(@Valid List body);
+
+
/**
* Creates list of users with given input array
*
- *
- *
+
*/
+
@POST
@Path("/user/createWithList")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
+
+ @Consumes({ "*/*" })
+
+
+ @ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
public void createUsersWithListInput(@Valid List body);
+
+
/**
* Delete user
*
+
* This can only be done by the logged in user.
*
+
*/
+
@DELETE
@Path("/user/{username}")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Delete user", tags={ "user", })
+
+
+ @ApiOperation(value = "Delete user", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied"),
@ApiResponse(code = 404, message = "User not found") })
public void deleteUser(@PathParam("username") String username);
+
+
/**
* Get user by user name
*
- *
- *
+
*/
+
@GET
@Path("/user/{username}")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Get user by user name", tags={ "user", })
+
+ @ApiOperation(value = "Get user by user name", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = User.class),
@ApiResponse(code = 400, message = "Invalid username supplied"),
@ApiResponse(code = 404, message = "User not found") })
public User getUserByName(@PathParam("username") String username);
+
+
/**
* Logs user into the system
*
- *
- *
+
*/
+
@GET
@Path("/user/login")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Logs user into the system", tags={ "user", })
+
+ @ApiOperation(value = "Logs user into the system", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class),
@ApiResponse(code = 400, message = "Invalid username/password supplied") })
public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password);
+
+
/**
* Logs out current logged in user session
*
- *
- *
+
*/
+
@GET
@Path("/user/logout")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Logs out current logged in user session", tags={ "user", })
+
+
+ @ApiOperation(value = "Logs out current logged in user session", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
public void logoutUser();
+
+
/**
* Updated user
*
+
* This can only be done by the logged in user.
*
+
*/
+
@PUT
@Path("/user/{username}")
- @Produces({ "application/xml", "application/json" })
+
+ @Consumes({ "*/*" })
+
+
@ApiOperation(value = "Updated user", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied"),
@ApiResponse(code = 404, message = "User not found") })
- public void updateUser(@PathParam("username") String username, @Valid User body);
+ public void updateUser(@Valid User user, @PathParam("username") String username);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java
index 9a1956aae8c..4e55dd2757e 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,26 +20,49 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* A category for a pet
**/
@ApiModel(description="A category for a pet")
+
public class Category {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String name = null;
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -41,16 +71,28 @@ public Category id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get name
+
+
+
* @return name
**/
@JsonProperty("name")
+
+
public String getName() {
return name;
}
+
public void setName(String name) {
this.name = name;
}
@@ -59,7 +101,11 @@ public Category name(String name) {
this.name = name;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -84,3 +130,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java
index 51ffbeff6da..d1071cd241b 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,28 +20,57 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* Describes the result of uploading an image resource
**/
@ApiModel(description="Describes the result of uploading an image resource")
+
public class ModelApiResponse {
+
@ApiModelProperty(value = "")
+
+
+
private Integer code = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String type = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String message = null;
+
+
/**
+
+
* Get code
+
+
+
* @return code
**/
@JsonProperty("code")
+
+
public Integer getCode() {
return code;
}
+
public void setCode(Integer code) {
this.code = code;
}
@@ -43,16 +79,28 @@ public ModelApiResponse code(Integer code) {
this.code = code;
return this;
}
+
+
+
+
/**
+
+
* Get type
+
+
+
* @return type
**/
@JsonProperty("type")
+
+
public String getType() {
return type;
}
+
public void setType(String type) {
this.type = type;
}
@@ -61,16 +109,28 @@ public ModelApiResponse type(String type) {
this.type = type;
return this;
}
+
+
+
+
/**
+
+
* Get message
+
+
+
* @return message
**/
@JsonProperty("message")
+
+
public String getMessage() {
return message;
}
+
public void setMessage(String message) {
this.message = message;
}
@@ -79,7 +139,11 @@ public ModelApiResponse message(String message) {
this.message = message;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -105,3 +169,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java
index dac33686761..86a6f175a37 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java
@@ -2,8 +2,15 @@
import io.swagger.annotations.ApiModel;
import java.util.Date;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -14,26 +21,55 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* An order for a pets from the pet store
**/
@ApiModel(description="An order for a pets from the pet store")
+
public class Order {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private Long petId = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private Integer quantity = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private Date shipDate = null;
+
+
@XmlType(name="StatusEnum")
@XmlEnum(String.class)
public enum StatusEnum {
+
@XmlEnumValue("placed") PLACED(String.valueOf("placed")), @XmlEnumValue("approved") APPROVED(String.valueOf("approved")), @XmlEnumValue("delivered") DELIVERED(String.valueOf("delivered"));
+
private String value;
@@ -61,23 +97,44 @@ public static StatusEnum fromValue(String v) {
}
}
+
@ApiModelProperty(value = "Order Status")
+
/**
* Order Status
**/
+
+
+
private StatusEnum status = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private Boolean complete = false;
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -86,16 +143,28 @@ public Order id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get petId
+
+
+
* @return petId
**/
@JsonProperty("petId")
+
+
public Long getPetId() {
return petId;
}
+
public void setPetId(Long petId) {
this.petId = petId;
}
@@ -104,16 +173,28 @@ public Order petId(Long petId) {
this.petId = petId;
return this;
}
+
+
+
+
/**
+
+
* Get quantity
+
+
+
* @return quantity
**/
@JsonProperty("quantity")
+
+
public Integer getQuantity() {
return quantity;
}
+
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
@@ -122,16 +203,28 @@ public Order quantity(Integer quantity) {
this.quantity = quantity;
return this;
}
+
+
+
+
/**
+
+
* Get shipDate
+
+
+
* @return shipDate
**/
@JsonProperty("shipDate")
+
+
public Date getShipDate() {
return shipDate;
}
+
public void setShipDate(Date shipDate) {
this.shipDate = shipDate;
}
@@ -140,12 +233,23 @@ public Order shipDate(Date shipDate) {
this.shipDate = shipDate;
return this;
}
+
+
+
+
/**
+
* Order Status
+
+
+
+
* @return status
**/
@JsonProperty("status")
+
+
public String getStatus() {
if (status == null) {
return null;
@@ -153,6 +257,7 @@ public String getStatus() {
return status.value();
}
+
public void setStatus(StatusEnum status) {
this.status = status;
}
@@ -161,16 +266,28 @@ public Order status(StatusEnum status) {
this.status = status;
return this;
}
+
+
+
+
/**
+
+
* Get complete
+
+
+
* @return complete
**/
@JsonProperty("complete")
- public Boolean isComplete() {
+
+
+ public Boolean isisComplete() {
return complete;
}
+
public void setComplete(Boolean complete) {
this.complete = complete;
}
@@ -179,7 +296,11 @@ public Order complete(Boolean complete) {
this.complete = complete;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -208,3 +329,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java
index 3c8ab5da478..20dde62cb84 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java
@@ -5,8 +5,15 @@
import io.swagger.model.Tag;
import java.util.ArrayList;
import java.util.List;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -17,28 +24,63 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* A pet for sale in the pet store
**/
@ApiModel(description="A pet for sale in the pet store")
+
public class Pet {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private Category category = null;
+
+
+
@ApiModelProperty(example = "doggie", required = true, value = "")
+
+
+
private String name = null;
+
+
+
@ApiModelProperty(required = true, value = "")
+
+
private List photoUrls = new ArrayList();
+
+
+
+
@ApiModelProperty(value = "")
- private List tags = new ArrayList();
+
+
+ private List tags = null;
+
+
+
@XmlType(name="StatusEnum")
@XmlEnum(String.class)
public enum StatusEnum {
+
@XmlEnumValue("available") AVAILABLE(String.valueOf("available")), @XmlEnumValue("pending") PENDING(String.valueOf("pending")), @XmlEnumValue("sold") SOLD(String.valueOf("sold"));
+
private String value;
@@ -66,21 +108,36 @@ public static StatusEnum fromValue(String v) {
}
}
+
@ApiModelProperty(value = "pet status in the store")
+
/**
* pet status in the store
**/
+
+
+
private StatusEnum status = null;
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -89,16 +146,28 @@ public Pet id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get category
+
+
+
* @return category
**/
@JsonProperty("category")
+
+
public Category getCategory() {
return category;
}
+
public void setCategory(Category category) {
this.category = category;
}
@@ -107,17 +176,30 @@ public Pet category(Category category) {
this.category = category;
return this;
}
+
+
+
+
/**
+
+
* Get name
+
+
+
* @return name
**/
@JsonProperty("name")
+
+
@NotNull
+
public String getName() {
return name;
}
+
public void setName(String name) {
this.name = name;
}
@@ -126,17 +208,30 @@ public Pet name(String name) {
this.name = name;
return this;
}
+
+
+
+
/**
+
+
* Get photoUrls
+
+
+
* @return photoUrls
**/
@JsonProperty("photoUrls")
+
+
@NotNull
+
public List getPhotoUrls() {
return photoUrls;
}
+
public void setPhotoUrls(List photoUrls) {
this.photoUrls = photoUrls;
}
@@ -145,21 +240,34 @@ public Pet photoUrls(List photoUrls) {
this.photoUrls = photoUrls;
return this;
}
+
public Pet addPhotoUrlsItem(String photoUrlsItem) {
this.photoUrls.add(photoUrlsItem);
return this;
}
+
+
+
+
/**
+
+
* Get tags
+
+
+
* @return tags
**/
@JsonProperty("tags")
+
+
public List getTags() {
return tags;
}
+
public void setTags(List tags) {
this.tags = tags;
}
@@ -168,17 +276,29 @@ public Pet tags(List tags) {
this.tags = tags;
return this;
}
+
public Pet addTagsItem(Tag tagsItem) {
this.tags.add(tagsItem);
return this;
}
+
+
+
+
/**
+
* pet status in the store
+
+
+
+
* @return status
**/
@JsonProperty("status")
+
+
public String getStatus() {
if (status == null) {
return null;
@@ -186,6 +306,7 @@ public String getStatus() {
return status.value();
}
+
public void setStatus(StatusEnum status) {
this.status = status;
}
@@ -194,7 +315,11 @@ public Pet status(StatusEnum status) {
this.status = status;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -223,3 +348,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java
index 24fd1d55d2a..4bc35fff324 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,26 +20,49 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* A tag for a pet
**/
@ApiModel(description="A tag for a pet")
+
public class Tag {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String name = null;
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -41,16 +71,28 @@ public Tag id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get name
+
+
+
* @return name
**/
@JsonProperty("name")
+
+
public String getName() {
return name;
}
+
public void setName(String name) {
this.name = name;
}
@@ -59,7 +101,11 @@ public Tag name(String name) {
this.name = name;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -84,3 +130,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java
index 858e8e14268..e4fda8362c6 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,41 +20,101 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* A User who is purchasing from the pet store
**/
@ApiModel(description="A User who is purchasing from the pet store")
+
public class User {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String username = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String firstName = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String lastName = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String email = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String password = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String phone = null;
+
+
+
@ApiModelProperty(value = "User Status")
+
/**
* User Status
**/
+
+
+
private Integer userStatus = null;
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -56,16 +123,28 @@ public User id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get username
+
+
+
* @return username
**/
@JsonProperty("username")
+
+
public String getUsername() {
return username;
}
+
public void setUsername(String username) {
this.username = username;
}
@@ -74,16 +153,28 @@ public User username(String username) {
this.username = username;
return this;
}
+
+
+
+
/**
+
+
* Get firstName
+
+
+
* @return firstName
**/
@JsonProperty("firstName")
+
+
public String getFirstName() {
return firstName;
}
+
public void setFirstName(String firstName) {
this.firstName = firstName;
}
@@ -92,16 +183,28 @@ public User firstName(String firstName) {
this.firstName = firstName;
return this;
}
+
+
+
+
/**
+
+
* Get lastName
+
+
+
* @return lastName
**/
@JsonProperty("lastName")
+
+
public String getLastName() {
return lastName;
}
+
public void setLastName(String lastName) {
this.lastName = lastName;
}
@@ -110,16 +213,28 @@ public User lastName(String lastName) {
this.lastName = lastName;
return this;
}
+
+
+
+
/**
+
+
* Get email
+
+
+
* @return email
**/
@JsonProperty("email")
+
+
public String getEmail() {
return email;
}
+
public void setEmail(String email) {
this.email = email;
}
@@ -128,16 +243,28 @@ public User email(String email) {
this.email = email;
return this;
}
+
+
+
+
/**
+
+
* Get password
+
+
+
* @return password
**/
@JsonProperty("password")
+
+
public String getPassword() {
return password;
}
+
public void setPassword(String password) {
this.password = password;
}
@@ -146,16 +273,28 @@ public User password(String password) {
this.password = password;
return this;
}
+
+
+
+
/**
+
+
* Get phone
+
+
+
* @return phone
**/
@JsonProperty("phone")
+
+
public String getPhone() {
return phone;
}
+
public void setPhone(String phone) {
this.phone = phone;
}
@@ -164,16 +303,28 @@ public User phone(String phone) {
this.phone = phone;
return this;
}
+
+
+
+
/**
+
* User Status
+
+
+
+
* @return userStatus
**/
@JsonProperty("userStatus")
+
+
public Integer getUserStatus() {
return userStatus;
}
+
public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}
@@ -182,7 +333,11 @@ public User userStatus(Integer userStatus) {
this.userStatus = userStatus;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -213,3 +368,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
index 0f19eb3098d..5326cc9006c 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
@@ -1,10 +1,10 @@
package io.swagger.api.impl;
import io.swagger.api.*;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -18,108 +18,143 @@
import io.swagger.annotations.Api;
+
+
+
+
/**
* Swagger Petstore
*
+
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
+
*
*/
+
public class PetApiServiceImpl implements PetApi {
+
+
+
/**
* Add a new pet to the store
*
- *
- *
+
*/
- public void addPet(Pet body) {
+
+ public void addPet(Pet pet) {
// TODO: Implement...
}
+
+
/**
* Deletes a pet
*
- *
- *
+
*/
- public void deletePet(Long petId, String apiKey) {
+
+ public void deletePet(Integer petId, String apiKey) {
// TODO: Implement...
}
+
+
/**
* Finds Pets by status
*
+
* Multiple status values can be provided with comma separated strings
*
+
*/
+
public List findPetsByStatus(List status) {
// TODO: Implement...
return null;
}
+
+
/**
* Finds Pets by tags
*
+
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
*
+
*/
+
public List findPetsByTags(List tags) {
// TODO: Implement...
return null;
}
+
+
/**
* Find pet by ID
*
+
* Returns a single pet
*
+
*/
- public Pet getPetById(Long petId) {
+
+ public Pet getPetById(Integer petId) {
// TODO: Implement...
return null;
}
+
+
/**
* Update an existing pet
*
- *
- *
+
*/
- public void updatePet(Pet body) {
+
+ public void updatePet(Pet pet) {
// TODO: Implement...
}
+
+
/**
* Updates a pet in the store with form data
*
- *
- *
+
*/
- public void updatePetWithForm(Long petId, String name, String status) {
+
+ public void updatePetWithForm(Integer petId, Object body) {
// TODO: Implement...
}
+
+
/**
* uploads an image
*
- *
- *
+
*/
- public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Attachment fileDetail) {
+
+ public ModelApiResponse uploadFile(Integer petId, Object body) {
// TODO: Implement...
return null;
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
index 9d3f93f8c3d..c3753800fbd 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
@@ -4,6 +4,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -17,60 +18,87 @@
import io.swagger.annotations.Api;
+
+
+
+
/**
* Swagger Petstore
*
+
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
+
*
*/
+
public class StoreApiServiceImpl implements StoreApi {
+
+
+
/**
* Delete purchase order by ID
*
+
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
*
+
*/
+
public void deleteOrder(String orderId) {
// TODO: Implement...
}
+
+
/**
* Returns pet inventories by status
*
+
* Returns a map of status codes to quantities
*
+
*/
+
public Map getInventory() {
// TODO: Implement...
return null;
}
+
+
/**
* Find purchase order by ID
*
+
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
*
+
*/
- public Order getOrderById(Long orderId) {
+
+ public Order getOrderById(Integer orderId) {
// TODO: Implement...
return null;
}
+
+
/**
* Place an order for a pet
*
- *
- *
+
*/
- public Order placeOrder(Order body) {
+
+ public Order placeOrder(Order order) {
// TODO: Implement...
return null;
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
index c569dbf5c15..cdb8e9ebea8 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
@@ -1,9 +1,9 @@
package io.swagger.api.impl;
import io.swagger.api.*;
-import java.util.List;
import io.swagger.model.User;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -17,108 +17,143 @@
import io.swagger.annotations.Api;
+
+
+
+
/**
* Swagger Petstore
*
+
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
+
*
*/
+
public class UserApiServiceImpl implements UserApi {
+
+
+
/**
* Create user
*
+
* This can only be done by the logged in user.
*
+
*/
- public void createUser(User body) {
+
+ public void createUser(User user) {
// TODO: Implement...
}
+
+
/**
* Creates list of users with given input array
*
- *
- *
+
*/
+
public void createUsersWithArrayInput(List body) {
// TODO: Implement...
}
+
+
/**
* Creates list of users with given input array
*
- *
- *
+
*/
+
public void createUsersWithListInput(List body) {
// TODO: Implement...
}
+
+
/**
* Delete user
*
+
* This can only be done by the logged in user.
*
+
*/
+
public void deleteUser(String username) {
// TODO: Implement...
}
+
+
/**
* Get user by user name
*
- *
- *
+
*/
+
public User getUserByName(String username) {
// TODO: Implement...
return null;
}
+
+
/**
* Logs user into the system
*
- *
- *
+
*/
+
public String loginUser(String username, String password) {
// TODO: Implement...
return null;
}
+
+
/**
* Logs out current logged in user session
*
- *
- *
+
*/
+
public void logoutUser() {
// TODO: Implement...
}
+
+
/**
* Updated user
*
+
* This can only be done by the logged in user.
*
+
*/
- public void updateUser(String username, User body) {
+
+ public void updateUser(User user, String username) {
// TODO: Implement...
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/PetApiTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/PetApiTest.java
index bbb67c24390..e07af12923c 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/PetApiTest.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/PetApiTest.java
@@ -25,9 +25,9 @@
package io.swagger.api;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@@ -38,8 +38,11 @@
import org.apache.cxf.jaxrs.client.WebClient;
+
+
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -48,11 +51,23 @@
+
+
/**
- * API tests for PetApi
+
+ * Swagger Petstore
+ *
+
+
+ * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
+ *
+
+ * API tests for PetApi
*/
+
public class PetApiTest {
+
private PetApi api;
@@ -62,25 +77,33 @@ public void setup() {
List providers = new ArrayList();
providers.add(provider);
+
+
api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", PetApi.class, providers);
+
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
ClientConfiguration config = WebClient.getConfig(client);
+
+
}
/**
+
* Add a new pet to the store
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void addPetTest() {
- Pet body = null;
- //api.addPet(body);
+
+ Pet pet = null;
+
+ //api.addPet(pet);
// TODO: test validations
@@ -88,18 +111,22 @@ public void addPetTest() {
}
/**
+
* Deletes a pet
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void deletePetTest() {
- Long petId = null;
+
+ Integer petId = null;
+
String apiKey = null;
- //api.deletePet(petId, apiKey);
+
+ //api.deletePet(petId, apiKey);
// TODO: test validations
@@ -107,17 +134,23 @@ public void deletePetTest() {
}
/**
+
* Finds Pets by status
*
+
* Multiple status values can be provided with comma separated strings
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void findPetsByStatusTest() {
+
List status = null;
- //List response = api.findPetsByStatus(status);
+
+ //List response = api.findPetsByStatus(status);
//assertNotNull(response);
// TODO: test validations
@@ -125,17 +158,23 @@ public void findPetsByStatusTest() {
}
/**
+
* Finds Pets by tags
*
+
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void findPetsByTagsTest() {
+
List tags = null;
- //List response = api.findPetsByTags(tags);
+
+ //List response = api.findPetsByTags(tags);
//assertNotNull(response);
// TODO: test validations
@@ -143,17 +182,23 @@ public void findPetsByTagsTest() {
}
/**
+
* Find pet by ID
*
+
* Returns a single pet
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void getPetByIdTest() {
- Long petId = null;
- //Pet response = api.getPetById(petId);
+
+ Integer petId = null;
+
+ //Pet response = api.getPetById(petId);
//assertNotNull(response);
// TODO: test validations
@@ -161,17 +206,20 @@ public void getPetByIdTest() {
}
/**
+
* Update an existing pet
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void updatePetTest() {
- Pet body = null;
- //api.updatePet(body);
+
+ Pet pet = null;
+
+ //api.updatePet(pet);
// TODO: test validations
@@ -179,19 +227,22 @@ public void updatePetTest() {
}
/**
+
* Updates a pet in the store with form data
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void updatePetWithFormTest() {
- Long petId = null;
- String name = null;
- String status = null;
- //api.updatePetWithForm(petId, name, status);
+
+ Integer petId = null;
+
+ Object body = null;
+
+ //api.updatePetWithForm(petId, body);
// TODO: test validations
@@ -199,19 +250,22 @@ public void updatePetWithFormTest() {
}
/**
+
* uploads an image
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void uploadFileTest() {
- Long petId = null;
- String additionalMetadata = null;
- org.apache.cxf.jaxrs.ext.multipart.Attachment file = null;
- //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
+
+ Integer petId = null;
+
+ Object body = null;
+
+ //ModelApiResponse response = api.uploadFile(petId, body);
//assertNotNull(response);
// TODO: test validations
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/StoreApiTest.java
index af89e255a9f..d4621c886ad 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/StoreApiTest.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/StoreApiTest.java
@@ -27,6 +27,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@@ -37,8 +38,11 @@
import org.apache.cxf.jaxrs.client.WebClient;
+
+
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -47,11 +51,23 @@
+
+
/**
- * API tests for StoreApi
+
+ * Swagger Petstore
+ *
+
+
+ * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
+ *
+
+ * API tests for StoreApi
*/
+
public class StoreApiTest {
+
private StoreApi api;
@@ -61,25 +77,36 @@ public void setup() {
List providers = new ArrayList();
providers.add(provider);
+
+
api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", StoreApi.class, providers);
+
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
ClientConfiguration config = WebClient.getConfig(client);
+
+
}
/**
+
* Delete purchase order by ID
*
+
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void deleteOrderTest() {
+
String orderId = null;
- //api.deleteOrder(orderId);
+
+ //api.deleteOrder(orderId);
// TODO: test validations
@@ -87,16 +114,21 @@ public void deleteOrderTest() {
}
/**
+
* Returns pet inventories by status
*
+
* Returns a map of status codes to quantities
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void getInventoryTest() {
- //Map response = api.getInventory();
+
+ //Map response = api.getInventory();
//assertNotNull(response);
// TODO: test validations
@@ -104,17 +136,23 @@ public void getInventoryTest() {
}
/**
+
* Find purchase order by ID
*
+
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void getOrderByIdTest() {
- Long orderId = null;
- //Order response = api.getOrderById(orderId);
+
+ Integer orderId = null;
+
+ //Order response = api.getOrderById(orderId);
//assertNotNull(response);
// TODO: test validations
@@ -122,17 +160,20 @@ public void getOrderByIdTest() {
}
/**
+
* Place an order for a pet
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void placeOrderTest() {
- Order body = null;
- //Order response = api.placeOrder(body);
+
+ Order order = null;
+
+ //Order response = api.placeOrder(order);
//assertNotNull(response);
// TODO: test validations
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/UserApiTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/UserApiTest.java
index f789f0fc936..f3794c02c30 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/UserApiTest.java
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/UserApiTest.java
@@ -25,8 +25,8 @@
package io.swagger.api;
-import java.util.List;
import io.swagger.model.User;
+
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@@ -37,8 +37,11 @@
import org.apache.cxf.jaxrs.client.WebClient;
+
+
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -47,11 +50,23 @@
+
+
/**
- * API tests for UserApi
+
+ * Swagger Petstore
+ *
+
+
+ * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
+ *
+
+ * API tests for UserApi
*/
+
public class UserApiTest {
+
private UserApi api;
@@ -61,25 +76,36 @@ public void setup() {
List providers = new ArrayList();
providers.add(provider);
+
+
api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", UserApi.class, providers);
+
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
ClientConfiguration config = WebClient.getConfig(client);
+
+
}
/**
+
* Create user
*
+
* This can only be done by the logged in user.
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void createUserTest() {
- User body = null;
- //api.createUser(body);
+
+ User user = null;
+
+ //api.createUser(user);
// TODO: test validations
@@ -87,17 +113,20 @@ public void createUserTest() {
}
/**
+
* Creates list of users with given input array
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void createUsersWithArrayInputTest() {
+
List body = null;
- //api.createUsersWithArrayInput(body);
+
+ //api.createUsersWithArrayInput(body);
// TODO: test validations
@@ -105,17 +134,20 @@ public void createUsersWithArrayInputTest() {
}
/**
+
* Creates list of users with given input array
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void createUsersWithListInputTest() {
+
List body = null;
- //api.createUsersWithListInput(body);
+
+ //api.createUsersWithListInput(body);
// TODO: test validations
@@ -123,17 +155,23 @@ public void createUsersWithListInputTest() {
}
/**
+
* Delete user
*
+
* This can only be done by the logged in user.
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void deleteUserTest() {
+
String username = null;
- //api.deleteUser(username);
+
+ //api.deleteUser(username);
// TODO: test validations
@@ -141,17 +179,20 @@ public void deleteUserTest() {
}
/**
+
* Get user by user name
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void getUserByNameTest() {
+
String username = null;
- //User response = api.getUserByName(username);
+
+ //User response = api.getUserByName(username);
//assertNotNull(response);
// TODO: test validations
@@ -159,18 +200,22 @@ public void getUserByNameTest() {
}
/**
+
* Logs user into the system
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void loginUserTest() {
+
String username = null;
+
String password = null;
- //String response = api.loginUser(username, password);
+
+ //String response = api.loginUser(username, password);
//assertNotNull(response);
// TODO: test validations
@@ -178,16 +223,18 @@ public void loginUserTest() {
}
/**
+
* Logs out current logged in user session
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void logoutUserTest() {
- //api.logoutUser();
+
+ //api.logoutUser();
// TODO: test validations
@@ -195,18 +242,25 @@ public void logoutUserTest() {
}
/**
+
* Updated user
*
+
* This can only be done by the logged in user.
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void updateUserTest() {
+
+ User user = null;
+
String username = null;
- User body = null;
- //api.updateUser(username, body);
+
+ //api.updateUser(user, username);
// TODO: test validations
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-cxf-cdi/.swagger-codegen/VERSION
index 50794f17f1a..096bf47efe3 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/.swagger-codegen/VERSION
+++ b/samples/server/petstore/jaxrs-cxf-cdi/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.3.1-SNAPSHOT
\ No newline at end of file
+3.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/pom.xml b/samples/server/petstore/jaxrs-cxf-cdi/pom.xml
index 94292deb437..fb513add6a4 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/pom.xml
+++ b/samples/server/petstore/jaxrs-cxf-cdi/pom.xml
@@ -77,6 +77,7 @@
[1.5.3,1.5.16]
+
javax.validation
@@ -85,6 +86,7 @@
provided
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/PetApi.java
index 791ba8bbd1b..842c25dbd5c 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/PetApi.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/PetApi.java
@@ -1,8 +1,8 @@
package io.swagger.api;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import io.swagger.api.PetApiService;
import javax.ws.rs.*;
@@ -20,7 +20,9 @@
import java.util.Map;
import java.util.List;
+
import javax.validation.constraints.*;
+
@Path("/pet")
@RequestScoped
@@ -36,65 +38,50 @@ public class PetApi {
@Inject PetApiService delegate;
+
+
@POST
@Consumes({ "application/json", "application/xml" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+
+ @ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
- public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body) {
- return delegate.addPet(body, securityContext);
+ public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet pet) {
+ return delegate.addPet(pet, securityContext);
}
+
@DELETE
@Path("/{petId}")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+
+ @ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
- public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId, @ApiParam(value = "" )@HeaderParam("api_key") String apiKey) {
+ public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Integer petId, @ApiParam(value = "" )@HeaderParam("api_key") String apiKey) {
return delegate.deletePet(petId, apiKey, securityContext);
}
+
@GET
@Path("/findByStatus")
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+ @ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid status value", response = Void.class) })
- public Response findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold") @QueryParam("status") List status) {
+ public Response findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="range=[-infinity, infinity]") @QueryParam("status") List status) {
return delegate.findPetsByStatus(status, securityContext);
}
+
@GET
@Path("/findByTags")
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+ @ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) })
@@ -102,68 +89,57 @@ public Response findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by",r
return delegate.findPetsByTags(tags, securityContext);
}
+
@GET
@Path("/{petId}")
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
- @Authorization(value = "api_key")
- }, tags={ "pet", })
+ @ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Pet not found", response = Void.class) })
- public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId) {
+ public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Integer petId) {
return delegate.getPetById(petId, securityContext);
}
+
@PUT
@Consumes({ "application/json", "application/xml" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+
+ @ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
- public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body) {
- return delegate.updatePet(body, securityContext);
+ public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet pet) {
+ return delegate.updatePet(pet, securityContext);
}
+
@POST
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+
+ @ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
- public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) {
- return delegate.updatePetWithForm(petId, name, status, securityContext);
+ public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Integer petId, @ApiParam(value = "" ) Object body) {
+ return delegate.updatePetWithForm(petId, body, securityContext);
}
+
@POST
@Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
- @ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet" })
+ @ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file", required = false) InputStream fileInputStream, @Multipart(value = "file" , required = false) Attachment fileDetail) {
- return delegate.uploadFile(petId, additionalMetadata, fileInputStream, fileDetail, securityContext);
+ public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Integer petId, @ApiParam(value = "" ) Object body) {
+ return delegate.uploadFile(petId, body, securityContext);
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/PetApiService.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/PetApiService.java
index ac8e4a52ff7..cc51a712fe5 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/PetApiService.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/PetApiService.java
@@ -6,10 +6,10 @@
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import java.util.List;
import java.io.InputStream;
@@ -18,13 +18,24 @@
import javax.ws.rs.core.SecurityContext;
+
public interface PetApiService {
- public Response addPet(Pet body, SecurityContext securityContext);
- public Response deletePet(Long petId, String apiKey, SecurityContext securityContext);
+
+ public Response addPet(Pet pet, SecurityContext securityContext);
+
+ public Response deletePet(Integer petId, String apiKey, SecurityContext securityContext);
+
public Response findPetsByStatus(List status, SecurityContext securityContext);
+
public Response findPetsByTags(List tags, SecurityContext securityContext);
- public Response getPetById(Long petId, SecurityContext securityContext);
- public Response updatePet(Pet body, SecurityContext securityContext);
- public Response updatePetWithForm(Long petId, String name, String status, SecurityContext securityContext);
- public Response uploadFile(Long petId, String additionalMetadata, InputStream fileInputStream, Attachment fileDetail, SecurityContext securityContext);
+
+ public Response getPetById(Integer petId, SecurityContext securityContext);
+
+ public Response updatePet(Pet pet, SecurityContext securityContext);
+
+ public Response updatePetWithForm(Integer petId, Object body, SecurityContext securityContext);
+
+ public Response uploadFile(Integer petId, Object body, SecurityContext securityContext);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/StoreApi.java
index f8bc97ba37d..93305c1b397 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/StoreApi.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/StoreApi.java
@@ -2,6 +2,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import io.swagger.api.StoreApiService;
import javax.ws.rs.*;
@@ -19,7 +20,9 @@
import java.util.Map;
import java.util.List;
+
import javax.validation.constraints.*;
+
@Path("/store")
@RequestScoped
@@ -35,11 +38,13 @@ public class StoreApi {
@Inject StoreApiService delegate;
+
+
@DELETE
@Path("/order/{orderId}")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store", })
+
+ @ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Order not found", response = Void.class) })
@@ -47,41 +52,44 @@ public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be
return delegate.deleteOrder(orderId, securityContext);
}
+
@GET
@Path("/inventory")
@Produces({ "application/json" })
- @ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
- @Authorization(value = "api_key")
- }, tags={ "store", })
+ @ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Response getInventory() {
return delegate.getInventory(securityContext);
}
+
@GET
@Path("/order/{orderId}")
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
+ @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Order not found", response = Void.class) })
- public Response getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId) {
+ public Response getOrderById( @DecimalMin("1") @DecimalMax("5")@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Integer orderId) {
return delegate.getOrderById(orderId, securityContext);
}
+
@POST
@Path("/order")
-
+ @Consumes({ "*/*" })
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
- public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body) {
- return delegate.placeOrder(body, securityContext);
+ public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order order) {
+ return delegate.placeOrder(order, securityContext);
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/StoreApiService.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/StoreApiService.java
index 45580cf4183..26606e3f246 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/StoreApiService.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/StoreApiService.java
@@ -9,6 +9,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import java.util.List;
import java.io.InputStream;
@@ -17,9 +18,16 @@
import javax.ws.rs.core.SecurityContext;
+
public interface StoreApiService {
+
public Response deleteOrder(String orderId, SecurityContext securityContext);
+
public Response getInventory(SecurityContext securityContext);
- public Response getOrderById(Long orderId, SecurityContext securityContext);
- public Response placeOrder(Order body, SecurityContext securityContext);
+
+ public Response getOrderById(Integer orderId, SecurityContext securityContext);
+
+ public Response placeOrder(Order order, SecurityContext securityContext);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/UserApi.java
index ff25df94fe7..e58a2395422 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/UserApi.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/UserApi.java
@@ -1,7 +1,7 @@
package io.swagger.api;
-import java.util.List;
import io.swagger.model.User;
+
import io.swagger.api.UserApiService;
import javax.ws.rs.*;
@@ -19,7 +19,9 @@
import java.util.Map;
import java.util.List;
+
import javax.validation.constraints.*;
+
@Path("/user")
@RequestScoped
@@ -35,44 +37,49 @@ public class UserApi {
@Inject UserApiService delegate;
+
+
@POST
+ @Consumes({ "*/*" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
+ @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
- public Response createUser(@ApiParam(value = "Created user object" ,required=true) User body) {
- return delegate.createUser(body, securityContext);
+ public Response createUser(@ApiParam(value = "Created user object" ,required=true) User user) {
+ return delegate.createUser(user, securityContext);
}
+
@POST
@Path("/createWithArray")
+ @Consumes({ "*/*" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
+ @ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List body) {
return delegate.createUsersWithArrayInput(body, securityContext);
}
+
@POST
@Path("/createWithList")
+ @Consumes({ "*/*" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
+ @ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List body) {
return delegate.createUsersWithListInput(body, securityContext);
}
+
@DELETE
@Path("/{username}")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
+
+ @ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
@@ -80,11 +87,12 @@ public Response deleteUser(@ApiParam(value = "The name that needs to be deleted"
return delegate.deleteUser(username, securityContext);
}
+
@GET
@Path("/{username}")
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
+ @ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = User.class),
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@@ -93,11 +101,12 @@ public Response getUserByName(@ApiParam(value = "The name that needs to be fetch
return delegate.getUserByName(username, securityContext);
}
+
@GET
@Path("/login")
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
+ @ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class),
@ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) })
@@ -105,26 +114,30 @@ public Response loginUser( @NotNull @ApiParam(value = "The user name for login",
return delegate.loginUser(username, password, securityContext);
}
+
@GET
@Path("/logout")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", })
+
+ @ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response logoutUser() {
return delegate.logoutUser(securityContext);
}
+
@PUT
@Path("/{username}")
+ @Consumes({ "*/*" })
- @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
- public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username, @ApiParam(value = "Updated user object" ,required=true) User body) {
- return delegate.updateUser(username, body, securityContext);
+ public Response updateUser(@ApiParam(value = "Updated user object" ,required=true) User user, @ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username) {
+ return delegate.updateUser(user, username, securityContext);
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/UserApiService.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/UserApiService.java
index ed05f0abe27..9ea52173e78 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/UserApiService.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/UserApiService.java
@@ -6,9 +6,9 @@
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
-import java.util.List;
import io.swagger.model.User;
+
import java.util.List;
import java.io.InputStream;
@@ -17,13 +17,24 @@
import javax.ws.rs.core.SecurityContext;
+
public interface UserApiService {
- public Response createUser(User body, SecurityContext securityContext);
+
+ public Response createUser(User user, SecurityContext securityContext);
+
public Response createUsersWithArrayInput(List body, SecurityContext securityContext);
+
public Response createUsersWithListInput(List body, SecurityContext securityContext);
+
public Response deleteUser(String username, SecurityContext securityContext);
+
public Response getUserByName(String username, SecurityContext securityContext);
+
public Response loginUser(String username, String password, SecurityContext securityContext);
+
public Response logoutUser(SecurityContext securityContext);
- public Response updateUser(String username, User body, SecurityContext securityContext);
+
+ public Response updateUser(User user, String username, SecurityContext securityContext);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Category.java
index 92a3fc286e3..367cecd8aaa 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Category.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Category.java
@@ -3,8 +3,12 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
/**
* A category for a pet
**/
@@ -21,7 +25,11 @@ public class Category {
private Long id = null;
private String name = null;
+
/**
+
+
+
**/
public Category id(Long id) {
this.id = id;
@@ -31,6 +39,7 @@ public Category id(Long id) {
@ApiModelProperty(value = "")
@JsonProperty("id")
+
public Long getId() {
return id;
}
@@ -38,7 +47,11 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
public Category name(String name) {
this.name = name;
@@ -48,6 +61,7 @@ public Category name(String name) {
@ApiModelProperty(value = "")
@JsonProperty("name")
+
public String getName() {
return name;
}
@@ -55,6 +69,7 @@ public void setName(String name) {
this.name = name;
}
+
@Override
public boolean equals(java.lang.Object o) {
@@ -97,3 +112,5 @@ private String toIndentedString(java.lang.Object o) {
}
}
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/ModelApiResponse.java
index becb77ed19e..c935cd8afc2 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/ModelApiResponse.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/ModelApiResponse.java
@@ -3,8 +3,12 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
/**
* Describes the result of uploading an image resource
**/
@@ -22,7 +26,11 @@ public class ModelApiResponse {
private String type = null;
private String message = null;
+
/**
+
+
+
**/
public ModelApiResponse code(Integer code) {
this.code = code;
@@ -32,6 +40,7 @@ public ModelApiResponse code(Integer code) {
@ApiModelProperty(value = "")
@JsonProperty("code")
+
public Integer getCode() {
return code;
}
@@ -39,7 +48,11 @@ public void setCode(Integer code) {
this.code = code;
}
+
/**
+
+
+
**/
public ModelApiResponse type(String type) {
this.type = type;
@@ -49,6 +62,7 @@ public ModelApiResponse type(String type) {
@ApiModelProperty(value = "")
@JsonProperty("type")
+
public String getType() {
return type;
}
@@ -56,7 +70,11 @@ public void setType(String type) {
this.type = type;
}
+
/**
+
+
+
**/
public ModelApiResponse message(String message) {
this.message = message;
@@ -66,6 +84,7 @@ public ModelApiResponse message(String message) {
@ApiModelProperty(value = "")
@JsonProperty("message")
+
public String getMessage() {
return message;
}
@@ -73,6 +92,7 @@ public void setMessage(String message) {
this.message = message;
}
+
@Override
public boolean equals(java.lang.Object o) {
@@ -117,3 +137,5 @@ private String toIndentedString(java.lang.Object o) {
}
}
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Order.java
index e5e8aacb1a5..cb74ed4099c 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Order.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Order.java
@@ -3,8 +3,12 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
/**
* An order for a pets from the pet store
**/
@@ -27,7 +31,9 @@ public class Order {
@XmlEnum(String.class)
public enum StatusEnum {
+
@XmlEnumValue("placed") PLACED(String.valueOf("placed")), @XmlEnumValue("approved") APPROVED(String.valueOf("approved")), @XmlEnumValue("delivered") DELIVERED(String.valueOf("delivered"));
+
private String value;
@@ -58,7 +64,11 @@ public static StatusEnum fromValue(String v) {
private StatusEnum status = null;
private Boolean complete = false;
+
/**
+
+
+
**/
public Order id(Long id) {
this.id = id;
@@ -68,6 +78,7 @@ public Order id(Long id) {
@ApiModelProperty(value = "")
@JsonProperty("id")
+
public Long getId() {
return id;
}
@@ -75,7 +86,11 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
public Order petId(Long petId) {
this.petId = petId;
@@ -85,6 +100,7 @@ public Order petId(Long petId) {
@ApiModelProperty(value = "")
@JsonProperty("petId")
+
public Long getPetId() {
return petId;
}
@@ -92,7 +108,11 @@ public void setPetId(Long petId) {
this.petId = petId;
}
+
/**
+
+
+
**/
public Order quantity(Integer quantity) {
this.quantity = quantity;
@@ -102,6 +122,7 @@ public Order quantity(Integer quantity) {
@ApiModelProperty(value = "")
@JsonProperty("quantity")
+
public Integer getQuantity() {
return quantity;
}
@@ -109,7 +130,11 @@ public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
+
/**
+
+
+
**/
public Order shipDate(java.util.Date shipDate) {
this.shipDate = shipDate;
@@ -119,6 +144,7 @@ public Order shipDate(java.util.Date shipDate) {
@ApiModelProperty(value = "")
@JsonProperty("shipDate")
+
public java.util.Date getShipDate() {
return shipDate;
}
@@ -126,8 +152,13 @@ public void setShipDate(java.util.Date shipDate) {
this.shipDate = shipDate;
}
+
/**
+
* Order Status
+
+
+
**/
public Order status(StatusEnum status) {
this.status = status;
@@ -137,6 +168,7 @@ public Order status(StatusEnum status) {
@ApiModelProperty(value = "Order Status")
@JsonProperty("status")
+
public StatusEnum getStatus() {
return status;
}
@@ -144,7 +176,11 @@ public void setStatus(StatusEnum status) {
this.status = status;
}
+
/**
+
+
+
**/
public Order complete(Boolean complete) {
this.complete = complete;
@@ -154,13 +190,15 @@ public Order complete(Boolean complete) {
@ApiModelProperty(value = "")
@JsonProperty("complete")
- public Boolean isComplete() {
+
+ public Boolean isisComplete() {
return complete;
}
public void setComplete(Boolean complete) {
this.complete = complete;
}
+
@Override
public boolean equals(java.lang.Object o) {
@@ -211,3 +249,5 @@ private String toIndentedString(java.lang.Object o) {
}
}
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Pet.java
index c8868b563d0..10373b73fd7 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Pet.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Pet.java
@@ -7,8 +7,12 @@
import io.swagger.model.Tag;
import java.util.ArrayList;
import java.util.List;
+
+
import javax.validation.constraints.*;
+
+
/**
* A pet for sale in the pet store
**/
@@ -32,7 +36,9 @@ public class Pet {
@XmlEnum(String.class)
public enum StatusEnum {
+
@XmlEnumValue("available") AVAILABLE(String.valueOf("available")), @XmlEnumValue("pending") PENDING(String.valueOf("pending")), @XmlEnumValue("sold") SOLD(String.valueOf("sold"));
+
private String value;
@@ -62,7 +68,11 @@ public static StatusEnum fromValue(String v) {
private StatusEnum status = null;
+
/**
+
+
+
**/
public Pet id(Long id) {
this.id = id;
@@ -72,6 +82,7 @@ public Pet id(Long id) {
@ApiModelProperty(value = "")
@JsonProperty("id")
+
public Long getId() {
return id;
}
@@ -79,7 +90,11 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
public Pet category(Category category) {
this.category = category;
@@ -89,6 +104,7 @@ public Pet category(Category category) {
@ApiModelProperty(value = "")
@JsonProperty("category")
+
public Category getCategory() {
return category;
}
@@ -96,7 +112,11 @@ public void setCategory(Category category) {
this.category = category;
}
+
/**
+
+
+
**/
public Pet name(String name) {
this.name = name;
@@ -106,7 +126,9 @@ public Pet name(String name) {
@ApiModelProperty(example = "doggie", required = true, value = "")
@JsonProperty("name")
+
@NotNull
+
public String getName() {
return name;
}
@@ -114,7 +136,11 @@ public void setName(String name) {
this.name = name;
}
+
/**
+
+
+
**/
public Pet photoUrls(List photoUrls) {
this.photoUrls = photoUrls;
@@ -124,7 +150,9 @@ public Pet photoUrls(List photoUrls) {
@ApiModelProperty(required = true, value = "")
@JsonProperty("photoUrls")
+
@NotNull
+
public List getPhotoUrls() {
return photoUrls;
}
@@ -132,7 +160,11 @@ public void setPhotoUrls(List photoUrls) {
this.photoUrls = photoUrls;
}
+
/**
+
+
+
**/
public Pet tags(List tags) {
this.tags = tags;
@@ -142,6 +174,7 @@ public Pet tags(List tags) {
@ApiModelProperty(value = "")
@JsonProperty("tags")
+
public List getTags() {
return tags;
}
@@ -149,8 +182,13 @@ public void setTags(List tags) {
this.tags = tags;
}
+
/**
+
* pet status in the store
+
+
+
**/
public Pet status(StatusEnum status) {
this.status = status;
@@ -160,6 +198,7 @@ public Pet status(StatusEnum status) {
@ApiModelProperty(value = "pet status in the store")
@JsonProperty("status")
+
public StatusEnum getStatus() {
return status;
}
@@ -167,6 +206,7 @@ public void setStatus(StatusEnum status) {
this.status = status;
}
+
@Override
public boolean equals(java.lang.Object o) {
@@ -217,3 +257,5 @@ private String toIndentedString(java.lang.Object o) {
}
}
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Tag.java
index 42f36861a08..32f4872bc3f 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Tag.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Tag.java
@@ -3,8 +3,12 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
/**
* A tag for a pet
**/
@@ -21,7 +25,11 @@ public class Tag {
private Long id = null;
private String name = null;
+
/**
+
+
+
**/
public Tag id(Long id) {
this.id = id;
@@ -31,6 +39,7 @@ public Tag id(Long id) {
@ApiModelProperty(value = "")
@JsonProperty("id")
+
public Long getId() {
return id;
}
@@ -38,7 +47,11 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
public Tag name(String name) {
this.name = name;
@@ -48,6 +61,7 @@ public Tag name(String name) {
@ApiModelProperty(value = "")
@JsonProperty("name")
+
public String getName() {
return name;
}
@@ -55,6 +69,7 @@ public void setName(String name) {
this.name = name;
}
+
@Override
public boolean equals(java.lang.Object o) {
@@ -97,3 +112,5 @@ private String toIndentedString(java.lang.Object o) {
}
}
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/User.java
index e8cfc7d6b1d..ae17371b632 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/User.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/User.java
@@ -3,8 +3,12 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
/**
* A User who is purchasing from the pet store
**/
@@ -27,7 +31,11 @@ public class User {
private String phone = null;
private Integer userStatus = null;
+
/**
+
+
+
**/
public User id(Long id) {
this.id = id;
@@ -37,6 +45,7 @@ public User id(Long id) {
@ApiModelProperty(value = "")
@JsonProperty("id")
+
public Long getId() {
return id;
}
@@ -44,7 +53,11 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
public User username(String username) {
this.username = username;
@@ -54,6 +67,7 @@ public User username(String username) {
@ApiModelProperty(value = "")
@JsonProperty("username")
+
public String getUsername() {
return username;
}
@@ -61,7 +75,11 @@ public void setUsername(String username) {
this.username = username;
}
+
/**
+
+
+
**/
public User firstName(String firstName) {
this.firstName = firstName;
@@ -71,6 +89,7 @@ public User firstName(String firstName) {
@ApiModelProperty(value = "")
@JsonProperty("firstName")
+
public String getFirstName() {
return firstName;
}
@@ -78,7 +97,11 @@ public void setFirstName(String firstName) {
this.firstName = firstName;
}
+
/**
+
+
+
**/
public User lastName(String lastName) {
this.lastName = lastName;
@@ -88,6 +111,7 @@ public User lastName(String lastName) {
@ApiModelProperty(value = "")
@JsonProperty("lastName")
+
public String getLastName() {
return lastName;
}
@@ -95,7 +119,11 @@ public void setLastName(String lastName) {
this.lastName = lastName;
}
+
/**
+
+
+
**/
public User email(String email) {
this.email = email;
@@ -105,6 +133,7 @@ public User email(String email) {
@ApiModelProperty(value = "")
@JsonProperty("email")
+
public String getEmail() {
return email;
}
@@ -112,7 +141,11 @@ public void setEmail(String email) {
this.email = email;
}
+
/**
+
+
+
**/
public User password(String password) {
this.password = password;
@@ -122,6 +155,7 @@ public User password(String password) {
@ApiModelProperty(value = "")
@JsonProperty("password")
+
public String getPassword() {
return password;
}
@@ -129,7 +163,11 @@ public void setPassword(String password) {
this.password = password;
}
+
/**
+
+
+
**/
public User phone(String phone) {
this.phone = phone;
@@ -139,6 +177,7 @@ public User phone(String phone) {
@ApiModelProperty(value = "")
@JsonProperty("phone")
+
public String getPhone() {
return phone;
}
@@ -146,8 +185,13 @@ public void setPhone(String phone) {
this.phone = phone;
}
+
/**
+
* User Status
+
+
+
**/
public User userStatus(Integer userStatus) {
this.userStatus = userStatus;
@@ -157,6 +201,7 @@ public User userStatus(Integer userStatus) {
@ApiModelProperty(value = "User Status")
@JsonProperty("userStatus")
+
public Integer getUserStatus() {
return userStatus;
}
@@ -164,6 +209,7 @@ public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}
+
@Override
public boolean equals(java.lang.Object o) {
@@ -218,3 +264,5 @@ private String toIndentedString(java.lang.Object o) {
}
}
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/RestApplication.java b/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/RestApplication.java
index 3b43beeb9be..1ae54938776 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/RestApplication.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/RestApplication.java
@@ -1,9 +1,9 @@
-package io.swagger.api;
-
-import javax.ws.rs.ApplicationPath;
-import javax.ws.rs.core.Application;
-
-@ApplicationPath("/")
-public class RestApplication extends Application {
- // Add implementation-specific details here
+package io.swagger.api;
+
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+
+@ApplicationPath("/")
+public class RestApplication extends Application {
+ // Add implementation-specific details here
}
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
index c56aee7e580..6c7a4056651 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
@@ -5,10 +5,10 @@
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import java.util.List;
import java.io.InputStream;
@@ -19,45 +19,56 @@
@RequestScoped
+
public class PetApiServiceImpl implements PetApiService {
+
@Override
- public Response addPet(Pet body, SecurityContext securityContext) {
+ public Response addPet(Pet pet, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
- public Response deletePet(Long petId, String apiKey, SecurityContext securityContext) {
+ public Response deletePet(Integer petId, String apiKey, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
public Response findPetsByStatus(List status, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
public Response findPetsByTags(List tags, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
- public Response getPetById(Long petId, SecurityContext securityContext) {
+ public Response getPetById(Integer petId, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
- public Response updatePet(Pet body, SecurityContext securityContext) {
+ public Response updatePet(Pet pet, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
- public Response updatePetWithForm(Long petId, String name, String status, SecurityContext securityContext) {
+ public Response updatePetWithForm(Integer petId, Object body, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
- public Response uploadFile(Long petId, String additionalMetadata, InputStream fileInputStream, Attachment fileDetail, SecurityContext securityContext) {
+ public Response uploadFile(Integer petId, Object body, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
index 50bd4b8501b..3c01ab32c06 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
@@ -8,6 +8,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import java.util.List;
import java.io.InputStream;
@@ -18,25 +19,32 @@
@RequestScoped
+
public class StoreApiServiceImpl implements StoreApiService {
+
@Override
public Response deleteOrder(String orderId, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
public Response getInventory(SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
- public Response getOrderById(Long orderId, SecurityContext securityContext) {
+ public Response getOrderById(Integer orderId, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
- public Response placeOrder(Order body, SecurityContext securityContext) {
+ public Response placeOrder(Order order, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
index 2870f45fb4c..25118746595 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
@@ -5,9 +5,9 @@
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
-import java.util.List;
import io.swagger.model.User;
+
import java.util.List;
import java.io.InputStream;
@@ -18,45 +18,56 @@
@RequestScoped
+
public class UserApiServiceImpl implements UserApiService {
+
@Override
- public Response createUser(User body, SecurityContext securityContext) {
+ public Response createUser(User user, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
public Response createUsersWithArrayInput(List body, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
public Response createUsersWithListInput(List body, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
public Response deleteUser(String username, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
public Response getUserByName(String username, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
public Response loginUser(String username, String password, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
public Response logoutUser(SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
@Override
- public Response updateUser(String username, User body, SecurityContext securityContext) {
+ public Response updateUser(User user, String username, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/main/webapp/WEB-INF/beans.xml b/samples/server/petstore/jaxrs-cxf-cdi/src/main/webapp/WEB-INF/beans.xml
index f9f7d3d948b..cb6d500d43f 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/src/main/webapp/WEB-INF/beans.xml
+++ b/samples/server/petstore/jaxrs-cxf-cdi/src/main/webapp/WEB-INF/beans.xml
@@ -1,13 +1,13 @@
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/swagger.json b/samples/server/petstore/jaxrs-cxf-cdi/swagger.json
index 388bfca1154..a008660cc4e 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/swagger.json
+++ b/samples/server/petstore/jaxrs-cxf-cdi/swagger.json
@@ -1,9 +1,8 @@
{
- "swagger" : "2.0",
+ "openapi" : "3.0.1",
"info" : {
- "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
- "version" : "1.0.0",
"title" : "Swagger Petstore",
+ "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
"termsOfService" : "http://swagger.io/terms/",
"contact" : {
"email" : "apiteam@swagger.io"
@@ -11,10 +10,16 @@
"license" : {
"name" : "Apache-2.0",
"url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
- }
+ },
+ "version" : "1.0.0"
},
- "host" : "petstore.swagger.io",
- "basePath" : "/v2",
+ "externalDocs" : {
+ "description" : "Find out more about Swagger",
+ "url" : "http://swagger.io"
+ },
+ "servers" : [ {
+ "url" : "http://petstore.swagger.io/v2"
+ } ],
"tags" : [ {
"name" : "pet",
"description" : "Everything about your Pets",
@@ -33,59 +38,70 @@
"url" : "http://swagger.io"
}
} ],
- "schemes" : [ "http" ],
"paths" : {
"/pet" : {
- "post" : {
+ "put" : {
"tags" : [ "pet" ],
- "summary" : "Add a new pet to the store",
- "description" : "",
- "operationId" : "addPet",
- "consumes" : [ "application/json", "application/xml" ],
- "produces" : [ "application/xml", "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "body",
+ "summary" : "Update an existing pet",
+ "operationId" : "updatePet",
+ "requestBody" : {
"description" : "Pet object that needs to be added to the store",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/Pet"
- }
- } ],
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Pet"
+ }
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Pet"
+ }
+ }
+ },
+ "required" : true
+ },
"responses" : {
+ "400" : {
+ "description" : "Invalid ID supplied",
+ "content" : { }
+ },
+ "404" : {
+ "description" : "Pet not found",
+ "content" : { }
+ },
"405" : {
- "description" : "Invalid input"
+ "description" : "Validation exception",
+ "content" : { }
}
},
"security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ]
} ]
},
- "put" : {
+ "post" : {
"tags" : [ "pet" ],
- "summary" : "Update an existing pet",
- "description" : "",
- "operationId" : "updatePet",
- "consumes" : [ "application/json", "application/xml" ],
- "produces" : [ "application/xml", "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "body",
+ "summary" : "Add a new pet to the store",
+ "operationId" : "addPet",
+ "requestBody" : {
"description" : "Pet object that needs to be added to the store",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/Pet"
- }
- } ],
- "responses" : {
- "400" : {
- "description" : "Invalid ID supplied"
- },
- "404" : {
- "description" : "Pet not found"
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Pet"
+ }
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Pet"
+ }
+ }
},
+ "required" : true
+ },
+ "responses" : {
"405" : {
- "description" : "Validation exception"
+ "description" : "Invalid input",
+ "content" : { }
}
},
"security" : [ {
@@ -99,32 +115,46 @@
"summary" : "Finds Pets by status",
"description" : "Multiple status values can be provided with comma separated strings",
"operationId" : "findPetsByStatus",
- "produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "status",
"in" : "query",
"description" : "Status values that need to be considered for filter",
"required" : true,
- "type" : "array",
- "items" : {
- "type" : "string",
- "default" : "available",
- "enum" : [ "available", "pending", "sold" ]
- },
- "collectionFormat" : "csv"
+ "explode" : false,
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "default" : "available",
+ "enum" : [ "available", "pending", "sold" ]
+ }
+ }
} ],
"responses" : {
"200" : {
"description" : "successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/Pet"
+ "content" : {
+ "application/xml" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/Pet"
+ }
+ }
+ },
+ "application/json" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/Pet"
+ }
+ }
}
}
},
"400" : {
- "description" : "Invalid status value"
+ "description" : "Invalid status value",
+ "content" : { }
}
},
"security" : [ {
@@ -138,36 +168,50 @@
"summary" : "Finds Pets by tags",
"description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
"operationId" : "findPetsByTags",
- "produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "tags",
"in" : "query",
"description" : "Tags to filter by",
"required" : true,
- "type" : "array",
- "items" : {
- "type" : "string"
- },
- "collectionFormat" : "csv"
+ "explode" : false,
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }
} ],
"responses" : {
"200" : {
"description" : "successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/Pet"
+ "content" : {
+ "application/xml" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/Pet"
+ }
+ }
+ },
+ "application/json" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/Pet"
+ }
+ }
}
}
},
"400" : {
- "description" : "Invalid tag value"
+ "description" : "Invalid tag value",
+ "content" : { }
}
},
+ "deprecated" : true,
"security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ]
- } ],
- "deprecated" : true
+ } ]
}
},
"/pet/{petId}" : {
@@ -176,27 +220,39 @@
"summary" : "Find pet by ID",
"description" : "Returns a single pet",
"operationId" : "getPetById",
- "produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "petId",
"in" : "path",
"description" : "ID of pet to return",
"required" : true,
- "type" : "integer",
- "format" : "int64"
+ "schema" : {
+ "type" : "integer",
+ "format" : "int64"
+ }
} ],
"responses" : {
"200" : {
"description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/Pet"
+ "content" : {
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Pet"
+ }
+ },
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Pet"
+ }
+ }
}
},
"400" : {
- "description" : "Invalid ID supplied"
+ "description" : "Invalid ID supplied",
+ "content" : { }
},
"404" : {
- "description" : "Pet not found"
+ "description" : "Pet not found",
+ "content" : { }
}
},
"security" : [ {
@@ -206,33 +262,39 @@
"post" : {
"tags" : [ "pet" ],
"summary" : "Updates a pet in the store with form data",
- "description" : "",
"operationId" : "updatePetWithForm",
- "consumes" : [ "application/x-www-form-urlencoded" ],
- "produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "petId",
"in" : "path",
"description" : "ID of pet that needs to be updated",
"required" : true,
- "type" : "integer",
- "format" : "int64"
- }, {
- "name" : "name",
- "in" : "formData",
- "description" : "Updated name of the pet",
- "required" : false,
- "type" : "string"
- }, {
- "name" : "status",
- "in" : "formData",
- "description" : "Updated status of the pet",
- "required" : false,
- "type" : "string"
+ "schema" : {
+ "type" : "integer",
+ "format" : "int64"
+ }
} ],
+ "requestBody" : {
+ "content" : {
+ "application/x-www-form-urlencoded" : {
+ "schema" : {
+ "properties" : {
+ "name" : {
+ "type" : "string",
+ "description" : "Updated name of the pet"
+ },
+ "status" : {
+ "type" : "string",
+ "description" : "Updated status of the pet"
+ }
+ }
+ }
+ }
+ }
+ },
"responses" : {
"405" : {
- "description" : "Invalid input"
+ "description" : "Invalid input",
+ "content" : { }
}
},
"security" : [ {
@@ -242,25 +304,27 @@
"delete" : {
"tags" : [ "pet" ],
"summary" : "Deletes a pet",
- "description" : "",
"operationId" : "deletePet",
- "produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "api_key",
"in" : "header",
- "required" : false,
- "type" : "string"
+ "schema" : {
+ "type" : "string"
+ }
}, {
"name" : "petId",
"in" : "path",
"description" : "Pet id to delete",
"required" : true,
- "type" : "integer",
- "format" : "int64"
+ "schema" : {
+ "type" : "integer",
+ "format" : "int64"
+ }
} ],
"responses" : {
"400" : {
- "description" : "Invalid pet value"
+ "description" : "Invalid pet value",
+ "content" : { }
}
},
"security" : [ {
@@ -272,35 +336,45 @@
"post" : {
"tags" : [ "pet" ],
"summary" : "uploads an image",
- "description" : "",
"operationId" : "uploadFile",
- "consumes" : [ "multipart/form-data" ],
- "produces" : [ "application/json" ],
"parameters" : [ {
"name" : "petId",
"in" : "path",
"description" : "ID of pet to update",
"required" : true,
- "type" : "integer",
- "format" : "int64"
- }, {
- "name" : "additionalMetadata",
- "in" : "formData",
- "description" : "Additional data to pass to server",
- "required" : false,
- "type" : "string"
- }, {
- "name" : "file",
- "in" : "formData",
- "description" : "file to upload",
- "required" : false,
- "type" : "file"
+ "schema" : {
+ "type" : "integer",
+ "format" : "int64"
+ }
} ],
+ "requestBody" : {
+ "content" : {
+ "multipart/form-data" : {
+ "schema" : {
+ "properties" : {
+ "additionalMetadata" : {
+ "type" : "string",
+ "description" : "Additional data to pass to server"
+ },
+ "file" : {
+ "type" : "string",
+ "description" : "file to upload",
+ "format" : "binary"
+ }
+ }
+ }
+ }
+ }
+ },
"responses" : {
"200" : {
"description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/ApiResponse"
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/ApiResponse"
+ }
+ }
}
}
},
@@ -315,16 +389,18 @@
"summary" : "Returns pet inventories by status",
"description" : "Returns a map of status codes to quantities",
"operationId" : "getInventory",
- "produces" : [ "application/json" ],
- "parameters" : [ ],
"responses" : {
"200" : {
"description" : "successful operation",
- "schema" : {
- "type" : "object",
- "additionalProperties" : {
- "type" : "integer",
- "format" : "int32"
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "integer",
+ "format" : "int32"
+ }
+ }
}
}
}
@@ -338,27 +414,37 @@
"post" : {
"tags" : [ "store" ],
"summary" : "Place an order for a pet",
- "description" : "",
"operationId" : "placeOrder",
- "produces" : [ "application/xml", "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "body",
+ "requestBody" : {
"description" : "order placed for purchasing the pet",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/Order"
- }
- } ],
+ "content" : {
+ "*/*" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Order"
+ }
+ }
+ },
+ "required" : true
+ },
"responses" : {
"200" : {
"description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/Order"
+ "content" : {
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Order"
+ }
+ },
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Order"
+ }
+ }
}
},
"400" : {
- "description" : "Invalid Order"
+ "description" : "Invalid Order",
+ "content" : { }
}
}
}
@@ -369,29 +455,41 @@
"summary" : "Find purchase order by ID",
"description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions",
"operationId" : "getOrderById",
- "produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "orderId",
"in" : "path",
"description" : "ID of pet that needs to be fetched",
"required" : true,
- "type" : "integer",
- "maximum" : 5,
- "minimum" : 1,
- "format" : "int64"
+ "schema" : {
+ "maximum" : 5,
+ "minimum" : 1,
+ "type" : "integer",
+ "format" : "int64"
+ }
} ],
"responses" : {
"200" : {
"description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/Order"
+ "content" : {
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Order"
+ }
+ },
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Order"
+ }
+ }
}
},
"400" : {
- "description" : "Invalid ID supplied"
+ "description" : "Invalid ID supplied",
+ "content" : { }
},
"404" : {
- "description" : "Order not found"
+ "description" : "Order not found",
+ "content" : { }
}
}
},
@@ -400,20 +498,23 @@
"summary" : "Delete purchase order by ID",
"description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",
"operationId" : "deleteOrder",
- "produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "orderId",
"in" : "path",
"description" : "ID of the order that needs to be deleted",
"required" : true,
- "type" : "string"
+ "schema" : {
+ "type" : "string"
+ }
} ],
"responses" : {
"400" : {
- "description" : "Invalid ID supplied"
+ "description" : "Invalid ID supplied",
+ "content" : { }
},
"404" : {
- "description" : "Order not found"
+ "description" : "Order not found",
+ "content" : { }
}
}
}
@@ -424,19 +525,21 @@
"summary" : "Create user",
"description" : "This can only be done by the logged in user.",
"operationId" : "createUser",
- "produces" : [ "application/xml", "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "body",
+ "requestBody" : {
"description" : "Created user object",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/User"
- }
- } ],
+ "content" : {
+ "*/*" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/User"
+ }
+ }
+ },
+ "required" : true
+ },
"responses" : {
"default" : {
- "description" : "successful operation"
+ "description" : "successful operation",
+ "content" : { }
}
}
}
@@ -445,24 +548,25 @@
"post" : {
"tags" : [ "user" ],
"summary" : "Creates list of users with given input array",
- "description" : "",
"operationId" : "createUsersWithArrayInput",
- "produces" : [ "application/xml", "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "body",
+ "requestBody" : {
"description" : "List of user object",
- "required" : true,
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/User"
+ "content" : {
+ "*/*" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/User"
+ }
+ }
}
- }
- } ],
+ },
+ "required" : true
+ },
"responses" : {
"default" : {
- "description" : "successful operation"
+ "description" : "successful operation",
+ "content" : { }
}
}
}
@@ -471,24 +575,25 @@
"post" : {
"tags" : [ "user" ],
"summary" : "Creates list of users with given input array",
- "description" : "",
"operationId" : "createUsersWithListInput",
- "produces" : [ "application/xml", "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "body",
+ "requestBody" : {
"description" : "List of user object",
- "required" : true,
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/User"
+ "content" : {
+ "*/*" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/User"
+ }
+ }
}
- }
- } ],
+ },
+ "required" : true
+ },
"responses" : {
"default" : {
- "description" : "successful operation"
+ "description" : "successful operation",
+ "content" : { }
}
}
}
@@ -497,43 +602,59 @@
"get" : {
"tags" : [ "user" ],
"summary" : "Logs user into the system",
- "description" : "",
"operationId" : "loginUser",
- "produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "username",
"in" : "query",
"description" : "The user name for login",
"required" : true,
- "type" : "string"
+ "schema" : {
+ "type" : "string"
+ }
}, {
"name" : "password",
"in" : "query",
"description" : "The password for login in clear text",
"required" : true,
- "type" : "string"
+ "schema" : {
+ "type" : "string"
+ }
} ],
"responses" : {
"200" : {
"description" : "successful operation",
- "schema" : {
- "type" : "string"
- },
"headers" : {
"X-Rate-Limit" : {
- "type" : "integer",
- "format" : "int32",
- "description" : "calls per hour allowed by the user"
+ "description" : "calls per hour allowed by the user",
+ "schema" : {
+ "type" : "integer",
+ "format" : "int32"
+ }
},
"X-Expires-After" : {
- "type" : "string",
- "format" : "date-time",
- "description" : "date in UTC when toekn expires"
+ "description" : "date in UTC when toekn expires",
+ "schema" : {
+ "type" : "string",
+ "format" : "date-time"
+ }
+ }
+ },
+ "content" : {
+ "application/xml" : {
+ "schema" : {
+ "type" : "string"
+ }
+ },
+ "application/json" : {
+ "schema" : {
+ "type" : "string"
+ }
}
}
},
"400" : {
- "description" : "Invalid username/password supplied"
+ "description" : "Invalid username/password supplied",
+ "content" : { }
}
}
}
@@ -542,13 +663,11 @@
"get" : {
"tags" : [ "user" ],
"summary" : "Logs out current logged in user session",
- "description" : "",
"operationId" : "logoutUser",
- "produces" : [ "application/xml", "application/json" ],
- "parameters" : [ ],
"responses" : {
"default" : {
- "description" : "successful operation"
+ "description" : "successful operation",
+ "content" : { }
}
}
}
@@ -557,28 +676,39 @@
"get" : {
"tags" : [ "user" ],
"summary" : "Get user by user name",
- "description" : "",
"operationId" : "getUserByName",
- "produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "username",
"in" : "path",
"description" : "The name that needs to be fetched. Use user1 for testing. ",
"required" : true,
- "type" : "string"
+ "schema" : {
+ "type" : "string"
+ }
} ],
"responses" : {
"200" : {
"description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/User"
+ "content" : {
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/User"
+ }
+ },
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/User"
+ }
+ }
}
},
"400" : {
- "description" : "Invalid username supplied"
+ "description" : "Invalid username supplied",
+ "content" : { }
},
"404" : {
- "description" : "User not found"
+ "description" : "User not found",
+ "content" : { }
}
}
},
@@ -587,28 +717,34 @@
"summary" : "Updated user",
"description" : "This can only be done by the logged in user.",
"operationId" : "updateUser",
- "produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "username",
"in" : "path",
"description" : "name that need to be deleted",
"required" : true,
- "type" : "string"
- }, {
- "in" : "body",
- "name" : "body",
- "description" : "Updated user object",
- "required" : true,
"schema" : {
- "$ref" : "#/definitions/User"
+ "type" : "string"
}
} ],
+ "requestBody" : {
+ "description" : "Updated user object",
+ "content" : {
+ "*/*" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/User"
+ }
+ }
+ },
+ "required" : true
+ },
"responses" : {
"400" : {
- "description" : "Invalid user supplied"
+ "description" : "Invalid user supplied",
+ "content" : { }
},
"404" : {
- "description" : "User not found"
+ "description" : "User not found",
+ "content" : { }
}
}
},
@@ -617,215 +753,219 @@
"summary" : "Delete user",
"description" : "This can only be done by the logged in user.",
"operationId" : "deleteUser",
- "produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "username",
"in" : "path",
"description" : "The name that needs to be deleted",
"required" : true,
- "type" : "string"
+ "schema" : {
+ "type" : "string"
+ }
} ],
"responses" : {
"400" : {
- "description" : "Invalid username supplied"
+ "description" : "Invalid username supplied",
+ "content" : { }
},
"404" : {
- "description" : "User not found"
+ "description" : "User not found",
+ "content" : { }
}
}
}
}
},
- "securityDefinitions" : {
- "petstore_auth" : {
- "type" : "oauth2",
- "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog",
- "flow" : "implicit",
- "scopes" : {
- "write:pets" : "modify pets in your account",
- "read:pets" : "read your pets"
- }
- },
- "api_key" : {
- "type" : "apiKey",
- "name" : "api_key",
- "in" : "header"
- }
- },
- "definitions" : {
- "Order" : {
- "type" : "object",
- "properties" : {
- "id" : {
- "type" : "integer",
- "format" : "int64"
- },
- "petId" : {
- "type" : "integer",
- "format" : "int64"
- },
- "quantity" : {
- "type" : "integer",
- "format" : "int32"
- },
- "shipDate" : {
- "type" : "string",
- "format" : "date-time"
- },
- "status" : {
- "type" : "string",
- "description" : "Order Status",
- "enum" : [ "placed", "approved", "delivered" ]
- },
- "complete" : {
- "type" : "boolean",
- "default" : false
- }
- },
- "title" : "Pet Order",
- "description" : "An order for a pets from the pet store",
- "xml" : {
- "name" : "Order"
- }
- },
- "Category" : {
- "type" : "object",
- "properties" : {
- "id" : {
- "type" : "integer",
- "format" : "int64"
+ "components" : {
+ "schemas" : {
+ "Order" : {
+ "title" : "Pet Order",
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "petId" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "quantity" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "shipDate" : {
+ "type" : "string",
+ "format" : "date-time"
+ },
+ "status" : {
+ "type" : "string",
+ "description" : "Order Status",
+ "enum" : [ "placed", "approved", "delivered" ]
+ },
+ "complete" : {
+ "type" : "boolean",
+ "default" : false
+ }
},
- "name" : {
- "type" : "string"
+ "description" : "An order for a pets from the pet store",
+ "xml" : {
+ "name" : "Order"
}
},
- "title" : "Pet category",
- "description" : "A category for a pet",
- "xml" : {
- "name" : "Category"
- }
- },
- "User" : {
- "type" : "object",
- "properties" : {
- "id" : {
- "type" : "integer",
- "format" : "int64"
- },
- "username" : {
- "type" : "string"
- },
- "firstName" : {
- "type" : "string"
- },
- "lastName" : {
- "type" : "string"
- },
- "email" : {
- "type" : "string"
- },
- "password" : {
- "type" : "string"
- },
- "phone" : {
- "type" : "string"
+ "Category" : {
+ "title" : "Pet category",
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "name" : {
+ "type" : "string"
+ }
},
- "userStatus" : {
- "type" : "integer",
- "format" : "int32",
- "description" : "User Status"
+ "description" : "A category for a pet",
+ "xml" : {
+ "name" : "Category"
}
},
- "title" : "a User",
- "description" : "A User who is purchasing from the pet store",
- "xml" : {
- "name" : "User"
- }
- },
- "Tag" : {
- "type" : "object",
- "properties" : {
- "id" : {
- "type" : "integer",
- "format" : "int64"
+ "User" : {
+ "title" : "a User",
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "username" : {
+ "type" : "string"
+ },
+ "firstName" : {
+ "type" : "string"
+ },
+ "lastName" : {
+ "type" : "string"
+ },
+ "email" : {
+ "type" : "string"
+ },
+ "password" : {
+ "type" : "string"
+ },
+ "phone" : {
+ "type" : "string"
+ },
+ "userStatus" : {
+ "type" : "integer",
+ "description" : "User Status",
+ "format" : "int32"
+ }
},
- "name" : {
- "type" : "string"
+ "description" : "A User who is purchasing from the pet store",
+ "xml" : {
+ "name" : "User"
}
},
- "title" : "Pet Tag",
- "description" : "A tag for a pet",
- "xml" : {
- "name" : "Tag"
- }
- },
- "Pet" : {
- "type" : "object",
- "required" : [ "name", "photoUrls" ],
- "properties" : {
- "id" : {
- "type" : "integer",
- "format" : "int64"
- },
- "category" : {
- "$ref" : "#/definitions/Category"
- },
- "name" : {
- "type" : "string",
- "example" : "doggie"
- },
- "photoUrls" : {
- "type" : "array",
- "xml" : {
- "name" : "photoUrl",
- "wrapped" : true
+ "Tag" : {
+ "title" : "Pet Tag",
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "type" : "integer",
+ "format" : "int64"
},
- "items" : {
+ "name" : {
"type" : "string"
}
},
- "tags" : {
- "type" : "array",
- "xml" : {
- "name" : "tag",
- "wrapped" : true
+ "description" : "A tag for a pet",
+ "xml" : {
+ "name" : "Tag"
+ }
+ },
+ "Pet" : {
+ "title" : "a Pet",
+ "required" : [ "name", "photoUrls" ],
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "category" : {
+ "$ref" : "#/components/schemas/Category"
+ },
+ "name" : {
+ "type" : "string",
+ "example" : "doggie"
+ },
+ "photoUrls" : {
+ "type" : "array",
+ "xml" : {
+ "name" : "photoUrl",
+ "wrapped" : true
+ },
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "tags" : {
+ "type" : "array",
+ "xml" : {
+ "name" : "tag",
+ "wrapped" : true
+ },
+ "items" : {
+ "$ref" : "#/components/schemas/Tag"
+ }
},
- "items" : {
- "$ref" : "#/definitions/Tag"
+ "status" : {
+ "type" : "string",
+ "description" : "pet status in the store",
+ "enum" : [ "available", "pending", "sold" ]
}
},
- "status" : {
- "type" : "string",
- "description" : "pet status in the store",
- "enum" : [ "available", "pending", "sold" ]
+ "description" : "A pet for sale in the pet store",
+ "xml" : {
+ "name" : "Pet"
}
},
- "title" : "a Pet",
- "description" : "A pet for sale in the pet store",
- "xml" : {
- "name" : "Pet"
+ "ApiResponse" : {
+ "title" : "An uploaded response",
+ "type" : "object",
+ "properties" : {
+ "code" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "type" : {
+ "type" : "string"
+ },
+ "message" : {
+ "type" : "string"
+ }
+ },
+ "description" : "Describes the result of uploading an image resource"
}
},
- "ApiResponse" : {
- "type" : "object",
- "properties" : {
- "code" : {
- "type" : "integer",
- "format" : "int32"
- },
- "type" : {
- "type" : "string"
- },
- "message" : {
- "type" : "string"
+ "securitySchemes" : {
+ "petstore_auth" : {
+ "type" : "oauth2",
+ "flows" : {
+ "implicit" : {
+ "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog",
+ "scopes" : {
+ "write:pets" : "modify pets in your account",
+ "read:pets" : "read your pets"
+ }
+ }
}
},
- "title" : "An uploaded response",
- "description" : "Describes the result of uploading an image resource"
+ "api_key" : {
+ "type" : "apiKey",
+ "name" : "api_key",
+ "in" : "header"
+ }
}
- },
- "externalDocs" : {
- "description" : "Find out more about Swagger",
- "url" : "http://swagger.io"
}
}
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen/VERSION
index f9f7450d135..096bf47efe3 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen/VERSION
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.3.0-SNAPSHOT
\ No newline at end of file
+3.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/PetApi.java
index f8b8a10d288..cfb5812adf2 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/PetApi.java
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/PetApi.java
@@ -1,9 +1,9 @@
package io.swagger.api;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -18,139 +18,194 @@
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
+
import javax.validation.constraints.*;
import javax.validation.Valid;
+
+
/**
* Swagger Petstore
*
+
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
+
*/
+
@Path("/")
@Api(value = "/", description = "")
+
public interface PetApi {
+
+
+
/**
* Add a new pet to the store
*
- *
- *
+
*/
+
@POST
@Path("/pet")
+
@Consumes({ "application/json", "application/xml" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Add a new pet to the store", tags={ "pet", })
+
+
+ @ApiOperation(value = "Add a new pet to the store", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input") })
- public void addPet(@Valid Pet body);
+ public void addPet(@Valid Pet pet);
+
+
/**
* Deletes a pet
*
- *
- *
+
*/
+
@DELETE
@Path("/pet/{petId}")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Deletes a pet", tags={ "pet", })
+
+
+ @ApiOperation(value = "Deletes a pet", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid pet value") })
- public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey);
+ public void deletePet(@PathParam("petId") Integer petId, @HeaderParam("api_key") String apiKey);
+
+
/**
* Finds Pets by status
*
+
* Multiple status values can be provided with comma separated strings
*
+
*/
+
@GET
@Path("/pet/findByStatus")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Finds Pets by status", tags={ "pet", })
+
+ @ApiOperation(value = "Finds Pets by status", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid status value") })
public List findPetsByStatus(@QueryParam("status") @NotNull List status);
+
+
/**
* Finds Pets by tags
*
+
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
*
+
*/
+
@GET
@Path("/pet/findByTags")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Finds Pets by tags", tags={ "pet", })
+
+ @ApiOperation(value = "Finds Pets by tags", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid tag value") })
public List findPetsByTags(@QueryParam("tags") @NotNull List tags);
+
+
/**
* Find pet by ID
*
+
* Returns a single pet
*
+
*/
+
@GET
@Path("/pet/{petId}")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Find pet by ID", tags={ "pet", })
+
+ @ApiOperation(value = "Find pet by ID", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Pet not found") })
- public Pet getPetById(@PathParam("petId") Long petId);
+ public Pet getPetById(@PathParam("petId") Integer petId);
+
+
/**
* Update an existing pet
*
- *
- *
+
*/
+
@PUT
@Path("/pet")
+
@Consumes({ "application/json", "application/xml" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Update an existing pet", tags={ "pet", })
+
+
+ @ApiOperation(value = "Update an existing pet", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Pet not found"),
@ApiResponse(code = 405, message = "Validation exception") })
- public void updatePet(@Valid Pet body);
+ public void updatePet(@Valid Pet pet);
+
+
/**
* Updates a pet in the store with form data
*
- *
- *
+
*/
+
@POST
@Path("/pet/{petId}")
+
@Consumes({ "application/x-www-form-urlencoded" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Updates a pet in the store with form data", tags={ "pet", })
+
+
+ @ApiOperation(value = "Updates a pet in the store with form data", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input") })
- public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status);
+ public void updatePetWithForm(@PathParam("petId") Integer petId, @Valid Object body);
+
+
/**
* uploads an image
*
- *
- *
+
*/
+
@POST
@Path("/pet/{petId}/uploadImage")
+
@Consumes({ "multipart/form-data" })
+
+
@Produces({ "application/json" })
+
@ApiOperation(value = "uploads an image", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail);
+ public ModelApiResponse uploadFile(@PathParam("petId") Integer petId, @Valid Object body);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java
index 72508ea286a..5409f81ac25 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java
@@ -3,6 +3,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -17,77 +18,116 @@
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
+
import javax.validation.constraints.*;
import javax.validation.Valid;
+
+
/**
* Swagger Petstore
*
+
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
+
*/
+
@Path("/")
@Api(value = "/", description = "")
+
public interface StoreApi {
+
+
+
/**
* Delete purchase order by ID
*
+
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
*
+
*/
+
@DELETE
@Path("/store/order/{orderId}")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Delete purchase order by ID", tags={ "store", })
+
+
+ @ApiOperation(value = "Delete purchase order by ID", tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Order not found") })
public void deleteOrder(@PathParam("orderId") String orderId);
+
+
/**
* Returns pet inventories by status
*
+
* Returns a map of status codes to quantities
*
+
*/
+
@GET
@Path("/store/inventory")
+
+
@Produces({ "application/json" })
- @ApiOperation(value = "Returns pet inventories by status", tags={ "store", })
+
+ @ApiOperation(value = "Returns pet inventories by status", tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Map getInventory();
+
+
/**
* Find purchase order by ID
*
+
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
*
+
*/
+
@GET
@Path("/store/order/{orderId}")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Find purchase order by ID", tags={ "store", })
+
+ @ApiOperation(value = "Find purchase order by ID", tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Order not found") })
- public Order getOrderById(@PathParam("orderId") @Min(1) @Max(5) Long orderId);
+ public Order getOrderById(@PathParam("orderId") @DecimalMin("1") @DecimalMax("5") Integer orderId);
+
+
/**
* Place an order for a pet
*
- *
- *
+
*/
+
@POST
@Path("/store/order")
+
+ @Consumes({ "*/*" })
+
+
@Produces({ "application/xml", "application/json" })
+
@ApiOperation(value = "Place an order for a pet", tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order") })
- public Order placeOrder(@Valid Order body);
+ public Order placeOrder(@Valid Order order);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java
index 7aba6911b46..88678459877 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java
@@ -1,8 +1,8 @@
package io.swagger.api;
-import java.util.List;
import io.swagger.model.User;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -17,134 +17,189 @@
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
+
import javax.validation.constraints.*;
import javax.validation.Valid;
+
+
/**
* Swagger Petstore
*
+
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
+
*/
+
@Path("/")
@Api(value = "/", description = "")
+
public interface UserApi {
+
+
+
/**
* Create user
*
+
* This can only be done by the logged in user.
*
+
*/
+
@POST
@Path("/user")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Create user", tags={ "user", })
+
+ @Consumes({ "*/*" })
+
+
+ @ApiOperation(value = "Create user", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
- public void createUser(@Valid User body);
+ public void createUser(@Valid User user);
+
+
/**
* Creates list of users with given input array
*
- *
- *
+
*/
+
@POST
@Path("/user/createWithArray")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
+
+ @Consumes({ "*/*" })
+
+
+ @ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
public void createUsersWithArrayInput(@Valid List body);
+
+
/**
* Creates list of users with given input array
*
- *
- *
+
*/
+
@POST
@Path("/user/createWithList")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
+
+ @Consumes({ "*/*" })
+
+
+ @ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
public void createUsersWithListInput(@Valid List body);
+
+
/**
* Delete user
*
+
* This can only be done by the logged in user.
*
+
*/
+
@DELETE
@Path("/user/{username}")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Delete user", tags={ "user", })
+
+
+ @ApiOperation(value = "Delete user", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied"),
@ApiResponse(code = 404, message = "User not found") })
public void deleteUser(@PathParam("username") String username);
+
+
/**
* Get user by user name
*
- *
- *
+
*/
+
@GET
@Path("/user/{username}")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Get user by user name", tags={ "user", })
+
+ @ApiOperation(value = "Get user by user name", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = User.class),
@ApiResponse(code = 400, message = "Invalid username supplied"),
@ApiResponse(code = 404, message = "User not found") })
public User getUserByName(@PathParam("username") String username);
+
+
/**
* Logs user into the system
*
- *
- *
+
*/
+
@GET
@Path("/user/login")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Logs user into the system", tags={ "user", })
+
+ @ApiOperation(value = "Logs user into the system", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class),
@ApiResponse(code = 400, message = "Invalid username/password supplied") })
public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password);
+
+
/**
* Logs out current logged in user session
*
- *
- *
+
*/
+
@GET
@Path("/user/logout")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Logs out current logged in user session", tags={ "user", })
+
+
+ @ApiOperation(value = "Logs out current logged in user session", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
public void logoutUser();
+
+
/**
* Updated user
*
+
* This can only be done by the logged in user.
*
+
*/
+
@PUT
@Path("/user/{username}")
- @Produces({ "application/xml", "application/json" })
+
+ @Consumes({ "*/*" })
+
+
@ApiOperation(value = "Updated user", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied"),
@ApiResponse(code = 404, message = "User not found") })
- public void updateUser(@PathParam("username") String username, @Valid User body);
+ public void updateUser(@Valid User user, @PathParam("username") String username);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java
index 9a1956aae8c..4e55dd2757e 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,26 +20,49 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* A category for a pet
**/
@ApiModel(description="A category for a pet")
+
public class Category {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String name = null;
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -41,16 +71,28 @@ public Category id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get name
+
+
+
* @return name
**/
@JsonProperty("name")
+
+
public String getName() {
return name;
}
+
public void setName(String name) {
this.name = name;
}
@@ -59,7 +101,11 @@ public Category name(String name) {
this.name = name;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -84,3 +130,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java
index 51ffbeff6da..d1071cd241b 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,28 +20,57 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* Describes the result of uploading an image resource
**/
@ApiModel(description="Describes the result of uploading an image resource")
+
public class ModelApiResponse {
+
@ApiModelProperty(value = "")
+
+
+
private Integer code = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String type = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String message = null;
+
+
/**
+
+
* Get code
+
+
+
* @return code
**/
@JsonProperty("code")
+
+
public Integer getCode() {
return code;
}
+
public void setCode(Integer code) {
this.code = code;
}
@@ -43,16 +79,28 @@ public ModelApiResponse code(Integer code) {
this.code = code;
return this;
}
+
+
+
+
/**
+
+
* Get type
+
+
+
* @return type
**/
@JsonProperty("type")
+
+
public String getType() {
return type;
}
+
public void setType(String type) {
this.type = type;
}
@@ -61,16 +109,28 @@ public ModelApiResponse type(String type) {
this.type = type;
return this;
}
+
+
+
+
/**
+
+
* Get message
+
+
+
* @return message
**/
@JsonProperty("message")
+
+
public String getMessage() {
return message;
}
+
public void setMessage(String message) {
this.message = message;
}
@@ -79,7 +139,11 @@ public ModelApiResponse message(String message) {
this.message = message;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -105,3 +169,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java
index dac33686761..86a6f175a37 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java
@@ -2,8 +2,15 @@
import io.swagger.annotations.ApiModel;
import java.util.Date;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -14,26 +21,55 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* An order for a pets from the pet store
**/
@ApiModel(description="An order for a pets from the pet store")
+
public class Order {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private Long petId = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private Integer quantity = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private Date shipDate = null;
+
+
@XmlType(name="StatusEnum")
@XmlEnum(String.class)
public enum StatusEnum {
+
@XmlEnumValue("placed") PLACED(String.valueOf("placed")), @XmlEnumValue("approved") APPROVED(String.valueOf("approved")), @XmlEnumValue("delivered") DELIVERED(String.valueOf("delivered"));
+
private String value;
@@ -61,23 +97,44 @@ public static StatusEnum fromValue(String v) {
}
}
+
@ApiModelProperty(value = "Order Status")
+
/**
* Order Status
**/
+
+
+
private StatusEnum status = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private Boolean complete = false;
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -86,16 +143,28 @@ public Order id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get petId
+
+
+
* @return petId
**/
@JsonProperty("petId")
+
+
public Long getPetId() {
return petId;
}
+
public void setPetId(Long petId) {
this.petId = petId;
}
@@ -104,16 +173,28 @@ public Order petId(Long petId) {
this.petId = petId;
return this;
}
+
+
+
+
/**
+
+
* Get quantity
+
+
+
* @return quantity
**/
@JsonProperty("quantity")
+
+
public Integer getQuantity() {
return quantity;
}
+
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
@@ -122,16 +203,28 @@ public Order quantity(Integer quantity) {
this.quantity = quantity;
return this;
}
+
+
+
+
/**
+
+
* Get shipDate
+
+
+
* @return shipDate
**/
@JsonProperty("shipDate")
+
+
public Date getShipDate() {
return shipDate;
}
+
public void setShipDate(Date shipDate) {
this.shipDate = shipDate;
}
@@ -140,12 +233,23 @@ public Order shipDate(Date shipDate) {
this.shipDate = shipDate;
return this;
}
+
+
+
+
/**
+
* Order Status
+
+
+
+
* @return status
**/
@JsonProperty("status")
+
+
public String getStatus() {
if (status == null) {
return null;
@@ -153,6 +257,7 @@ public String getStatus() {
return status.value();
}
+
public void setStatus(StatusEnum status) {
this.status = status;
}
@@ -161,16 +266,28 @@ public Order status(StatusEnum status) {
this.status = status;
return this;
}
+
+
+
+
/**
+
+
* Get complete
+
+
+
* @return complete
**/
@JsonProperty("complete")
- public Boolean isComplete() {
+
+
+ public Boolean isisComplete() {
return complete;
}
+
public void setComplete(Boolean complete) {
this.complete = complete;
}
@@ -179,7 +296,11 @@ public Order complete(Boolean complete) {
this.complete = complete;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -208,3 +329,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java
index 3c8ab5da478..9b5d81b1549 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java
@@ -5,8 +5,15 @@
import io.swagger.model.Tag;
import java.util.ArrayList;
import java.util.List;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -17,28 +24,63 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* A pet for sale in the pet store
**/
@ApiModel(description="A pet for sale in the pet store")
+
public class Pet {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private Category category = null;
+
+
+
@ApiModelProperty(example = "doggie", required = true, value = "")
+
+
+
private String name = null;
+
+
+
@ApiModelProperty(required = true, value = "")
+
+
private List photoUrls = new ArrayList();
+
+
+
+
@ApiModelProperty(value = "")
- private List tags = new ArrayList();
+
+
+ private List tags = null;
+
+
+
@XmlType(name="StatusEnum")
@XmlEnum(String.class)
public enum StatusEnum {
+
@XmlEnumValue("available") AVAILABLE(String.valueOf("available")), @XmlEnumValue("pending") PENDING(String.valueOf("pending")), @XmlEnumValue("sold") SOLD(String.valueOf("sold"));
+
private String value;
@@ -66,21 +108,36 @@ public static StatusEnum fromValue(String v) {
}
}
+
@ApiModelProperty(value = "pet status in the store")
+
/**
* pet status in the store
**/
+
+
+
private StatusEnum status = null;
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -89,16 +146,28 @@ public Pet id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get category
+
+
+
* @return category
**/
@JsonProperty("category")
+
+
public Category getCategory() {
return category;
}
+
public void setCategory(Category category) {
this.category = category;
}
@@ -107,17 +176,30 @@ public Pet category(Category category) {
this.category = category;
return this;
}
+
+
+
+
/**
+
+
* Get name
+
+
+
* @return name
**/
@JsonProperty("name")
+
+
@NotNull
+
public String getName() {
return name;
}
+
public void setName(String name) {
this.name = name;
}
@@ -126,17 +208,30 @@ public Pet name(String name) {
this.name = name;
return this;
}
+
+
+
+
/**
+
+
* Get photoUrls
+
+
+
* @return photoUrls
**/
@JsonProperty("photoUrls")
+
+
@NotNull
+
public List getPhotoUrls() {
return photoUrls;
}
+
public void setPhotoUrls(List photoUrls) {
this.photoUrls = photoUrls;
}
@@ -145,21 +240,28 @@ public Pet photoUrls(List photoUrls) {
this.photoUrls = photoUrls;
return this;
}
+
+
+
- public Pet addPhotoUrlsItem(String photoUrlsItem) {
- this.photoUrls.add(photoUrlsItem);
- return this;
- }
-
+
/**
+
+
* Get tags
+
+
+
* @return tags
**/
@JsonProperty("tags")
+
+
public List getTags() {
return tags;
}
+
public void setTags(List tags) {
this.tags = tags;
}
@@ -168,17 +270,23 @@ public Pet tags(List tags) {
this.tags = tags;
return this;
}
+
+
+
- public Pet addTagsItem(Tag tagsItem) {
- this.tags.add(tagsItem);
- return this;
- }
-
+
/**
+
* pet status in the store
+
+
+
+
* @return status
**/
@JsonProperty("status")
+
+
public String getStatus() {
if (status == null) {
return null;
@@ -186,6 +294,7 @@ public String getStatus() {
return status.value();
}
+
public void setStatus(StatusEnum status) {
this.status = status;
}
@@ -194,7 +303,11 @@ public Pet status(StatusEnum status) {
this.status = status;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -223,3 +336,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java
index 24fd1d55d2a..4bc35fff324 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,26 +20,49 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* A tag for a pet
**/
@ApiModel(description="A tag for a pet")
+
public class Tag {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String name = null;
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -41,16 +71,28 @@ public Tag id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get name
+
+
+
* @return name
**/
@JsonProperty("name")
+
+
public String getName() {
return name;
}
+
public void setName(String name) {
this.name = name;
}
@@ -59,7 +101,11 @@ public Tag name(String name) {
this.name = name;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -84,3 +130,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java
index 858e8e14268..e4fda8362c6 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,41 +20,101 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* A User who is purchasing from the pet store
**/
@ApiModel(description="A User who is purchasing from the pet store")
+
public class User {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String username = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String firstName = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String lastName = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String email = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String password = null;
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String phone = null;
+
+
+
@ApiModelProperty(value = "User Status")
+
/**
* User Status
**/
+
+
+
private Integer userStatus = null;
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -56,16 +123,28 @@ public User id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get username
+
+
+
* @return username
**/
@JsonProperty("username")
+
+
public String getUsername() {
return username;
}
+
public void setUsername(String username) {
this.username = username;
}
@@ -74,16 +153,28 @@ public User username(String username) {
this.username = username;
return this;
}
+
+
+
+
/**
+
+
* Get firstName
+
+
+
* @return firstName
**/
@JsonProperty("firstName")
+
+
public String getFirstName() {
return firstName;
}
+
public void setFirstName(String firstName) {
this.firstName = firstName;
}
@@ -92,16 +183,28 @@ public User firstName(String firstName) {
this.firstName = firstName;
return this;
}
+
+
+
+
/**
+
+
* Get lastName
+
+
+
* @return lastName
**/
@JsonProperty("lastName")
+
+
public String getLastName() {
return lastName;
}
+
public void setLastName(String lastName) {
this.lastName = lastName;
}
@@ -110,16 +213,28 @@ public User lastName(String lastName) {
this.lastName = lastName;
return this;
}
+
+
+
+
/**
+
+
* Get email
+
+
+
* @return email
**/
@JsonProperty("email")
+
+
public String getEmail() {
return email;
}
+
public void setEmail(String email) {
this.email = email;
}
@@ -128,16 +243,28 @@ public User email(String email) {
this.email = email;
return this;
}
+
+
+
+
/**
+
+
* Get password
+
+
+
* @return password
**/
@JsonProperty("password")
+
+
public String getPassword() {
return password;
}
+
public void setPassword(String password) {
this.password = password;
}
@@ -146,16 +273,28 @@ public User password(String password) {
this.password = password;
return this;
}
+
+
+
+
/**
+
+
* Get phone
+
+
+
* @return phone
**/
@JsonProperty("phone")
+
+
public String getPhone() {
return phone;
}
+
public void setPhone(String phone) {
this.phone = phone;
}
@@ -164,16 +303,28 @@ public User phone(String phone) {
this.phone = phone;
return this;
}
+
+
+
+
/**
+
* User Status
+
+
+
+
* @return userStatus
**/
@JsonProperty("userStatus")
+
+
public Integer getUserStatus() {
return userStatus;
}
+
public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}
@@ -182,7 +333,11 @@ public User userStatus(Integer userStatus) {
this.userStatus = userStatus;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -213,3 +368,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
index 0f19eb3098d..5326cc9006c 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
@@ -1,10 +1,10 @@
package io.swagger.api.impl;
import io.swagger.api.*;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -18,108 +18,143 @@
import io.swagger.annotations.Api;
+
+
+
+
/**
* Swagger Petstore
*
+
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
+
*
*/
+
public class PetApiServiceImpl implements PetApi {
+
+
+
/**
* Add a new pet to the store
*
- *
- *
+
*/
- public void addPet(Pet body) {
+
+ public void addPet(Pet pet) {
// TODO: Implement...
}
+
+
/**
* Deletes a pet
*
- *
- *
+
*/
- public void deletePet(Long petId, String apiKey) {
+
+ public void deletePet(Integer petId, String apiKey) {
// TODO: Implement...
}
+
+
/**
* Finds Pets by status
*
+
* Multiple status values can be provided with comma separated strings
*
+
*/
+
public List findPetsByStatus(List status) {
// TODO: Implement...
return null;
}
+
+
/**
* Finds Pets by tags
*
+
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
*
+
*/
+
public List findPetsByTags(List tags) {
// TODO: Implement...
return null;
}
+
+
/**
* Find pet by ID
*
+
* Returns a single pet
*
+
*/
- public Pet getPetById(Long petId) {
+
+ public Pet getPetById(Integer petId) {
// TODO: Implement...
return null;
}
+
+
/**
* Update an existing pet
*
- *
- *
+
*/
- public void updatePet(Pet body) {
+
+ public void updatePet(Pet pet) {
// TODO: Implement...
}
+
+
/**
* Updates a pet in the store with form data
*
- *
- *
+
*/
- public void updatePetWithForm(Long petId, String name, String status) {
+
+ public void updatePetWithForm(Integer petId, Object body) {
// TODO: Implement...
}
+
+
/**
* uploads an image
*
- *
- *
+
*/
- public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Attachment fileDetail) {
+
+ public ModelApiResponse uploadFile(Integer petId, Object body) {
// TODO: Implement...
return null;
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
index 9d3f93f8c3d..c3753800fbd 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
@@ -4,6 +4,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -17,60 +18,87 @@
import io.swagger.annotations.Api;
+
+
+
+
/**
* Swagger Petstore
*
+
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
+
*
*/
+
public class StoreApiServiceImpl implements StoreApi {
+
+
+
/**
* Delete purchase order by ID
*
+
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
*
+
*/
+
public void deleteOrder(String orderId) {
// TODO: Implement...
}
+
+
/**
* Returns pet inventories by status
*
+
* Returns a map of status codes to quantities
*
+
*/
+
public Map getInventory() {
// TODO: Implement...
return null;
}
+
+
/**
* Find purchase order by ID
*
+
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
*
+
*/
- public Order getOrderById(Long orderId) {
+
+ public Order getOrderById(Integer orderId) {
// TODO: Implement...
return null;
}
+
+
/**
* Place an order for a pet
*
- *
- *
+
*/
- public Order placeOrder(Order body) {
+
+ public Order placeOrder(Order order) {
// TODO: Implement...
return null;
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
index c569dbf5c15..cdb8e9ebea8 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
@@ -1,9 +1,9 @@
package io.swagger.api.impl;
import io.swagger.api.*;
-import java.util.List;
import io.swagger.model.User;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -17,108 +17,143 @@
import io.swagger.annotations.Api;
+
+
+
+
/**
* Swagger Petstore
*
+
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
+
*
*/
+
public class UserApiServiceImpl implements UserApi {
+
+
+
/**
* Create user
*
+
* This can only be done by the logged in user.
*
+
*/
- public void createUser(User body) {
+
+ public void createUser(User user) {
// TODO: Implement...
}
+
+
/**
* Creates list of users with given input array
*
- *
- *
+
*/
+
public void createUsersWithArrayInput(List body) {
// TODO: Implement...
}
+
+
/**
* Creates list of users with given input array
*
- *
- *
+
*/
+
public void createUsersWithListInput(List body) {
// TODO: Implement...
}
+
+
/**
* Delete user
*
+
* This can only be done by the logged in user.
*
+
*/
+
public void deleteUser(String username) {
// TODO: Implement...
}
+
+
/**
* Get user by user name
*
- *
- *
+
*/
+
public User getUserByName(String username) {
// TODO: Implement...
return null;
}
+
+
/**
* Logs user into the system
*
- *
- *
+
*/
+
public String loginUser(String username, String password) {
// TODO: Implement...
return null;
}
+
+
/**
* Logs out current logged in user session
*
- *
- *
+
*/
+
public void logoutUser() {
// TODO: Implement...
}
+
+
/**
* Updated user
*
+
* This can only be done by the logged in user.
*
+
*/
- public void updateUser(String username, User body) {
+
+ public void updateUser(User user, String username) {
// TODO: Implement...
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf/.swagger-codegen-ignore b/samples/server/petstore/jaxrs-cxf/.swagger-codegen-ignore
index e36d46f1344..70b88e71039 100644
--- a/samples/server/petstore/jaxrs-cxf/.swagger-codegen-ignore
+++ b/samples/server/petstore/jaxrs-cxf/.swagger-codegen-ignore
@@ -22,4 +22,4 @@
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
-#**/impl/*
+**/impl/*
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-cxf/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-cxf/.swagger-codegen/VERSION
index f9f7450d135..096bf47efe3 100644
--- a/samples/server/petstore/jaxrs-cxf/.swagger-codegen/VERSION
+++ b/samples/server/petstore/jaxrs-cxf/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.3.0-SNAPSHOT
\ No newline at end of file
+3.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-cxf/pom.xml b/samples/server/petstore/jaxrs-cxf/pom.xml
index 1ab75579100..6bfc459822e 100644
--- a/samples/server/petstore/jaxrs-cxf/pom.xml
+++ b/samples/server/petstore/jaxrs-cxf/pom.xml
@@ -4,7 +4,9 @@
swagger-cxf-server
war
swagger-cxf-server
+
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
1.0.0
src/main/java
@@ -37,6 +39,15 @@
60000
+
+
+
+ javax.validation
+ validation-api
+ ${beanvalidation-version}
+
+
+
start-jetty
@@ -113,6 +124,7 @@
${junit-version}
test
+
javax.validation
@@ -120,6 +132,7 @@
${beanvalidation-version}
provided
+
org.apache.cxf
@@ -165,12 +178,17 @@
${jackson-jaxrs-version}
compile
+
+
- com.fasterxml.jackson.datatype
- jackson-datatype-joda
- ${jackson-jaxrs-version}
- compile
+ com.fasterxml.jackson.datatype
+ jackson-datatype-joda
+ ${jackson-jaxrs-version}
+
+
+
+
@@ -185,14 +203,18 @@
1.7
${java.version}
${java.version}
- 1.5.15
+ 1.5.18
9.2.9.v20150224
4.12
1.1.7
2.5
+
1.1.0.Final
- 3.1.11
- 2.8.9
+
+
+
+ 3.2.1
+ 2.9.1
UTF-8
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/AnotherFakeApi.java
index c05c51bee51..e13642c89d5 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/AnotherFakeApi.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/AnotherFakeApi.java
@@ -2,6 +2,7 @@
import io.swagger.model.Client;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -16,32 +17,51 @@
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
+
import javax.validation.constraints.*;
import javax.validation.Valid;
+
+
/**
* Swagger Petstore
*
+
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
+
*/
+
@Path("/")
@Api(value = "/", description = "")
+
public interface AnotherFakeApi {
+
+
+
/**
* To test special tags
*
+
* To test special tags
*
+
*/
+
@PATCH
@Path("/another-fake/dummy")
+
@Consumes({ "application/json" })
+
+
@Produces({ "application/json" })
+
@ApiOperation(value = "To test special tags", tags={ "$another-fake?" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
- public Client testSpecialTags(@Valid Client body);
+ public Client testSpecialTags(@Valid Client client);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeApi.java
index 96c3a2b16e0..316267a573e 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeApi.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeApi.java
@@ -2,10 +2,9 @@
import java.math.BigDecimal;
import io.swagger.model.Client;
-import java.util.Date;
-import org.joda.time.LocalDate;
import io.swagger.model.OuterComposite;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -20,120 +19,195 @@
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
+
import javax.validation.constraints.*;
import javax.validation.Valid;
+
+
/**
* Swagger Petstore
*
+
*
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
+
*/
+
@Path("/")
@Api(value = "/", description = "")
+
public interface FakeApi {
+
+
+
@POST
@Path("/fake/outer/boolean")
- @ApiOperation(value = "", tags={ "fake", })
+
+ @Consumes({ "*/*" })
+
+
+ @Produces({ "*/*" })
+
+ @ApiOperation(value = "", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) })
public Boolean fakeOuterBooleanSerialize(@Valid Boolean body);
+
+
@POST
@Path("/fake/outer/composite")
- @ApiOperation(value = "", tags={ "fake", })
+
+ @Consumes({ "*/*" })
+
+
+ @Produces({ "*/*" })
+
+ @ApiOperation(value = "", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) })
- public OuterComposite fakeOuterCompositeSerialize(@Valid OuterComposite body);
+ public OuterComposite fakeOuterCompositeSerialize(@Valid OuterComposite outercomposite);
+
+
@POST
@Path("/fake/outer/number")
- @ApiOperation(value = "", tags={ "fake", })
+
+ @Consumes({ "*/*" })
+
+
+ @Produces({ "*/*" })
+
+ @ApiOperation(value = "", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) })
public BigDecimal fakeOuterNumberSerialize(@Valid BigDecimal body);
+
+
@POST
@Path("/fake/outer/string")
- @ApiOperation(value = "", tags={ "fake", })
+
+ @Consumes({ "*/*" })
+
+
+ @Produces({ "*/*" })
+
+ @ApiOperation(value = "", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output string", response = String.class) })
public String fakeOuterStringSerialize(@Valid String body);
+
+
/**
* To test \"client\" model
*
+
* To test \"client\" model
*
+
*/
+
@PATCH
@Path("/fake")
+
@Consumes({ "application/json" })
+
+
@Produces({ "application/json" })
- @ApiOperation(value = "To test \"client\" model", tags={ "fake", })
+
+ @ApiOperation(value = "To test \"client\" model", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
- public Client testClientModel(@Valid Client body);
+ public Client testClientModel(@Valid Client client);
+
+
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
+
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
+
*/
+
@POST
@Path("/fake")
+
@Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
- @Produces({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
- @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", tags={ "fake", })
+
+
+ @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied"),
@ApiResponse(code = 404, message = "User not found") })
- public void testEndpointParameters(@Multipart(value = "number") BigDecimal number, @Multipart(value = "double") Double _double, @Multipart(value = "pattern_without_delimiter") String patternWithoutDelimiter, @Multipart(value = "byte") byte[] _byte, @Multipart(value = "integer", required = false) Integer integer, @Multipart(value = "int32", required = false) Integer int32, @Multipart(value = "int64", required = false) Long int64, @Multipart(value = "float", required = false) Float _float, @Multipart(value = "string", required = false) String string, @Multipart(value = "binary", required = false) byte[] binary, @Multipart(value = "date", required = false) LocalDate date, @Multipart(value = "dateTime", required = false) Date dateTime, @Multipart(value = "password", required = false) String password, @Multipart(value = "callback", required = false) String paramCallback);
+ public void testEndpointParameters(@Valid Object body);
+
+
/**
* To test enum parameters
*
+
* To test enum parameters
*
+
*/
+
@GET
@Path("/fake")
+
@Consumes({ "*/*" })
- @Produces({ "*/*" })
- @ApiOperation(value = "To test enum parameters", tags={ "fake", })
+
+
+ @ApiOperation(value = "To test enum parameters", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid request"),
@ApiResponse(code = 404, message = "Not found") })
- public void testEnumParameters(@Multipart(value = "enum_form_string_array", required = false) List enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString, @HeaderParam("enum_header_string_array") List enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @QueryParam("enum_query_string_array") List enumQueryStringArray, @QueryParam("enum_query_string") @DefaultValue("-efg") String enumQueryString, @QueryParam("enum_query_integer") Integer enumQueryInteger, @Multipart(value = "enum_query_double", required = false) Double enumQueryDouble);
+ public void testEnumParameters(@Valid Object body, @HeaderParam("enum_header_string_array") List enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @QueryParam("enum_query_string_array") List enumQueryStringArray, @QueryParam("enum_query_string") String enumQueryString, @QueryParam("enum_query_integer") Integer enumQueryInteger);
+
+
/**
* test inline additionalProperties
*
- *
- *
+
*/
+
@POST
@Path("/fake/inline-additionalProperties")
+
@Consumes({ "application/json" })
- @ApiOperation(value = "test inline additionalProperties", tags={ "fake", })
+
+
+ @ApiOperation(value = "test inline additionalProperties", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
- public void testInlineAdditionalProperties(@Valid Object param);
+ public void testInlineAdditionalProperties(@Valid Map body);
+
+
/**
* test json serialization of form data
*
- *
- *
+
*/
+
@GET
@Path("/fake/jsonFormData")
+
@Consumes({ "application/json" })
+
+
@ApiOperation(value = "test json serialization of form data", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
- public void testJsonFormData(@Multipart(value = "param") String param, @Multipart(value = "param2") String param2);
+ public void testJsonFormData(@Valid Object body);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeClassnameTags123Api.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeClassnameTags123Api.java
index 63de6839dc1..4443a066af5 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeClassnameTags123Api.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeClassnameTags123Api.java
@@ -2,6 +2,7 @@
import io.swagger.model.Client;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -16,30 +17,48 @@
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
+
import javax.validation.constraints.*;
import javax.validation.Valid;
+
+
/**
* Swagger Petstore
*
+
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
+
*/
+
@Path("/")
@Api(value = "/", description = "")
+
public interface FakeClassnameTags123Api {
+
+
+
/**
* To test class name in snake case
*
+
*/
+
@PATCH
@Path("/fake_classname_test")
+
@Consumes({ "application/json" })
+
+
@Produces({ "application/json" })
+
@ApiOperation(value = "To test class name in snake case", tags={ "fake_classname_tags 123#$%^" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
- public Client testClassname(@Valid Client body);
+ public Client testClassname(@Valid Client client);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/PetApi.java
index 20fab16db0c..4b364218958 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/PetApi.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/PetApi.java
@@ -1,9 +1,9 @@
package io.swagger.api;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -18,139 +18,194 @@
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
+
import javax.validation.constraints.*;
import javax.validation.Valid;
+
+
/**
* Swagger Petstore
*
+
*
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
+
*/
+
@Path("/")
@Api(value = "/", description = "")
+
public interface PetApi {
+
+
+
/**
* Add a new pet to the store
*
- *
- *
+
*/
+
@POST
@Path("/pet")
+
@Consumes({ "application/json", "application/xml" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Add a new pet to the store", tags={ "pet", })
+
+
+ @ApiOperation(value = "Add a new pet to the store", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input") })
- public void addPet(@Valid Pet body);
+ public void addPet(@Valid Pet pet);
+
+
/**
* Deletes a pet
*
- *
- *
+
*/
+
@DELETE
@Path("/pet/{petId}")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Deletes a pet", tags={ "pet", })
+
+
+ @ApiOperation(value = "Deletes a pet", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid pet value") })
- public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey);
+ public void deletePet(@PathParam("petId") Integer petId, @HeaderParam("api_key") String apiKey);
+
+
/**
* Finds Pets by status
*
+
* Multiple status values can be provided with comma separated strings
*
+
*/
+
@GET
@Path("/pet/findByStatus")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Finds Pets by status", tags={ "pet", })
+
+ @ApiOperation(value = "Finds Pets by status", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid status value") })
public List findPetsByStatus(@QueryParam("status") @NotNull List status);
+
+
/**
* Finds Pets by tags
*
+
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
*
+
*/
+
@GET
@Path("/pet/findByTags")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Finds Pets by tags", tags={ "pet", })
+
+ @ApiOperation(value = "Finds Pets by tags", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid tag value") })
public List findPetsByTags(@QueryParam("tags") @NotNull List tags);
+
+
/**
* Find pet by ID
*
+
* Returns a single pet
*
+
*/
+
@GET
@Path("/pet/{petId}")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Find pet by ID", tags={ "pet", })
+
+ @ApiOperation(value = "Find pet by ID", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Pet not found") })
- public Pet getPetById(@PathParam("petId") Long petId);
+ public Pet getPetById(@PathParam("petId") Integer petId);
+
+
/**
* Update an existing pet
*
- *
- *
+
*/
+
@PUT
@Path("/pet")
+
@Consumes({ "application/json", "application/xml" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Update an existing pet", tags={ "pet", })
+
+
+ @ApiOperation(value = "Update an existing pet", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Pet not found"),
@ApiResponse(code = 405, message = "Validation exception") })
- public void updatePet(@Valid Pet body);
+ public void updatePet(@Valid Pet pet);
+
+
/**
* Updates a pet in the store with form data
*
- *
- *
+
*/
+
@POST
@Path("/pet/{petId}")
+
@Consumes({ "application/x-www-form-urlencoded" })
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Updates a pet in the store with form data", tags={ "pet", })
+
+
+ @ApiOperation(value = "Updates a pet in the store with form data", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input") })
- public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status);
+ public void updatePetWithForm(@PathParam("petId") Integer petId, @Valid Object body);
+
+
/**
* uploads an image
*
- *
- *
+
*/
+
@POST
@Path("/pet/{petId}/uploadImage")
+
@Consumes({ "multipart/form-data" })
+
+
@Produces({ "application/json" })
+
@ApiOperation(value = "uploads an image", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail);
+ public ModelApiResponse uploadFile(@PathParam("petId") Integer petId, @Valid Object body);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/StoreApi.java
index 065420cf357..e1224f07999 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/StoreApi.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/StoreApi.java
@@ -3,6 +3,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -17,77 +18,116 @@
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
+
import javax.validation.constraints.*;
import javax.validation.Valid;
+
+
/**
* Swagger Petstore
*
+
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
+
*/
+
@Path("/")
@Api(value = "/", description = "")
+
public interface StoreApi {
+
+
+
/**
* Delete purchase order by ID
*
+
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
*
+
*/
+
@DELETE
@Path("/store/order/{order_id}")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Delete purchase order by ID", tags={ "store", })
+
+
+ @ApiOperation(value = "Delete purchase order by ID", tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Order not found") })
public void deleteOrder(@PathParam("order_id") String orderId);
+
+
/**
* Returns pet inventories by status
*
+
* Returns a map of status codes to quantities
*
+
*/
+
@GET
@Path("/store/inventory")
+
+
@Produces({ "application/json" })
- @ApiOperation(value = "Returns pet inventories by status", tags={ "store", })
+
+ @ApiOperation(value = "Returns pet inventories by status", tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Map getInventory();
+
+
/**
* Find purchase order by ID
*
+
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
*
+
*/
+
@GET
@Path("/store/order/{order_id}")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Find purchase order by ID", tags={ "store", })
+
+ @ApiOperation(value = "Find purchase order by ID", tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Order not found") })
- public Order getOrderById(@PathParam("order_id") @Min(1) @Max(5) Long orderId);
+ public Order getOrderById(@PathParam("order_id") @DecimalMin("1") @DecimalMax("5") Integer orderId);
+
+
/**
* Place an order for a pet
*
- *
- *
+
*/
+
@POST
@Path("/store/order")
+
+ @Consumes({ "*/*" })
+
+
@Produces({ "application/xml", "application/json" })
+
@ApiOperation(value = "Place an order for a pet", tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order") })
- public Order placeOrder(@Valid Order body);
+ public Order placeOrder(@Valid Order order);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/UserApi.java
index 3e0d6350623..64612dd6172 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/UserApi.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/UserApi.java
@@ -1,8 +1,8 @@
package io.swagger.api;
-import java.util.List;
import io.swagger.model.User;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -17,134 +17,189 @@
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
+
import javax.validation.constraints.*;
import javax.validation.Valid;
+
+
/**
* Swagger Petstore
*
+
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
+
*/
+
@Path("/")
@Api(value = "/", description = "")
+
public interface UserApi {
+
+
+
/**
* Create user
*
+
* This can only be done by the logged in user.
*
+
*/
+
@POST
@Path("/user")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Create user", tags={ "user", })
+
+ @Consumes({ "*/*" })
+
+
+ @ApiOperation(value = "Create user", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
- public void createUser(@Valid User body);
+ public void createUser(@Valid User user);
+
+
/**
* Creates list of users with given input array
*
- *
- *
+
*/
+
@POST
@Path("/user/createWithArray")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
+
+ @Consumes({ "*/*" })
+
+
+ @ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
public void createUsersWithArrayInput(@Valid List body);
+
+
/**
* Creates list of users with given input array
*
- *
- *
+
*/
+
@POST
@Path("/user/createWithList")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
+
+ @Consumes({ "*/*" })
+
+
+ @ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
public void createUsersWithListInput(@Valid List body);
+
+
/**
* Delete user
*
+
* This can only be done by the logged in user.
*
+
*/
+
@DELETE
@Path("/user/{username}")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Delete user", tags={ "user", })
+
+
+ @ApiOperation(value = "Delete user", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied"),
@ApiResponse(code = 404, message = "User not found") })
public void deleteUser(@PathParam("username") String username);
+
+
/**
* Get user by user name
*
- *
- *
+
*/
+
@GET
@Path("/user/{username}")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Get user by user name", tags={ "user", })
+
+ @ApiOperation(value = "Get user by user name", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = User.class),
@ApiResponse(code = 400, message = "Invalid username supplied"),
@ApiResponse(code = 404, message = "User not found") })
public User getUserByName(@PathParam("username") String username);
+
+
/**
* Logs user into the system
*
- *
- *
+
*/
+
@GET
@Path("/user/login")
+
+
@Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Logs user into the system", tags={ "user", })
+
+ @ApiOperation(value = "Logs user into the system", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class),
@ApiResponse(code = 400, message = "Invalid username/password supplied") })
public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password);
+
+
/**
* Logs out current logged in user session
*
- *
- *
+
*/
+
@GET
@Path("/user/logout")
- @Produces({ "application/xml", "application/json" })
- @ApiOperation(value = "Logs out current logged in user session", tags={ "user", })
+
+
+ @ApiOperation(value = "Logs out current logged in user session", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
public void logoutUser();
+
+
/**
* Updated user
*
+
* This can only be done by the logged in user.
*
+
*/
+
@PUT
@Path("/user/{username}")
- @Produces({ "application/xml", "application/json" })
+
+ @Consumes({ "*/*" })
+
+
@ApiOperation(value = "Updated user", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied"),
@ApiResponse(code = 404, message = "User not found") })
- public void updateUser(@PathParam("username") String username, @Valid User body);
+ public void updateUser(@Valid User user, @PathParam("username") String username);
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java
index 353bc6e2cbc..30fa36c5273 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java
@@ -3,8 +3,15 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -15,22 +22,44 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class AdditionalPropertiesClass {
+
@ApiModelProperty(value = "")
+
+
private Map mapProperty = null;
+
+
+
@ApiModelProperty(value = "")
+
+
private Map> mapOfMapProperty = null;
+
+
+
+
/**
+
+
* Get mapProperty
+
+
+
* @return mapProperty
**/
@JsonProperty("map_property")
+
+
public Map getMapProperty() {
return mapProperty;
}
+
public void setMapProperty(Map mapProperty) {
this.mapProperty = mapProperty;
}
@@ -39,21 +68,34 @@ public AdditionalPropertiesClass mapProperty(Map mapProperty) {
this.mapProperty = mapProperty;
return this;
}
+
+
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
this.mapProperty.put(key, mapPropertyItem);
return this;
}
+
+
+
/**
+
+
* Get mapOfMapProperty
+
+
+
* @return mapOfMapProperty
**/
@JsonProperty("map_of_map_property")
+
+
public Map> getMapOfMapProperty() {
return mapOfMapProperty;
}
+
public void setMapOfMapProperty(Map> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
}
@@ -62,12 +104,17 @@ public AdditionalPropertiesClass mapOfMapProperty(Map mapOfMapPropertyItem) {
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}
+
+
+
@Override
public String toString() {
@@ -92,3 +139,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Animal.java
index 2962c676df8..90c5d53afeb 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Animal.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Animal.java
@@ -2,8 +2,15 @@
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -14,23 +21,46 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class Animal {
+
@ApiModelProperty(required = true, value = "")
+
+
+
private String className = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String color = "red";
+
+
+
/**
+
+
* Get className
+
+
+
* @return className
**/
@JsonProperty("className")
+
+
@NotNull
+
public String getClassName() {
return className;
}
+
public void setClassName(String className) {
this.className = className;
}
@@ -39,16 +69,28 @@ public Animal className(String className) {
this.className = className;
return this;
}
+
+
+
+
/**
+
+
* Get color
+
+
+
* @return color
**/
@JsonProperty("color")
+
+
public String getColor() {
return color;
}
+
public void setColor(String color) {
this.color = color;
}
@@ -57,7 +99,11 @@ public Animal color(String color) {
this.color = color;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -82,3 +128,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AnimalFarm.java
index f124292c31d..62815648ccb 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AnimalFarm.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AnimalFarm.java
@@ -3,8 +3,15 @@
import io.swagger.model.Animal;
import java.util.ArrayList;
import java.util.List;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -15,8 +22,12 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class AnimalFarm extends ArrayList {
+
+
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -38,3 +49,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java
index de5d9f8863c..1cd5b86fbcc 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java
@@ -3,8 +3,15 @@
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -15,19 +22,36 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class ArrayOfArrayOfNumberOnly {
+
@ApiModelProperty(value = "")
+
+
private List> arrayArrayNumber = null;
+
+
+
+
/**
+
+
* Get arrayArrayNumber
+
+
+
* @return arrayArrayNumber
**/
@JsonProperty("ArrayArrayNumber")
+
+
public List> getArrayArrayNumber() {
return arrayArrayNumber;
}
+
public void setArrayArrayNumber(List> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
}
@@ -36,12 +60,17 @@ public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArr
this.arrayArrayNumber = arrayArrayNumber;
return this;
}
+
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) {
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -65,3 +94,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java
index d9e2795aa97..a52f5920ee6 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java
@@ -3,8 +3,15 @@
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -15,19 +22,36 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class ArrayOfNumberOnly {
+
@ApiModelProperty(value = "")
+
+
private List arrayNumber = null;
+
+
+
+
/**
+
+
* Get arrayNumber
+
+
+
* @return arrayNumber
**/
@JsonProperty("ArrayNumber")
+
+
public List getArrayNumber() {
return arrayNumber;
}
+
public void setArrayNumber(List arrayNumber) {
this.arrayNumber = arrayNumber;
}
@@ -36,12 +60,17 @@ public ArrayOfNumberOnly arrayNumber(List arrayNumber) {
this.arrayNumber = arrayNumber;
return this;
}
+
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
this.arrayNumber.add(arrayNumberItem);
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -65,3 +94,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayTest.java
index fa3e7f481ab..38305c5f1f6 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayTest.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayTest.java
@@ -3,8 +3,15 @@
import io.swagger.model.ReadOnlyFirst;
import java.util.ArrayList;
import java.util.List;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -15,25 +22,52 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class ArrayTest {
+
@ApiModelProperty(value = "")
+
+
private List arrayOfString = null;
+
+
+
@ApiModelProperty(value = "")
+
+
private List> arrayArrayOfInteger = null;
+
+
+
@ApiModelProperty(value = "")
+
+
private List> arrayArrayOfModel = null;
+
+
+
+
/**
+
+
* Get arrayOfString
+
+
+
* @return arrayOfString
**/
@JsonProperty("array_of_string")
+
+
public List getArrayOfString() {
return arrayOfString;
}
+
public void setArrayOfString(List arrayOfString) {
this.arrayOfString = arrayOfString;
}
@@ -42,21 +76,34 @@ public ArrayTest arrayOfString(List arrayOfString) {
this.arrayOfString = arrayOfString;
return this;
}
+
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
this.arrayOfString.add(arrayOfStringItem);
return this;
}
+
+
+
+
/**
+
+
* Get arrayArrayOfInteger
+
+
+
* @return arrayArrayOfInteger
**/
@JsonProperty("array_array_of_integer")
+
+
public List> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
}
+
public void setArrayArrayOfInteger(List> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
}
@@ -65,21 +112,34 @@ public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
return this;
}
+
public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) {
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
+
+
+
+
/**
+
+
* Get arrayArrayOfModel
+
+
+
* @return arrayArrayOfModel
**/
@JsonProperty("array_array_of_model")
+
+
public List> getArrayArrayOfModel() {
return arrayArrayOfModel;
}
+
public void setArrayArrayOfModel(List> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
}
@@ -88,12 +148,17 @@ public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel)
this.arrayArrayOfModel = arrayArrayOfModel;
return this;
}
+
public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) {
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -119,3 +184,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Capitalization.java
index 7333898c61f..63f7008871f 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Capitalization.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Capitalization.java
@@ -1,7 +1,14 @@
package io.swagger.model;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -12,37 +19,80 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class Capitalization {
+
@ApiModelProperty(value = "")
+
+
+
private String smallCamel = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String capitalCamel = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String smallSnake = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String capitalSnake = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String scAETHFlowPoints = null;
+
+
@ApiModelProperty(value = "Name of the pet ")
+
/**
* Name of the pet
**/
+
+
+
private String ATT_NAME = null;
+
+
+
/**
+
+
* Get smallCamel
+
+
+
* @return smallCamel
**/
@JsonProperty("smallCamel")
+
+
public String getSmallCamel() {
return smallCamel;
}
+
public void setSmallCamel(String smallCamel) {
this.smallCamel = smallCamel;
}
@@ -51,16 +101,28 @@ public Capitalization smallCamel(String smallCamel) {
this.smallCamel = smallCamel;
return this;
}
+
+
+
+
/**
+
+
* Get capitalCamel
+
+
+
* @return capitalCamel
**/
@JsonProperty("CapitalCamel")
+
+
public String getCapitalCamel() {
return capitalCamel;
}
+
public void setCapitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
}
@@ -69,16 +131,28 @@ public Capitalization capitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
return this;
}
+
+
+
+
/**
+
+
* Get smallSnake
+
+
+
* @return smallSnake
**/
@JsonProperty("small_Snake")
+
+
public String getSmallSnake() {
return smallSnake;
}
+
public void setSmallSnake(String smallSnake) {
this.smallSnake = smallSnake;
}
@@ -87,16 +161,28 @@ public Capitalization smallSnake(String smallSnake) {
this.smallSnake = smallSnake;
return this;
}
+
+
+
+
/**
+
+
* Get capitalSnake
+
+
+
* @return capitalSnake
**/
@JsonProperty("Capital_Snake")
+
+
public String getCapitalSnake() {
return capitalSnake;
}
+
public void setCapitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
}
@@ -105,16 +191,28 @@ public Capitalization capitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
return this;
}
+
+
+
+
/**
+
+
* Get scAETHFlowPoints
+
+
+
* @return scAETHFlowPoints
**/
@JsonProperty("SCA_ETH_Flow_Points")
+
+
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
}
+
public void setScAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
}
@@ -123,16 +221,28 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
return this;
}
+
+
+
+
/**
+
* Name of the pet
+
+
+
+
* @return ATT_NAME
**/
@JsonProperty("ATT_NAME")
+
+
public String getATTNAME() {
return ATT_NAME;
}
+
public void setATTNAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
}
@@ -141,7 +251,11 @@ public Capitalization ATT_NAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -170,3 +284,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Cat.java
index f5af4d9c733..38de9d40f4c 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Cat.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Cat.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.model.Animal;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,19 +20,114 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class Cat extends Animal {
+
+ @ApiModelProperty(required = true, value = "")
+
+
+
+ private String className = null;
+
+
+
+ @ApiModelProperty(value = "")
+
+
+
+ private String color = "red";
+
+
+
@ApiModelProperty(value = "")
+
+
+
private Boolean declawed = null;
+
+
+
/**
+
+
+ * Get className
+
+
+
+ * @return className
+ **/
+ @JsonProperty("className")
+
+
+ @NotNull
+
+ public String getClassName() {
+ return className;
+ }
+
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ public Cat className(String className) {
+ this.className = className;
+ return this;
+ }
+
+
+
+
+
+ /**
+
+
+ * Get color
+
+
+
+ * @return color
+ **/
+ @JsonProperty("color")
+
+
+ public String getColor() {
+ return color;
+ }
+
+
+ public void setColor(String color) {
+ this.color = color;
+ }
+
+ public Cat color(String color) {
+ this.color = color;
+ return this;
+ }
+
+
+
+
+
+ /**
+
+
* Get declawed
+
+
+
* @return declawed
**/
@JsonProperty("declawed")
- public Boolean isDeclawed() {
+
+
+ public Boolean isisDeclawed() {
return declawed;
}
+
public void setDeclawed(Boolean declawed) {
this.declawed = declawed;
}
@@ -34,13 +136,19 @@ public Cat declawed(Boolean declawed) {
this.declawed = declawed;
return this;
}
+
+
+
+
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Cat {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append(" color: ").append(toIndentedString(color)).append("\n");
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
sb.append("}");
return sb.toString();
@@ -58,3 +166,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Category.java
index 2be982a410b..7d2f8c97aa0 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Category.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Category.java
@@ -1,7 +1,14 @@
package io.swagger.model;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -12,22 +19,44 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class Category {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String name = null;
+
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -36,16 +65,28 @@ public Category id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get name
+
+
+
* @return name
**/
@JsonProperty("name")
+
+
public String getName() {
return name;
}
+
public void setName(String name) {
this.name = name;
}
@@ -54,7 +95,11 @@ public Category name(String name) {
this.name = name;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -79,3 +124,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ClassModel.java
index e3af436a21c..9afea9a6d1d 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ClassModel.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ClassModel.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,23 +20,41 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* Model for testing model with \"_class\" property
**/
@ApiModel(description="Model for testing model with \"_class\" property")
+
public class ClassModel {
+
@ApiModelProperty(value = "")
+
+
+
private String propertyClass = null;
+
+
+
/**
+
+
* Get propertyClass
+
+
+
* @return propertyClass
**/
@JsonProperty("_class")
+
+
public String getPropertyClass() {
return propertyClass;
}
+
public void setPropertyClass(String propertyClass) {
this.propertyClass = propertyClass;
}
@@ -38,7 +63,11 @@ public ClassModel propertyClass(String propertyClass) {
this.propertyClass = propertyClass;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -62,3 +91,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Client.java
index 4d6bd4d0363..e500e03af17 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Client.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Client.java
@@ -1,7 +1,14 @@
package io.swagger.model;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -12,19 +19,36 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class Client {
+
@ApiModelProperty(value = "")
+
+
+
private String client = null;
+
+
+
/**
+
+
* Get client
+
+
+
* @return client
**/
@JsonProperty("client")
+
+
public String getClient() {
return client;
}
+
public void setClient(String client) {
this.client = client;
}
@@ -33,7 +57,11 @@ public Client client(String client) {
this.client = client;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -57,3 +85,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Dog.java
index aca8d694c72..28316a24cc7 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Dog.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Dog.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.model.Animal;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,19 +20,114 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class Dog extends Animal {
+
+ @ApiModelProperty(required = true, value = "")
+
+
+
+ private String className = null;
+
+
+
+ @ApiModelProperty(value = "")
+
+
+
+ private String color = "red";
+
+
+
@ApiModelProperty(value = "")
+
+
+
private String breed = null;
+
+
+
/**
+
+
+ * Get className
+
+
+
+ * @return className
+ **/
+ @JsonProperty("className")
+
+
+ @NotNull
+
+ public String getClassName() {
+ return className;
+ }
+
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ public Dog className(String className) {
+ this.className = className;
+ return this;
+ }
+
+
+
+
+
+ /**
+
+
+ * Get color
+
+
+
+ * @return color
+ **/
+ @JsonProperty("color")
+
+
+ public String getColor() {
+ return color;
+ }
+
+
+ public void setColor(String color) {
+ this.color = color;
+ }
+
+ public Dog color(String color) {
+ this.color = color;
+ return this;
+ }
+
+
+
+
+
+ /**
+
+
* Get breed
+
+
+
* @return breed
**/
@JsonProperty("breed")
+
+
public String getBreed() {
return breed;
}
+
public void setBreed(String breed) {
this.breed = breed;
}
@@ -34,13 +136,19 @@ public Dog breed(String breed) {
this.breed = breed;
return this;
}
+
+
+
+
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Dog {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append(" color: ").append(toIndentedString(color)).append("\n");
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
sb.append("}");
return sb.toString();
@@ -58,3 +166,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumArrays.java
index ecf3512c1d2..7cdbee4de73 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumArrays.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumArrays.java
@@ -2,8 +2,15 @@
import java.util.ArrayList;
import java.util.List;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -14,6 +21,8 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class EnumArrays {
@@ -21,7 +30,9 @@ public class EnumArrays {
@XmlEnum(String.class)
public enum JustSymbolEnum {
+
@XmlEnumValue(">=") GREATER_THAN_OR_EQUAL_TO(String.valueOf(">=")), @XmlEnumValue("$") DOLLAR(String.valueOf("$"));
+
private String value;
@@ -49,15 +60,22 @@ public static JustSymbolEnum fromValue(String v) {
}
}
+
@ApiModelProperty(value = "")
+
+
+
private JustSymbolEnum justSymbol = null;
+
@XmlType(name="ArrayEnumEnum")
@XmlEnum(String.class)
public enum ArrayEnumEnum {
+
@XmlEnumValue("fish") FISH(String.valueOf("fish")), @XmlEnumValue("crab") CRAB(String.valueOf("crab"));
+
private String value;
@@ -85,13 +103,27 @@ public static ArrayEnumEnum fromValue(String v) {
}
}
+
@ApiModelProperty(value = "")
+
+
private List arrayEnum = null;
+
+
+
+
/**
+
+
* Get justSymbol
+
+
+
* @return justSymbol
**/
@JsonProperty("just_symbol")
+
+
public String getJustSymbol() {
if (justSymbol == null) {
return null;
@@ -99,6 +131,7 @@ public String getJustSymbol() {
return justSymbol.value();
}
+
public void setJustSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
}
@@ -107,16 +140,28 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
return this;
}
+
+
+
+
/**
+
+
* Get arrayEnum
+
+
+
* @return arrayEnum
**/
@JsonProperty("array_enum")
+
+
public List getArrayEnum() {
return arrayEnum;
}
+
public void setArrayEnum(List arrayEnum) {
this.arrayEnum = arrayEnum;
}
@@ -125,12 +170,17 @@ public EnumArrays arrayEnum(List arrayEnum) {
this.arrayEnum = arrayEnum;
return this;
}
+
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
this.arrayEnum.add(arrayEnumItem);
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -155,3 +205,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumClass.java
index 928ecf719c8..74ae54a9cae 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumClass.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumClass.java
@@ -1,20 +1,31 @@
package io.swagger.model;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
+
/**
* Gets or Sets EnumClass
*/
public enum EnumClass {
+
+
_ABC("_abc"),
_EFG("-efg"),
_XYZ_("(xyz)");
+
private String value;
@@ -23,12 +34,16 @@ public enum EnumClass {
}
@Override
+
@JsonValue
+
public String toString() {
return String.valueOf(value);
}
+
@JsonCreator
+
public static EnumClass fromValue(String text) {
for (EnumClass b : EnumClass.values()) {
if (String.valueOf(b.value).equals(text)) {
@@ -40,3 +55,7 @@ public static EnumClass fromValue(String text) {
}
+
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumTest.java
index 93e832b37b9..cde2c5d6202 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumTest.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumTest.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.model.OuterEnum;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,6 +20,8 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class EnumTest {
@@ -20,7 +29,9 @@ public class EnumTest {
@XmlEnum(String.class)
public enum EnumStringEnum {
+
@XmlEnumValue("UPPER") UPPER(String.valueOf("UPPER")), @XmlEnumValue("lower") LOWER(String.valueOf("lower")), @XmlEnumValue("") EMPTY(String.valueOf(""));
+
private String value;
@@ -48,15 +59,22 @@ public static EnumStringEnum fromValue(String v) {
}
}
+
@ApiModelProperty(value = "")
+
+
+
private EnumStringEnum enumString = null;
+
@XmlType(name="EnumIntegerEnum")
@XmlEnum(Integer.class)
public enum EnumIntegerEnum {
+
@XmlEnumValue("1") NUMBER_1(Integer.valueOf(1)), @XmlEnumValue("-1") NUMBER_MINUS_1(Integer.valueOf(-1));
+
private Integer value;
@@ -84,15 +102,22 @@ public static EnumIntegerEnum fromValue(String v) {
}
}
+
@ApiModelProperty(value = "")
+
+
+
private EnumIntegerEnum enumInteger = null;
+
@XmlType(name="EnumNumberEnum")
@XmlEnum(Double.class)
public enum EnumNumberEnum {
+
@XmlEnumValue("1.1") NUMBER_1_DOT_1(Double.valueOf(1.1)), @XmlEnumValue("-1.2") NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2));
+
private Double value;
@@ -120,16 +145,35 @@ public static EnumNumberEnum fromValue(String v) {
}
}
+
@ApiModelProperty(value = "")
+
+
+
private EnumNumberEnum enumNumber = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private OuterEnum outerEnum = null;
+
+
+
/**
+
+
* Get enumString
+
+
+
* @return enumString
**/
@JsonProperty("enum_string")
+
+
public String getEnumString() {
if (enumString == null) {
return null;
@@ -137,6 +181,7 @@ public String getEnumString() {
return enumString.value();
}
+
public void setEnumString(EnumStringEnum enumString) {
this.enumString = enumString;
}
@@ -145,12 +190,23 @@ public EnumTest enumString(EnumStringEnum enumString) {
this.enumString = enumString;
return this;
}
+
+
+
+
/**
+
+
* Get enumInteger
+
+
+
* @return enumInteger
**/
@JsonProperty("enum_integer")
+
+
public Integer getEnumInteger() {
if (enumInteger == null) {
return null;
@@ -158,6 +214,7 @@ public Integer getEnumInteger() {
return enumInteger.value();
}
+
public void setEnumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
}
@@ -166,12 +223,23 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
return this;
}
+
+
+
+
/**
+
+
* Get enumNumber
+
+
+
* @return enumNumber
**/
@JsonProperty("enum_number")
+
+
public Double getEnumNumber() {
if (enumNumber == null) {
return null;
@@ -179,6 +247,7 @@ public Double getEnumNumber() {
return enumNumber.value();
}
+
public void setEnumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
}
@@ -187,16 +256,28 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
return this;
}
+
+
+
+
/**
+
+
* Get outerEnum
+
+
+
* @return outerEnum
**/
@JsonProperty("outerEnum")
+
+
public OuterEnum getOuterEnum() {
return outerEnum;
}
+
public void setOuterEnum(OuterEnum outerEnum) {
this.outerEnum = outerEnum;
}
@@ -205,7 +286,11 @@ public EnumTest outerEnum(OuterEnum outerEnum) {
this.outerEnum = outerEnum;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -232,3 +317,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/FormatTest.java
index c9085fc2e6f..d2bff26f6b3 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/FormatTest.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/FormatTest.java
@@ -4,8 +4,15 @@
import java.util.Date;
import java.util.UUID;
import org.joda.time.LocalDate;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -16,57 +23,136 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class FormatTest {
+
@ApiModelProperty(value = "")
+
+
+
private Integer integer = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private Integer int32 = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private Long int64 = null;
+
+
@ApiModelProperty(required = true, value = "")
+
+
+
private BigDecimal number = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private Float _float = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private Double _double = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String string = null;
+
+
@ApiModelProperty(required = true, value = "")
- private byte[] _byte = null;
+
+
+
+ private String _byte = null;
+
+
@ApiModelProperty(value = "")
- private byte[] binary = null;
+
+
+
+ private String binary = null;
+
+
@ApiModelProperty(required = true, value = "")
+
+
+
private LocalDate date = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private Date dateTime = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private UUID uuid = null;
+
+
@ApiModelProperty(required = true, value = "")
+
+
+
private String password = null;
+
+
+
/**
+
+
* Get integer
+
+
* minimum: 10
+
+
* maximum: 100
+
* @return integer
**/
@JsonProperty("integer")
+
+
@Min(10) @Max(100) public Integer getInteger() {
return integer;
}
+
public void setInteger(Integer integer) {
this.integer = integer;
}
@@ -75,18 +161,32 @@ public FormatTest integer(Integer integer) {
this.integer = integer;
return this;
}
+
+
+
+
/**
+
+
* Get int32
+
+
* minimum: 20
+
+
* maximum: 200
+
* @return int32
**/
@JsonProperty("int32")
+
+
@Min(20) @Max(200) public Integer getInt32() {
return int32;
}
+
public void setInt32(Integer int32) {
this.int32 = int32;
}
@@ -95,16 +195,28 @@ public FormatTest int32(Integer int32) {
this.int32 = int32;
return this;
}
+
+
+
+
/**
+
+
* Get int64
+
+
+
* @return int64
**/
@JsonProperty("int64")
+
+
public Long getInt64() {
return int64;
}
+
public void setInt64(Long int64) {
this.int64 = int64;
}
@@ -113,19 +225,30 @@ public FormatTest int64(Long int64) {
this.int64 = int64;
return this;
}
+
+
+
+
/**
+
+
* Get number
- * minimum: 32.1
- * maximum: 543.2
+
+
+
* @return number
**/
@JsonProperty("number")
+
+
@NotNull
- @DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() {
+
+ public BigDecimal getNumber() {
return number;
}
+
public void setNumber(BigDecimal number) {
this.number = number;
}
@@ -134,18 +257,28 @@ public FormatTest number(BigDecimal number) {
this.number = number;
return this;
}
+
+
+
+
/**
+
+
* Get _float
- * minimum: 54.3
- * maximum: 987.6
+
+
+
* @return _float
**/
@JsonProperty("float")
- @DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() {
+
+
+ public Float getFloat() {
return _float;
}
+
public void setFloat(Float _float) {
this._float = _float;
}
@@ -154,18 +287,28 @@ public FormatTest _float(Float _float) {
this._float = _float;
return this;
}
+
+
+
+
/**
+
+
* Get _double
- * minimum: 67.8
- * maximum: 123.4
+
+
+
* @return _double
**/
@JsonProperty("double")
- @DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() {
+
+
+ public Double getDouble() {
return _double;
}
+
public void setDouble(Double _double) {
this._double = _double;
}
@@ -174,16 +317,28 @@ public FormatTest _double(Double _double) {
this._double = _double;
return this;
}
+
+
+
+
/**
+
+
* Get string
+
+
+
* @return string
**/
@JsonProperty("string")
+
+
@Pattern(regexp="/[a-z]/i") public String getString() {
return string;
}
+
public void setString(String string) {
this.string = string;
}
@@ -192,54 +347,92 @@ public FormatTest string(String string) {
this.string = string;
return this;
}
+
+
+
+
/**
+
+
* Get _byte
+
+
+
* @return _byte
**/
@JsonProperty("byte")
+
+
@NotNull
- @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") public byte[] getByte() {
+
+ @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") public String getByte() {
return _byte;
}
- public void setByte(byte[] _byte) {
+
+ public void setByte(String _byte) {
this._byte = _byte;
}
- public FormatTest _byte(byte[] _byte) {
+ public FormatTest _byte(String _byte) {
this._byte = _byte;
return this;
}
+
+
+
+
/**
+
+
* Get binary
+
+
+
* @return binary
**/
@JsonProperty("binary")
- public byte[] getBinary() {
+
+
+ public String getBinary() {
return binary;
}
- public void setBinary(byte[] binary) {
+
+ public void setBinary(String binary) {
this.binary = binary;
}
- public FormatTest binary(byte[] binary) {
+ public FormatTest binary(String binary) {
this.binary = binary;
return this;
}
+
+
+
+
/**
+
+
* Get date
+
+
+
* @return date
**/
@JsonProperty("date")
+
+
@NotNull
+
public LocalDate getDate() {
return date;
}
+
public void setDate(LocalDate date) {
this.date = date;
}
@@ -248,16 +441,28 @@ public FormatTest date(LocalDate date) {
this.date = date;
return this;
}
+
+
+
+
/**
+
+
* Get dateTime
+
+
+
* @return dateTime
**/
@JsonProperty("dateTime")
+
+
public Date getDateTime() {
return dateTime;
}
+
public void setDateTime(Date dateTime) {
this.dateTime = dateTime;
}
@@ -266,16 +471,28 @@ public FormatTest dateTime(Date dateTime) {
this.dateTime = dateTime;
return this;
}
+
+
+
+
/**
+
+
* Get uuid
+
+
+
* @return uuid
**/
@JsonProperty("uuid")
+
+
public UUID getUuid() {
return uuid;
}
+
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
@@ -284,17 +501,30 @@ public FormatTest uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
+
+
+
+
/**
+
+
* Get password
+
+
+
* @return password
**/
@JsonProperty("password")
+
+
@NotNull
- @Size(min=10,max=64) public String getPassword() {
+
+ public String getPassword() {
return password;
}
+
public void setPassword(String password) {
this.password = password;
}
@@ -303,7 +533,11 @@ public FormatTest password(String password) {
this.password = password;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -339,3 +573,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/HasOnlyReadOnly.java
index e9ab9aadf50..856a2e66dbe 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/HasOnlyReadOnly.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/HasOnlyReadOnly.java
@@ -1,7 +1,14 @@
package io.swagger.model;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -12,33 +19,87 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class HasOnlyReadOnly {
+
@ApiModelProperty(value = "")
+
+
+
private String bar = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String foo = null;
+
+
+
/**
+
+
* Get bar
+
+
+
* @return bar
**/
@JsonProperty("bar")
+
+
public String getBar() {
return bar;
}
+
+ public void setBar(String bar) {
+ this.bar = bar;
+ }
+
+ public HasOnlyReadOnly bar(String bar) {
+ this.bar = bar;
+ return this;
+ }
+
+
+
+
/**
+
+
* Get foo
+
+
+
* @return foo
**/
@JsonProperty("foo")
+
+
public String getFoo() {
return foo;
}
+
+ public void setFoo(String foo) {
+ this.foo = foo;
+ }
+ public HasOnlyReadOnly foo(String foo) {
+ this.foo = foo;
+ return this;
+ }
+
+
+
+
+
@Override
public String toString() {
@@ -63,3 +124,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MapTest.java
index fa39d05a288..d5751c1b066 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MapTest.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MapTest.java
@@ -3,8 +3,15 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -15,17 +22,26 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class MapTest {
+
@ApiModelProperty(value = "")
+
+
private Map> mapMapOfString = null;
+
+
@XmlType(name="InnerEnum")
@XmlEnum(String.class)
public enum InnerEnum {
+
@XmlEnumValue("UPPER") UPPER(String.valueOf("UPPER")), @XmlEnumValue("lower") LOWER(String.valueOf("lower"));
+
private String value;
@@ -53,17 +69,32 @@ public static InnerEnum fromValue(String v) {
}
}
+
@ApiModelProperty(value = "")
+
+
private Map mapOfEnumString = null;
+
+
+
+
/**
+
+
* Get mapMapOfString
+
+
+
* @return mapMapOfString
**/
@JsonProperty("map_map_of_string")
+
+
public Map> getMapMapOfString() {
return mapMapOfString;
}
+
public void setMapMapOfString(Map> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
}
@@ -72,21 +103,34 @@ public MapTest mapMapOfString(Map> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
return this;
}
+
+
public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) {
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
+
+
+
/**
+
+
* Get mapOfEnumString
+
+
+
* @return mapOfEnumString
**/
@JsonProperty("map_of_enum_string")
+
+
public Map getMapOfEnumString() {
return mapOfEnumString;
}
+
public void setMapOfEnumString(Map mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
}
@@ -95,12 +139,17 @@ public MapTest mapOfEnumString(Map mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
return this;
}
+
+
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}
+
+
+
@Override
public String toString() {
@@ -125,3 +174,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java
index c86319b2fca..96cf069481b 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java
@@ -6,8 +6,15 @@
import java.util.List;
import java.util.Map;
import java.util.UUID;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -18,25 +25,52 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class MixedPropertiesAndAdditionalPropertiesClass {
+
@ApiModelProperty(value = "")
+
+
+
private UUID uuid = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private Date dateTime = null;
+
+
@ApiModelProperty(value = "")
+
+
private Map map = null;
+
+
+
+
/**
+
+
* Get uuid
+
+
+
* @return uuid
**/
@JsonProperty("uuid")
+
+
public UUID getUuid() {
return uuid;
}
+
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
@@ -45,16 +79,28 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
+
+
+
+
/**
+
+
* Get dateTime
+
+
+
* @return dateTime
**/
@JsonProperty("dateTime")
+
+
public Date getDateTime() {
return dateTime;
}
+
public void setDateTime(Date dateTime) {
this.dateTime = dateTime;
}
@@ -63,16 +109,28 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) {
this.dateTime = dateTime;
return this;
}
+
+
+
+
/**
+
+
* Get map
+
+
+
* @return map
**/
@JsonProperty("map")
+
+
public Map getMap() {
return map;
}
+
public void setMap(Map map) {
this.map = map;
}
@@ -81,12 +139,17 @@ public MixedPropertiesAndAdditionalPropertiesClass map(Map map)
this.map = map;
return this;
}
+
+
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
this.map.put(key, mapItem);
return this;
}
+
+
+
@Override
public String toString() {
@@ -112,3 +175,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Model200Response.java
index 30e12af1b47..f947dee6796 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Model200Response.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Model200Response.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,26 +20,49 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* Model for testing model name starting with number
**/
@ApiModel(description="Model for testing model name starting with number")
+
public class Model200Response {
+
@ApiModelProperty(value = "")
+
+
+
private Integer name = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String propertyClass = null;
+
+
+
/**
+
+
* Get name
+
+
+
* @return name
**/
@JsonProperty("name")
+
+
public Integer getName() {
return name;
}
+
public void setName(Integer name) {
this.name = name;
}
@@ -41,16 +71,28 @@ public Model200Response name(Integer name) {
this.name = name;
return this;
}
+
+
+
+
/**
+
+
* Get propertyClass
+
+
+
* @return propertyClass
**/
@JsonProperty("class")
+
+
public String getPropertyClass() {
return propertyClass;
}
+
public void setPropertyClass(String propertyClass) {
this.propertyClass = propertyClass;
}
@@ -59,7 +101,11 @@ public Model200Response propertyClass(String propertyClass) {
this.propertyClass = propertyClass;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -84,3 +130,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelApiResponse.java
index 64f77fc254e..a2afc076b22 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelApiResponse.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelApiResponse.java
@@ -1,7 +1,14 @@
package io.swagger.model;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -12,25 +19,52 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class ModelApiResponse {
+
@ApiModelProperty(value = "")
+
+
+
private Integer code = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String type = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String message = null;
+
+
+
/**
+
+
* Get code
+
+
+
* @return code
**/
@JsonProperty("code")
+
+
public Integer getCode() {
return code;
}
+
public void setCode(Integer code) {
this.code = code;
}
@@ -39,16 +73,28 @@ public ModelApiResponse code(Integer code) {
this.code = code;
return this;
}
+
+
+
+
/**
+
+
* Get type
+
+
+
* @return type
**/
@JsonProperty("type")
+
+
public String getType() {
return type;
}
+
public void setType(String type) {
this.type = type;
}
@@ -57,16 +103,28 @@ public ModelApiResponse type(String type) {
this.type = type;
return this;
}
+
+
+
+
/**
+
+
* Get message
+
+
+
* @return message
**/
@JsonProperty("message")
+
+
public String getMessage() {
return message;
}
+
public void setMessage(String message) {
this.message = message;
}
@@ -75,7 +133,11 @@ public ModelApiResponse message(String message) {
this.message = message;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -101,3 +163,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelReturn.java
index 3d11f555a12..d4fba41dfc0 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelReturn.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelReturn.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,23 +20,41 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* Model for testing reserved words
**/
@ApiModel(description="Model for testing reserved words")
+
public class ModelReturn {
+
@ApiModelProperty(value = "")
+
+
+
private Integer _return = null;
+
+
+
/**
+
+
* Get _return
+
+
+
* @return _return
**/
@JsonProperty("return")
+
+
public Integer getReturn() {
return _return;
}
+
public void setReturn(Integer _return) {
this._return = _return;
}
@@ -38,7 +63,11 @@ public ModelReturn _return(Integer _return) {
this._return = _return;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -62,3 +91,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Name.java
index 2c7e77096ed..9ed709a31a6 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Name.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Name.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,33 +20,67 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
/**
* Model for testing model name same as property name
**/
@ApiModel(description="Model for testing model name same as property name")
+
public class Name {
+
@ApiModelProperty(required = true, value = "")
+
+
+
private Integer name = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private Integer snakeCase = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String property = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private Integer _123Number = null;
+
+
+
/**
+
+
* Get name
+
+
+
* @return name
**/
@JsonProperty("name")
+
+
@NotNull
+
public Integer getName() {
return name;
}
+
public void setName(Integer name) {
this.name = name;
}
@@ -48,26 +89,58 @@ public Name name(Integer name) {
this.name = name;
return this;
}
+
+
+
+
/**
+
+
* Get snakeCase
+
+
+
* @return snakeCase
**/
@JsonProperty("snake_case")
+
+
public Integer getSnakeCase() {
return snakeCase;
}
+
+ public void setSnakeCase(Integer snakeCase) {
+ this.snakeCase = snakeCase;
+ }
+ public Name snakeCase(Integer snakeCase) {
+ this.snakeCase = snakeCase;
+ return this;
+ }
+
+
+
+
+
/**
+
+
* Get property
+
+
+
* @return property
**/
@JsonProperty("property")
+
+
public String getProperty() {
return property;
}
+
public void setProperty(String property) {
this.property = property;
}
@@ -76,17 +149,41 @@ public Name property(String property) {
this.property = property;
return this;
}
+
+
+
+
/**
+
+
* Get _123Number
+
+
+
* @return _123Number
**/
@JsonProperty("123Number")
+
+
public Integer get123Number() {
return _123Number;
}
+
+ public void set123Number(Integer _123Number) {
+ this._123Number = _123Number;
+ }
+ public Name _123Number(Integer _123Number) {
+ this._123Number = _123Number;
+ return this;
+ }
+
+
+
+
+
@Override
public String toString() {
@@ -113,3 +210,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/NumberOnly.java
index 8d6e7d662ae..97b47bb4c50 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/NumberOnly.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/NumberOnly.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import java.math.BigDecimal;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,19 +20,36 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class NumberOnly {
+
@ApiModelProperty(value = "")
+
+
+
private BigDecimal justNumber = null;
+
+
+
/**
+
+
* Get justNumber
+
+
+
* @return justNumber
**/
@JsonProperty("JustNumber")
+
+
public BigDecimal getJustNumber() {
return justNumber;
}
+
public void setJustNumber(BigDecimal justNumber) {
this.justNumber = justNumber;
}
@@ -34,7 +58,11 @@ public NumberOnly justNumber(BigDecimal justNumber) {
this.justNumber = justNumber;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -58,3 +86,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Order.java
index 4e4a7a75b65..7fa6e574122 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Order.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Order.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import java.util.Date;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,26 +20,50 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class Order {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private Long petId = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private Integer quantity = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private Date shipDate = null;
+
@XmlType(name="StatusEnum")
@XmlEnum(String.class)
public enum StatusEnum {
+
@XmlEnumValue("placed") PLACED(String.valueOf("placed")), @XmlEnumValue("approved") APPROVED(String.valueOf("approved")), @XmlEnumValue("delivered") DELIVERED(String.valueOf("delivered"));
+
private String value;
@@ -60,23 +91,44 @@ public static StatusEnum fromValue(String v) {
}
}
+
@ApiModelProperty(value = "Order Status")
+
/**
* Order Status
**/
+
+
+
private StatusEnum status = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private Boolean complete = false;
+
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -85,16 +137,28 @@ public Order id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get petId
+
+
+
* @return petId
**/
@JsonProperty("petId")
+
+
public Long getPetId() {
return petId;
}
+
public void setPetId(Long petId) {
this.petId = petId;
}
@@ -103,16 +167,28 @@ public Order petId(Long petId) {
this.petId = petId;
return this;
}
+
+
+
+
/**
+
+
* Get quantity
+
+
+
* @return quantity
**/
@JsonProperty("quantity")
+
+
public Integer getQuantity() {
return quantity;
}
+
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
@@ -121,16 +197,28 @@ public Order quantity(Integer quantity) {
this.quantity = quantity;
return this;
}
+
+
+
+
/**
+
+
* Get shipDate
+
+
+
* @return shipDate
**/
@JsonProperty("shipDate")
+
+
public Date getShipDate() {
return shipDate;
}
+
public void setShipDate(Date shipDate) {
this.shipDate = shipDate;
}
@@ -139,12 +227,23 @@ public Order shipDate(Date shipDate) {
this.shipDate = shipDate;
return this;
}
+
+
+
+
/**
+
* Order Status
+
+
+
+
* @return status
**/
@JsonProperty("status")
+
+
public String getStatus() {
if (status == null) {
return null;
@@ -152,6 +251,7 @@ public String getStatus() {
return status.value();
}
+
public void setStatus(StatusEnum status) {
this.status = status;
}
@@ -160,16 +260,28 @@ public Order status(StatusEnum status) {
this.status = status;
return this;
}
+
+
+
+
/**
+
+
* Get complete
+
+
+
* @return complete
**/
@JsonProperty("complete")
- public Boolean isComplete() {
+
+
+ public Boolean isisComplete() {
return complete;
}
+
public void setComplete(Boolean complete) {
this.complete = complete;
}
@@ -178,7 +290,11 @@ public Order complete(Boolean complete) {
this.complete = complete;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -207,3 +323,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterBoolean.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterBoolean.java
new file mode 100644
index 00000000000..f9313f53939
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterBoolean.java
@@ -0,0 +1,51 @@
+package io.swagger.model;
+
+
+
+import javax.validation.constraints.*;
+
+
+
+
+
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+
+
+public class OuterBoolean {
+
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OuterBoolean {\n");
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private static String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterComposite.java
index 33fd0d7c28a..d6e055d4370 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterComposite.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterComposite.java
@@ -1,8 +1,15 @@
package io.swagger.model;
import java.math.BigDecimal;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -13,25 +20,52 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class OuterComposite {
+
@ApiModelProperty(value = "")
+
+
+
private BigDecimal myNumber = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String myString = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private Boolean myBoolean = null;
+
+
+
/**
+
+
* Get myNumber
+
+
+
* @return myNumber
**/
@JsonProperty("my_number")
+
+
public BigDecimal getMyNumber() {
return myNumber;
}
+
public void setMyNumber(BigDecimal myNumber) {
this.myNumber = myNumber;
}
@@ -40,16 +74,28 @@ public OuterComposite myNumber(BigDecimal myNumber) {
this.myNumber = myNumber;
return this;
}
+
+
+
+
/**
+
+
* Get myString
+
+
+
* @return myString
**/
@JsonProperty("my_string")
+
+
public String getMyString() {
return myString;
}
+
public void setMyString(String myString) {
this.myString = myString;
}
@@ -58,16 +104,28 @@ public OuterComposite myString(String myString) {
this.myString = myString;
return this;
}
+
+
+
+
/**
+
+
* Get myBoolean
+
+
+
* @return myBoolean
**/
@JsonProperty("my_boolean")
+
+
public Boolean getMyBoolean() {
return myBoolean;
}
+
public void setMyBoolean(Boolean myBoolean) {
this.myBoolean = myBoolean;
}
@@ -76,7 +134,11 @@ public OuterComposite myBoolean(Boolean myBoolean) {
this.myBoolean = myBoolean;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -102,3 +164,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterEnum.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterEnum.java
index a95e0f4f052..979fcc06842 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterEnum.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterEnum.java
@@ -1,20 +1,31 @@
package io.swagger.model;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
+
/**
* Gets or Sets OuterEnum
*/
public enum OuterEnum {
+
+
PLACED("placed"),
APPROVED("approved"),
DELIVERED("delivered");
+
private String value;
@@ -23,12 +34,16 @@ public enum OuterEnum {
}
@Override
+
@JsonValue
+
public String toString() {
return String.valueOf(value);
}
+
@JsonCreator
+
public static OuterEnum fromValue(String text) {
for (OuterEnum b : OuterEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
@@ -40,3 +55,7 @@ public static OuterEnum fromValue(String text) {
}
+
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterNumber.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterNumber.java
new file mode 100644
index 00000000000..2e4a499a764
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterNumber.java
@@ -0,0 +1,51 @@
+package io.swagger.model;
+
+
+
+import javax.validation.constraints.*;
+
+
+
+
+
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+
+
+public class OuterNumber {
+
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OuterNumber {\n");
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private static String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterString.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterString.java
new file mode 100644
index 00000000000..dda6c9c9d09
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterString.java
@@ -0,0 +1,51 @@
+package io.swagger.model;
+
+
+
+import javax.validation.constraints.*;
+
+
+
+
+
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+
+
+public class OuterString {
+
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OuterString {\n");
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private static String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Pet.java
index a91ce9b1713..4fcfcae2d75 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Pet.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Pet.java
@@ -4,8 +4,15 @@
import io.swagger.model.Tag;
import java.util.ArrayList;
import java.util.List;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -16,29 +23,58 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class Pet {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private Category category = null;
+
+
@ApiModelProperty(example = "doggie", required = true, value = "")
+
+
+
private String name = null;
+
+
@ApiModelProperty(required = true, value = "")
+
+
private List photoUrls = new ArrayList();
+
+
+
@ApiModelProperty(value = "")
+
+
private List tags = null;
+
+
@XmlType(name="StatusEnum")
@XmlEnum(String.class)
public enum StatusEnum {
+
@XmlEnumValue("available") AVAILABLE(String.valueOf("available")), @XmlEnumValue("pending") PENDING(String.valueOf("pending")), @XmlEnumValue("sold") SOLD(String.valueOf("sold"));
+
private String value;
@@ -66,20 +102,36 @@ public static StatusEnum fromValue(String v) {
}
}
+
@ApiModelProperty(value = "pet status in the store")
+
/**
* pet status in the store
**/
+
+
+
private StatusEnum status = null;
+
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -88,16 +140,28 @@ public Pet id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get category
+
+
+
* @return category
**/
@JsonProperty("category")
+
+
public Category getCategory() {
return category;
}
+
public void setCategory(Category category) {
this.category = category;
}
@@ -106,17 +170,30 @@ public Pet category(Category category) {
this.category = category;
return this;
}
+
+
+
+
/**
+
+
* Get name
+
+
+
* @return name
**/
@JsonProperty("name")
+
+
@NotNull
+
public String getName() {
return name;
}
+
public void setName(String name) {
this.name = name;
}
@@ -125,17 +202,30 @@ public Pet name(String name) {
this.name = name;
return this;
}
+
+
+
+
/**
+
+
* Get photoUrls
+
+
+
* @return photoUrls
**/
@JsonProperty("photoUrls")
+
+
@NotNull
+
public List getPhotoUrls() {
return photoUrls;
}
+
public void setPhotoUrls(List photoUrls) {
this.photoUrls = photoUrls;
}
@@ -144,21 +234,34 @@ public Pet photoUrls(List photoUrls) {
this.photoUrls = photoUrls;
return this;
}
+
public Pet addPhotoUrlsItem(String photoUrlsItem) {
this.photoUrls.add(photoUrlsItem);
return this;
}
+
+
+
+
/**
+
+
* Get tags
+
+
+
* @return tags
**/
@JsonProperty("tags")
+
+
public List getTags() {
return tags;
}
+
public void setTags(List tags) {
this.tags = tags;
}
@@ -167,17 +270,29 @@ public Pet tags(List tags) {
this.tags = tags;
return this;
}
+
public Pet addTagsItem(Tag tagsItem) {
this.tags.add(tagsItem);
return this;
}
+
+
+
+
/**
+
* pet status in the store
+
+
+
+
* @return status
**/
@JsonProperty("status")
+
+
public String getStatus() {
if (status == null) {
return null;
@@ -185,6 +300,7 @@ public String getStatus() {
return status.value();
}
+
public void setStatus(StatusEnum status) {
this.status = status;
}
@@ -193,7 +309,11 @@ public Pet status(StatusEnum status) {
this.status = status;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -222,3 +342,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ReadOnlyFirst.java
index 144819040de..aa7e733ca09 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ReadOnlyFirst.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ReadOnlyFirst.java
@@ -1,7 +1,14 @@
package io.swagger.model;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -12,32 +19,74 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class ReadOnlyFirst {
+
@ApiModelProperty(value = "")
+
+
+
private String bar = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String baz = null;
+
+
+
/**
+
+
* Get bar
+
+
+
* @return bar
**/
@JsonProperty("bar")
+
+
public String getBar() {
return bar;
}
+
+ public void setBar(String bar) {
+ this.bar = bar;
+ }
+ public ReadOnlyFirst bar(String bar) {
+ this.bar = bar;
+ return this;
+ }
+
+
+
+
+
/**
+
+
* Get baz
+
+
+
* @return baz
**/
@JsonProperty("baz")
+
+
public String getBaz() {
return baz;
}
+
public void setBaz(String baz) {
this.baz = baz;
}
@@ -46,7 +95,11 @@ public ReadOnlyFirst baz(String baz) {
this.baz = baz;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -71,3 +124,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/SpecialModelName.java
index ab33c276f21..96420dff725 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/SpecialModelName.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/SpecialModelName.java
@@ -1,7 +1,14 @@
package io.swagger.model;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -12,35 +19,56 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class SpecialModelName {
+
@ApiModelProperty(value = "")
- private Long specialPropertyName = null;
+
+
+
+ private Long $specialPropertyName = null;
+
+
+
/**
- * Get specialPropertyName
- * @return specialPropertyName
+
+
+ * Get $specialPropertyName
+
+
+
+ * @return $specialPropertyName
**/
@JsonProperty("$special[property.name]")
- public Long getSpecialPropertyName() {
- return specialPropertyName;
+
+
+ public Long get$SpecialPropertyName() {
+ return $specialPropertyName;
}
- public void setSpecialPropertyName(Long specialPropertyName) {
- this.specialPropertyName = specialPropertyName;
+
+ public void set$SpecialPropertyName(Long $specialPropertyName) {
+ this.$specialPropertyName = $specialPropertyName;
}
- public SpecialModelName specialPropertyName(Long specialPropertyName) {
- this.specialPropertyName = specialPropertyName;
+ public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
+ this.$specialPropertyName = $specialPropertyName;
return this;
}
+
+
+
+
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SpecialModelName {\n");
- sb.append(" specialPropertyName: ").append(toIndentedString(specialPropertyName)).append("\n");
+ sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -57,3 +85,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Tag.java
index a6497e31663..aca13945d1a 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Tag.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Tag.java
@@ -1,7 +1,14 @@
package io.swagger.model;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -12,22 +19,44 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class Tag {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String name = null;
+
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -36,16 +65,28 @@ public Tag id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get name
+
+
+
* @return name
**/
@JsonProperty("name")
+
+
public String getName() {
return name;
}
+
public void setName(String name) {
this.name = name;
}
@@ -54,7 +95,11 @@ public Tag name(String name) {
this.name = name;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -79,3 +124,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/User.java
index 62643de8aa2..68be0c308c2 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/User.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/User.java
@@ -1,7 +1,14 @@
package io.swagger.model;
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -12,43 +19,96 @@
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
+
+
public class User {
+
@ApiModelProperty(value = "")
+
+
+
private Long id = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String username = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String firstName = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String lastName = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String email = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String password = null;
+
+
@ApiModelProperty(value = "")
+
+
+
private String phone = null;
+
+
@ApiModelProperty(value = "User Status")
+
/**
* User Status
**/
+
+
+
private Integer userStatus = null;
+
+
+
/**
+
+
* Get id
+
+
+
* @return id
**/
@JsonProperty("id")
+
+
public Long getId() {
return id;
}
+
public void setId(Long id) {
this.id = id;
}
@@ -57,16 +117,28 @@ public User id(Long id) {
this.id = id;
return this;
}
+
+
+
+
/**
+
+
* Get username
+
+
+
* @return username
**/
@JsonProperty("username")
+
+
public String getUsername() {
return username;
}
+
public void setUsername(String username) {
this.username = username;
}
@@ -75,16 +147,28 @@ public User username(String username) {
this.username = username;
return this;
}
+
+
+
+
/**
+
+
* Get firstName
+
+
+
* @return firstName
**/
@JsonProperty("firstName")
+
+
public String getFirstName() {
return firstName;
}
+
public void setFirstName(String firstName) {
this.firstName = firstName;
}
@@ -93,16 +177,28 @@ public User firstName(String firstName) {
this.firstName = firstName;
return this;
}
+
+
+
+
/**
+
+
* Get lastName
+
+
+
* @return lastName
**/
@JsonProperty("lastName")
+
+
public String getLastName() {
return lastName;
}
+
public void setLastName(String lastName) {
this.lastName = lastName;
}
@@ -111,16 +207,28 @@ public User lastName(String lastName) {
this.lastName = lastName;
return this;
}
+
+
+
+
/**
+
+
* Get email
+
+
+
* @return email
**/
@JsonProperty("email")
+
+
public String getEmail() {
return email;
}
+
public void setEmail(String email) {
this.email = email;
}
@@ -129,16 +237,28 @@ public User email(String email) {
this.email = email;
return this;
}
+
+
+
+
/**
+
+
* Get password
+
+
+
* @return password
**/
@JsonProperty("password")
+
+
public String getPassword() {
return password;
}
+
public void setPassword(String password) {
this.password = password;
}
@@ -147,16 +267,28 @@ public User password(String password) {
this.password = password;
return this;
}
+
+
+
+
/**
+
+
* Get phone
+
+
+
* @return phone
**/
@JsonProperty("phone")
+
+
public String getPhone() {
return phone;
}
+
public void setPhone(String phone) {
this.phone = phone;
}
@@ -165,16 +297,28 @@ public User phone(String phone) {
this.phone = phone;
return this;
}
+
+
+
+
/**
+
* User Status
+
+
+
+
* @return userStatus
**/
@JsonProperty("userStatus")
+
+
public Integer getUserStatus() {
return userStatus;
}
+
public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}
@@ -183,7 +327,11 @@ public User userStatus(Integer userStatus) {
this.userStatus = userStatus;
return this;
}
+
+
+
+
@Override
public String toString() {
@@ -214,3 +362,6 @@ private static String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/AnotherFakeApiServiceImpl.java
index a162ec64ee7..3d47980624e 100644
--- a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/AnotherFakeApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/AnotherFakeApiServiceImpl.java
@@ -3,6 +3,7 @@
import io.swagger.api.*;
import io.swagger.model.Client;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -16,24 +17,39 @@
import io.swagger.annotations.Api;
+
+
+
+
/**
* Swagger Petstore
*
+
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
*
*/
+
public class AnotherFakeApiServiceImpl implements AnotherFakeApi {
+
+
+
/**
* To test special tags
*
+
* To test special tags
*
+
*/
- public Client testSpecialTags(Client body) {
+
+ public Client testSpecialTags(Client client) {
// TODO: Implement...
return null;
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java
index 9f0c36bd52d..60403db69fe 100644
--- a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java
@@ -3,10 +3,9 @@
import io.swagger.api.*;
import java.math.BigDecimal;
import io.swagger.model.Client;
-import java.util.Date;
-import org.joda.time.LocalDate;
import io.swagger.model.OuterComposite;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -20,96 +19,133 @@
import io.swagger.annotations.Api;
+
+
+
+
/**
* Swagger Petstore
*
+
*
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
*
*/
+
public class FakeApiServiceImpl implements FakeApi {
+
+
+
public Boolean fakeOuterBooleanSerialize(Boolean body) {
// TODO: Implement...
return null;
}
- public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) {
+
+
+ public OuterComposite fakeOuterCompositeSerialize(OuterComposite outercomposite) {
// TODO: Implement...
return null;
}
+
+
public BigDecimal fakeOuterNumberSerialize(BigDecimal body) {
// TODO: Implement...
return null;
}
+
+
public String fakeOuterStringSerialize(String body) {
// TODO: Implement...
return null;
}
+
+
/**
* To test \"client\" model
*
+
* To test \"client\" model
*
+
*/
- public Client testClientModel(Client body) {
+
+ public Client testClientModel(Client client) {
// TODO: Implement...
return null;
}
+
+
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
+
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
+
*/
- public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, Date dateTime, String password, String paramCallback) {
+
+ public void testEndpointParameters(Object body) {
// TODO: Implement...
}
+
+
/**
* To test enum parameters
*
+
* To test enum parameters
*
+
*/
- public void testEnumParameters(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) {
+
+ public void testEnumParameters(Object body, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger) {
// TODO: Implement...
}
+
+
/**
* test inline additionalProperties
*
- *
- *
+
*/
- public void testInlineAdditionalProperties(Object param) {
+
+ public void testInlineAdditionalProperties(Map body) {
// TODO: Implement...
}
+
+
/**
* test json serialization of form data
*
- *
- *
+
*/
- public void testJsonFormData(String param, String param2) {
+
+ public void testJsonFormData(Object body) {
// TODO: Implement...
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/FakeClassnameTags123ApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/FakeClassnameTags123ApiServiceImpl.java
index ad3f555af97..97bd0a430c3 100644
--- a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/FakeClassnameTags123ApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/FakeClassnameTags123ApiServiceImpl.java
@@ -3,6 +3,7 @@
import io.swagger.api.*;
import io.swagger.model.Client;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -16,22 +17,36 @@
import io.swagger.annotations.Api;
+
+
+
+
/**
* Swagger Petstore
*
+
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
*
*/
+
public class FakeClassnameTags123ApiServiceImpl implements FakeClassnameTags123Api {
+
+
+
/**
* To test class name in snake case
*
+
*/
- public Client testClassname(Client body) {
+
+ public Client testClassname(Client client) {
// TODO: Implement...
return null;
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
index 439daacb1b2..9f6e6b230e4 100644
--- a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
@@ -1,10 +1,10 @@
package io.swagger.api.impl;
import io.swagger.api.*;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -18,108 +18,143 @@
import io.swagger.annotations.Api;
+
+
+
+
/**
* Swagger Petstore
*
+
*
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
*
*/
+
public class PetApiServiceImpl implements PetApi {
+
+
+
/**
* Add a new pet to the store
*
- *
- *
+
*/
- public void addPet(Pet body) {
+
+ public void addPet(Pet pet) {
// TODO: Implement...
}
+
+
/**
* Deletes a pet
*
- *
- *
+
*/
- public void deletePet(Long petId, String apiKey) {
+
+ public void deletePet(Integer petId, String apiKey) {
// TODO: Implement...
}
+
+
/**
* Finds Pets by status
*
+
* Multiple status values can be provided with comma separated strings
*
+
*/
+
public List findPetsByStatus(List status) {
// TODO: Implement...
return null;
}
+
+
/**
* Finds Pets by tags
*
+
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
*
+
*/
+
public List findPetsByTags(List tags) {
// TODO: Implement...
return null;
}
+
+
/**
* Find pet by ID
*
+
* Returns a single pet
*
+
*/
- public Pet getPetById(Long petId) {
+
+ public Pet getPetById(Integer petId) {
// TODO: Implement...
return null;
}
+
+
/**
* Update an existing pet
*
- *
- *
+
*/
- public void updatePet(Pet body) {
+
+ public void updatePet(Pet pet) {
// TODO: Implement...
}
+
+
/**
* Updates a pet in the store with form data
*
- *
- *
+
*/
- public void updatePetWithForm(Long petId, String name, String status) {
+
+ public void updatePetWithForm(Integer petId, Object body) {
// TODO: Implement...
}
+
+
/**
* uploads an image
*
- *
- *
+
*/
- public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Attachment fileDetail) {
+
+ public ModelApiResponse uploadFile(Integer petId, Object body) {
// TODO: Implement...
return null;
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
index 546d096399b..fd95f0a1696 100644
--- a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
@@ -4,6 +4,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -17,60 +18,87 @@
import io.swagger.annotations.Api;
+
+
+
+
/**
* Swagger Petstore
*
+
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
*
*/
+
public class StoreApiServiceImpl implements StoreApi {
+
+
+
/**
* Delete purchase order by ID
*
+
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
*
+
*/
+
public void deleteOrder(String orderId) {
// TODO: Implement...
}
+
+
/**
* Returns pet inventories by status
*
+
* Returns a map of status codes to quantities
*
+
*/
+
public Map getInventory() {
// TODO: Implement...
return null;
}
+
+
/**
* Find purchase order by ID
*
+
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
*
+
*/
- public Order getOrderById(Long orderId) {
+
+ public Order getOrderById(Integer orderId) {
// TODO: Implement...
return null;
}
+
+
/**
* Place an order for a pet
*
- *
- *
+
*/
- public Order placeOrder(Order body) {
+
+ public Order placeOrder(Order order) {
// TODO: Implement...
return null;
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
index 363a42dad0e..5e8cb562c12 100644
--- a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
@@ -1,9 +1,9 @@
package io.swagger.api.impl;
import io.swagger.api.*;
-import java.util.List;
import io.swagger.model.User;
+
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
@@ -17,108 +17,143 @@
import io.swagger.annotations.Api;
+
+
+
+
/**
* Swagger Petstore
*
+
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
*
*/
+
public class UserApiServiceImpl implements UserApi {
+
+
+
/**
* Create user
*
+
* This can only be done by the logged in user.
*
+
*/
- public void createUser(User body) {
+
+ public void createUser(User user) {
// TODO: Implement...
}
+
+
/**
* Creates list of users with given input array
*
- *
- *
+
*/
+
public void createUsersWithArrayInput(List body) {
// TODO: Implement...
}
+
+
/**
* Creates list of users with given input array
*
- *
- *
+
*/
+
public void createUsersWithListInput(List body) {
// TODO: Implement...
}
+
+
/**
* Delete user
*
+
* This can only be done by the logged in user.
*
+
*/
+
public void deleteUser(String username) {
// TODO: Implement...
}
+
+
/**
* Get user by user name
*
- *
- *
+
*/
+
public User getUserByName(String username) {
// TODO: Implement...
return null;
}
+
+
/**
* Logs user into the system
*
- *
- *
+
*/
+
public String loginUser(String username, String password) {
// TODO: Implement...
return null;
}
+
+
/**
* Logs out current logged in user session
*
- *
- *
+
*/
+
public void logoutUser() {
// TODO: Implement...
}
+
+
/**
* Updated user
*
+
* This can only be done by the logged in user.
*
+
*/
- public void updateUser(String username, User body) {
+
+ public void updateUser(User user, String username) {
// TODO: Implement...
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/AnotherFakeApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/AnotherFakeApiTest.java
index 85670e19231..49a05d49a7d 100644
--- a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/AnotherFakeApiTest.java
+++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/AnotherFakeApiTest.java
@@ -26,6 +26,7 @@
package io.swagger.api;
import io.swagger.model.Client;
+
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@@ -36,8 +37,11 @@
import org.apache.cxf.jaxrs.client.WebClient;
+
+
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -46,11 +50,23 @@
+
+
/**
- * API tests for AnotherFakeApi
+
+ * Swagger Petstore
+ *
+
+
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+
+ * API tests for AnotherFakeApi
*/
+
public class AnotherFakeApiTest {
+
private AnotherFakeApi api;
@@ -60,25 +76,36 @@ public void setup() {
List providers = new ArrayList();
providers.add(provider);
+
+
api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", AnotherFakeApi.class, providers);
+
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
ClientConfiguration config = WebClient.getConfig(client);
+
+
}
/**
+
* To test special tags
*
+
* To test special tags
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void testSpecialTagsTest() {
- Client body = null;
- //Client response = api.testSpecialTags(body);
+
+ Client client = null;
+
+ //Client response = api.testSpecialTags(client);
//assertNotNull(response);
// TODO: test validations
diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeApiTest.java
index 20334be9858..a79b9cfb3f7 100644
--- a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeApiTest.java
+++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeApiTest.java
@@ -27,8 +27,8 @@
import java.math.BigDecimal;
import io.swagger.model.Client;
-import java.util.Date;
-import org.joda.time.LocalDate;
+import io.swagger.model.OuterComposite;
+
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@@ -39,8 +39,11 @@
import org.apache.cxf.jaxrs.client.WebClient;
+
+
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -49,11 +52,23 @@
+
+
/**
- * API tests for FakeApi
+
+ * Swagger Petstore
+ *
+
+
+ *
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+
+ * API tests for FakeApi
*/
+
public class FakeApiTest {
+
private FakeApi api;
@@ -63,25 +78,104 @@ public void setup() {
List providers = new ArrayList();
providers.add(provider);
- api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", FakeApi.class, providers);
+
+
+ api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", FakeApi.class, providers);
+
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
ClientConfiguration config = WebClient.getConfig(client);
+
+
}
/**
+
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void fakeOuterBooleanSerializeTest() {
+
+ Boolean body = null;
+
+ //Boolean response = api.fakeOuterBooleanSerialize(body);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void fakeOuterCompositeSerializeTest() {
+
+ OuterComposite outercomposite = null;
+
+ //OuterComposite response = api.fakeOuterCompositeSerialize(outercomposite);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void fakeOuterNumberSerializeTest() {
+
+ BigDecimal body = null;
+
+ //BigDecimal response = api.fakeOuterNumberSerialize(body);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void fakeOuterStringSerializeTest() {
+
+ String body = null;
+
+ //String response = api.fakeOuterStringSerialize(body);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+
* To test \"client\" model
*
+
* To test \"client\" model
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void testClientModelTest() {
- Client body = null;
- //Client response = api.testClientModel(body);
+
+ Client client = null;
+
+ //Client response = api.testClientModel(client);
//assertNotNull(response);
// TODO: test validations
@@ -89,30 +183,23 @@ public void testClientModelTest() {
}
/**
+
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
+
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void testEndpointParametersTest() {
- BigDecimal number = null;
- Double _double = null;
- String patternWithoutDelimiter = null;
- byte[] _byte = null;
- Integer integer = null;
- Integer int32 = null;
- Long int64 = null;
- Float _float = null;
- String string = null;
- byte[] binary = null;
- LocalDate date = null;
- Date dateTime = null;
- String password = null;
- String paramCallback = null;
- //api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
+
+ Object body = null;
+
+ //api.testEndpointParameters(body);
// TODO: test validations
@@ -120,24 +207,75 @@ public void testEndpointParametersTest() {
}
/**
+
* To test enum parameters
*
+
* To test enum parameters
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void testEnumParametersTest() {
- List enumFormStringArray = null;
- String enumFormString = null;
+
+ Object body = null;
+
List enumHeaderStringArray = null;
+
String enumHeaderString = null;
+
List enumQueryStringArray = null;
+
String enumQueryString = null;
+
Integer enumQueryInteger = null;
- Double enumQueryDouble = null;
- //api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
+
+ //api.testEnumParameters(body, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+
+ * test inline additionalProperties
+ *
+
+
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void testInlineAdditionalPropertiesTest() {
+
+ Map body = null;
+
+ //api.testInlineAdditionalProperties(body);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+
+ * test json serialization of form data
+ *
+
+
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void testJsonFormDataTest() {
+
+ Object body = null;
+
+ //api.testJsonFormData(body);
// TODO: test validations
diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeClassnameTags123ApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeClassnameTags123ApiTest.java
index 0cbd5df920a..f12085d8ea7 100644
--- a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeClassnameTags123ApiTest.java
+++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeClassnameTags123ApiTest.java
@@ -26,6 +26,7 @@
package io.swagger.api;
import io.swagger.model.Client;
+
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@@ -36,8 +37,11 @@
import org.apache.cxf.jaxrs.client.WebClient;
+
+
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -46,11 +50,23 @@
+
+
/**
- * API tests for FakeClassnameTags123Api
+
+ * Swagger Petstore
+ *
+
+
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+
+ * API tests for FakeClassnameTags123Api
*/
+
public class FakeClassnameTags123ApiTest {
+
private FakeClassnameTags123Api api;
@@ -60,25 +76,33 @@ public void setup() {
List providers = new ArrayList();
providers.add(provider);
- api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", FakeClassnameTags123Api.class, providers);
+
+
+ api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", FakeClassnameTags123Api.class, providers);
+
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
ClientConfiguration config = WebClient.getConfig(client);
+
+
}
/**
+
* To test class name in snake case
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void testClassnameTest() {
- Client body = null;
- //Client response = api.testClassname(body);
+
+ Client client = null;
+
+ //Client response = api.testClassname(client);
//assertNotNull(response);
// TODO: test validations
diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/PetApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/PetApiTest.java
index 444c595b78e..19ecb355882 100644
--- a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/PetApiTest.java
+++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/PetApiTest.java
@@ -25,9 +25,9 @@
package io.swagger.api;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@@ -38,8 +38,11 @@
import org.apache.cxf.jaxrs.client.WebClient;
+
+
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -48,11 +51,23 @@
+
+
/**
- * API tests for PetApi
+
+ * Swagger Petstore
+ *
+
+
+ *
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+
+ * API tests for PetApi
*/
+
public class PetApiTest {
+
private PetApi api;
@@ -62,25 +77,33 @@ public void setup() {
List providers = new ArrayList();
providers.add(provider);
- api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", PetApi.class, providers);
+
+
+ api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", PetApi.class, providers);
+
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
ClientConfiguration config = WebClient.getConfig(client);
+
+
}
/**
+
* Add a new pet to the store
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void addPetTest() {
- Pet body = null;
- //api.addPet(body);
+
+ Pet pet = null;
+
+ //api.addPet(pet);
// TODO: test validations
@@ -88,18 +111,22 @@ public void addPetTest() {
}
/**
+
* Deletes a pet
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void deletePetTest() {
- Long petId = null;
+
+ Integer petId = null;
+
String apiKey = null;
- //api.deletePet(petId, apiKey);
+
+ //api.deletePet(petId, apiKey);
// TODO: test validations
@@ -107,16 +134,22 @@ public void deletePetTest() {
}
/**
+
* Finds Pets by status
*
+
* Multiple status values can be provided with comma separated strings
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void findPetsByStatusTest() {
+
List status = null;
+
//List response = api.findPetsByStatus(status);
//assertNotNull(response);
// TODO: test validations
@@ -125,16 +158,22 @@ public void findPetsByStatusTest() {
}
/**
+
* Finds Pets by tags
*
+
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void findPetsByTagsTest() {
+
List tags = null;
+
//List response = api.findPetsByTags(tags);
//assertNotNull(response);
// TODO: test validations
@@ -143,17 +182,23 @@ public void findPetsByTagsTest() {
}
/**
+
* Find pet by ID
*
+
* Returns a single pet
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void getPetByIdTest() {
- Long petId = null;
- //Pet response = api.getPetById(petId);
+
+ Integer petId = null;
+
+ //Pet response = api.getPetById(petId);
//assertNotNull(response);
// TODO: test validations
@@ -161,17 +206,20 @@ public void getPetByIdTest() {
}
/**
+
* Update an existing pet
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void updatePetTest() {
- Pet body = null;
- //api.updatePet(body);
+
+ Pet pet = null;
+
+ //api.updatePet(pet);
// TODO: test validations
@@ -179,19 +227,22 @@ public void updatePetTest() {
}
/**
+
* Updates a pet in the store with form data
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void updatePetWithFormTest() {
- Long petId = null;
- String name = null;
- String status = null;
- //api.updatePetWithForm(petId, name, status);
+
+ Integer petId = null;
+
+ Object body = null;
+
+ //api.updatePetWithForm(petId, body);
// TODO: test validations
@@ -199,19 +250,22 @@ public void updatePetWithFormTest() {
}
/**
+
* uploads an image
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void uploadFileTest() {
- Long petId = null;
- String additionalMetadata = null;
- org.apache.cxf.jaxrs.ext.multipart.Attachment file = null;
- //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
+
+ Integer petId = null;
+
+ Object body = null;
+
+ //ModelApiResponse response = api.uploadFile(petId, body);
//assertNotNull(response);
// TODO: test validations
diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/StoreApiTest.java
index c0cd10dca71..534172383f9 100644
--- a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/StoreApiTest.java
+++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/StoreApiTest.java
@@ -27,6 +27,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@@ -37,8 +38,11 @@
import org.apache.cxf.jaxrs.client.WebClient;
+
+
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -47,11 +51,23 @@
+
+
/**
- * API tests for StoreApi
+
+ * Swagger Petstore
+ *
+
+
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+
+ * API tests for StoreApi
*/
+
public class StoreApiTest {
+
private StoreApi api;
@@ -61,25 +77,36 @@ public void setup() {
List providers = new ArrayList();
providers.add(provider);
- api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", StoreApi.class, providers);
+
+
+ api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", StoreApi.class, providers);
+
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
ClientConfiguration config = WebClient.getConfig(client);
+
+
}
/**
+
* Delete purchase order by ID
*
+
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void deleteOrderTest() {
+
String orderId = null;
- //api.deleteOrder(orderId);
+
+ //api.deleteOrder(orderId);
// TODO: test validations
@@ -87,15 +114,20 @@ public void deleteOrderTest() {
}
/**
+
* Returns pet inventories by status
*
+
* Returns a map of status codes to quantities
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void getInventoryTest() {
+
//Map response = api.getInventory();
//assertNotNull(response);
// TODO: test validations
@@ -104,17 +136,23 @@ public void getInventoryTest() {
}
/**
+
* Find purchase order by ID
*
+
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void getOrderByIdTest() {
- Long orderId = null;
- //Order response = api.getOrderById(orderId);
+
+ Integer orderId = null;
+
+ //Order response = api.getOrderById(orderId);
//assertNotNull(response);
// TODO: test validations
@@ -122,17 +160,20 @@ public void getOrderByIdTest() {
}
/**
+
* Place an order for a pet
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void placeOrderTest() {
- Order body = null;
- //Order response = api.placeOrder(body);
+
+ Order order = null;
+
+ //Order response = api.placeOrder(order);
//assertNotNull(response);
// TODO: test validations
diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/UserApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/UserApiTest.java
index 2d1481bde34..06ee218039f 100644
--- a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/UserApiTest.java
+++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/UserApiTest.java
@@ -25,8 +25,8 @@
package io.swagger.api;
-import java.util.List;
import io.swagger.model.User;
+
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@@ -37,8 +37,11 @@
import org.apache.cxf.jaxrs.client.WebClient;
+
+
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -47,11 +50,23 @@
+
+
/**
- * API tests for UserApi
+
+ * Swagger Petstore
+ *
+
+
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+
+ * API tests for UserApi
*/
+
public class UserApiTest {
+
private UserApi api;
@@ -61,25 +76,36 @@ public void setup() {
List providers = new ArrayList();
providers.add(provider);
- api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", UserApi.class, providers);
+
+
+ api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", UserApi.class, providers);
+
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
ClientConfiguration config = WebClient.getConfig(client);
+
+
}
/**
+
* Create user
*
+
* This can only be done by the logged in user.
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void createUserTest() {
- User body = null;
- //api.createUser(body);
+
+ User user = null;
+
+ //api.createUser(user);
// TODO: test validations
@@ -87,17 +113,20 @@ public void createUserTest() {
}
/**
+
* Creates list of users with given input array
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void createUsersWithArrayInputTest() {
+
List body = null;
- //api.createUsersWithArrayInput(body);
+
+ //api.createUsersWithArrayInput(body);
// TODO: test validations
@@ -105,17 +134,20 @@ public void createUsersWithArrayInputTest() {
}
/**
+
* Creates list of users with given input array
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void createUsersWithListInputTest() {
+
List body = null;
- //api.createUsersWithListInput(body);
+
+ //api.createUsersWithListInput(body);
// TODO: test validations
@@ -123,17 +155,23 @@ public void createUsersWithListInputTest() {
}
/**
+
* Delete user
*
+
* This can only be done by the logged in user.
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void deleteUserTest() {
+
String username = null;
- //api.deleteUser(username);
+
+ //api.deleteUser(username);
// TODO: test validations
@@ -141,17 +179,20 @@ public void deleteUserTest() {
}
/**
+
* Get user by user name
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void getUserByNameTest() {
+
String username = null;
- //User response = api.getUserByName(username);
+
+ //User response = api.getUserByName(username);
//assertNotNull(response);
// TODO: test validations
@@ -159,18 +200,22 @@ public void getUserByNameTest() {
}
/**
+
* Logs user into the system
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void loginUserTest() {
+
String username = null;
+
String password = null;
- //String response = api.loginUser(username, password);
+
+ //String response = api.loginUser(username, password);
//assertNotNull(response);
// TODO: test validations
@@ -178,16 +223,18 @@ public void loginUserTest() {
}
/**
+
* Logs out current logged in user session
*
- *
- *
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void logoutUserTest() {
- //api.logoutUser();
+
+ //api.logoutUser();
// TODO: test validations
@@ -195,18 +242,25 @@ public void logoutUserTest() {
}
/**
+
* Updated user
*
+
* This can only be done by the logged in user.
*
+
+
* @throws ApiException
* if the Api call fails
*/
@Test
public void updateUserTest() {
+
+ User user = null;
+
String username = null;
- User body = null;
- //api.updateUser(username, body);
+
+ //api.updateUser(user, username);
// TODO: test validations
diff --git a/samples/server/petstore/jaxrs-resteasy/default/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-resteasy/default/.swagger-codegen/VERSION
index 50794f17f1a..096bf47efe3 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/.swagger-codegen/VERSION
+++ b/samples/server/petstore/jaxrs-resteasy/default/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.3.1-SNAPSHOT
\ No newline at end of file
+3.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-resteasy/default/README.md b/samples/server/petstore/jaxrs-resteasy/default/README.md
index cc011c37ee5..b38f859d049 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/README.md
+++ b/samples/server/petstore/jaxrs-resteasy/default/README.md
@@ -16,7 +16,7 @@ mvn clean package jetty:run
You can then view the swagger listing here:
```
-http://localhost:8080/v2/swagger.json
+http://localhost:-1/v2/swagger.json
```
Note that if you have configured the `host` to be something other than localhost, the calls through
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build.gradle b/samples/server/petstore/jaxrs-resteasy/default/build.gradle
index a568dc86c41..33f7797f78c 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/build.gradle
+++ b/samples/server/petstore/jaxrs-resteasy/default/build.gradle
@@ -17,7 +17,9 @@ dependencies {
providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final'
compile 'io.swagger:swagger-annotations:1.5.10'
compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final'
+
providedCompile 'javax.validation:validation-api:1.1.0.Final'
+
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.4.1'
compile 'joda-time:joda-time:2.7'
//TODO: swaggerFeature
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/ApiException.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/ApiException.class
deleted file mode 100644
index 532edd306d7..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/ApiException.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/ApiOriginFilter.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/ApiOriginFilter.class
deleted file mode 100644
index 491891093f1..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/ApiOriginFilter.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/ApiResponseMessage.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/ApiResponseMessage.class
deleted file mode 100644
index 662e2e846f1..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/ApiResponseMessage.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/JacksonConfig$1$1.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/JacksonConfig$1$1.class
deleted file mode 100644
index 9271b6069d1..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/JacksonConfig$1$1.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/JacksonConfig$1$2.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/JacksonConfig$1$2.class
deleted file mode 100644
index 2260a4b19b5..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/JacksonConfig$1$2.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/JacksonConfig$1.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/JacksonConfig$1.class
deleted file mode 100644
index c757c04724e..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/JacksonConfig$1.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/JacksonConfig.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/JacksonConfig.class
deleted file mode 100644
index b4368ff2475..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/JacksonConfig.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/NotFoundException.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/NotFoundException.class
deleted file mode 100644
index cb773657253..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/NotFoundException.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/PetApi.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/PetApi.class
deleted file mode 100644
index 71f34c8625b..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/PetApi.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/PetApiService.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/PetApiService.class
deleted file mode 100644
index 92283312be5..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/PetApiService.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/RFC3339DateFormat.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/RFC3339DateFormat.class
deleted file mode 100644
index 0f5053f2a06..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/RFC3339DateFormat.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/RestApplication.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/RestApplication.class
deleted file mode 100644
index 1bd466b82da..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/RestApplication.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/StoreApi.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/StoreApi.class
deleted file mode 100644
index b132fb09089..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/StoreApi.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/StoreApiService.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/StoreApiService.class
deleted file mode 100644
index da4fd7608fd..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/StoreApiService.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/StringUtil.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/StringUtil.class
deleted file mode 100644
index 72824471def..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/StringUtil.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/UserApi.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/UserApi.class
deleted file mode 100644
index df0b5b337fb..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/UserApi.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/UserApiService.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/UserApiService.class
deleted file mode 100644
index d12b14b2337..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/UserApiService.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/impl/PetApiServiceImpl.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/impl/PetApiServiceImpl.class
deleted file mode 100644
index e36041a5f07..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/impl/PetApiServiceImpl.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/impl/StoreApiServiceImpl.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/impl/StoreApiServiceImpl.class
deleted file mode 100644
index 60fc71759c2..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/impl/StoreApiServiceImpl.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/impl/UserApiServiceImpl.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/impl/UserApiServiceImpl.class
deleted file mode 100644
index 86d82b1e0da..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/api/impl/UserApiServiceImpl.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Category.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Category.class
deleted file mode 100644
index e0d0faed108..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Category.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/ModelApiResponse.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/ModelApiResponse.class
deleted file mode 100644
index df7bdc5bbe7..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/ModelApiResponse.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Order$StatusEnum.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Order$StatusEnum.class
deleted file mode 100644
index 8f111540b87..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Order$StatusEnum.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Order.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Order.class
deleted file mode 100644
index 5aed19284b4..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Order.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Pet$StatusEnum.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Pet$StatusEnum.class
deleted file mode 100644
index 514e6558ae8..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Pet$StatusEnum.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Pet.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Pet.class
deleted file mode 100644
index 88f65946361..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Pet.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Tag.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Tag.class
deleted file mode 100644
index 40027f0aeb7..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/Tag.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/User.class b/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/User.class
deleted file mode 100644
index 253481fbd91..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/classes/main/io/swagger/model/User.class and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/libs/swagger-jaxrs-resteasy-server-1.0.0.war b/samples/server/petstore/jaxrs-resteasy/default/build/libs/swagger-jaxrs-resteasy-server-1.0.0.war
deleted file mode 100644
index 4d6cba4823b..00000000000
Binary files a/samples/server/petstore/jaxrs-resteasy/default/build/libs/swagger-jaxrs-resteasy-server-1.0.0.war and /dev/null differ
diff --git a/samples/server/petstore/jaxrs-resteasy/default/build/tmp/war/MANIFEST.MF b/samples/server/petstore/jaxrs-resteasy/default/build/tmp/war/MANIFEST.MF
deleted file mode 100644
index 59499bce4a2..00000000000
--- a/samples/server/petstore/jaxrs-resteasy/default/build/tmp/war/MANIFEST.MF
+++ /dev/null
@@ -1,2 +0,0 @@
-Manifest-Version: 1.0
-
diff --git a/samples/server/petstore/jaxrs-resteasy/default/pom.xml b/samples/server/petstore/jaxrs-resteasy/default/pom.xml
index 8cbc9358a06..a7e5efb73c5 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/pom.xml
+++ b/samples/server/petstore/jaxrs-resteasy/default/pom.xml
@@ -161,6 +161,7 @@
+
javax.validation
@@ -169,6 +170,7 @@
provided
+
@@ -180,7 +182,7 @@
- 1.5.15
+ 1.5.18
9.2.9.v20150224
3.0.11.Final
1.6.3
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java
index d668c71d237..99a84be948f 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java
@@ -6,10 +6,10 @@
import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import java.util.Map;
import java.util.List;
import io.swagger.api.NotFoundException;
@@ -22,60 +22,50 @@
import javax.ws.rs.*;
import javax.inject.Inject;
+
import javax.validation.constraints.*;
-import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
+
@Path("/pet")
@io.swagger.annotations.Api(description = "the pet API")
+
public class PetApi {
@Inject PetApiService service;
+
@POST
@Consumes({ "application/json", "application/xml" })
- @Produces({ "application/xml", "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+
+ @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
- public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body,@Context SecurityContext securityContext)
+ public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet pet,@Context SecurityContext securityContext)
throws NotFoundException {
- return service.addPet(body,securityContext);
+ return service.addPet(pet,securityContext);
}
+
@DELETE
@Path("/{petId}")
- @Produces({ "application/xml", "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+
+ @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
- public Response deletePet( @PathParam("petId") Long petId,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext)
+ public Response deletePet( @PathParam("petId") Integer petId,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext)
throws NotFoundException {
return service.deletePet(petId,apiKey,securityContext);
}
+
@GET
@Path("/findByStatus")
@Produces({ "application/xml", "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+ @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@@ -84,16 +74,12 @@ public Response findPetsByStatus( @NotNull @QueryParam("status") List s
throws NotFoundException {
return service.findPetsByStatus(status,securityContext);
}
+
@GET
@Path("/findByTags")
@Produces({ "application/xml", "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+ @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@@ -102,73 +88,62 @@ public Response findPetsByTags( @NotNull @QueryParam("tags") List tags,
throws NotFoundException {
return service.findPetsByTags(tags,securityContext);
}
+
@GET
@Path("/{petId}")
@Produces({ "application/xml", "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "api_key")
- }, tags={ "pet", })
+ @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class) })
- public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext)
+ public Response getPetById( @PathParam("petId") Integer petId,@Context SecurityContext securityContext)
throws NotFoundException {
return service.getPetById(petId,securityContext);
}
+
@PUT
@Consumes({ "application/json", "application/xml" })
- @Produces({ "application/xml", "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+
+ @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
- public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body,@Context SecurityContext securityContext)
+ public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet pet,@Context SecurityContext securityContext)
throws NotFoundException {
- return service.updatePet(body,securityContext);
+ return service.updatePet(pet,securityContext);
}
+
@POST
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" })
- @Produces({ "application/xml", "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+
+ @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
- public Response updatePetWithForm( @PathParam("petId") Long petId,@ApiParam(value = "Updated name of the pet")@FormParam("name") String name,@ApiParam(value = "Updated status of the pet")@FormParam("status") String status,@Context SecurityContext securityContext)
+ public Response updatePetWithForm( @PathParam("petId") Integer petId,@ApiParam(value = "" ) Object body,@Context SecurityContext securityContext)
throws NotFoundException {
- return service.updatePetWithForm(petId,name,status,securityContext);
+ return service.updatePetWithForm(petId,body,securityContext);
}
+
@POST
@Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
- @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+ @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- public Response uploadFile(MultipartFormDataInput input, @PathParam("petId") Long petId,@Context SecurityContext securityContext)
+ public Response uploadFile( @PathParam("petId") Integer petId,@ApiParam(value = "" ) Object body,@Context SecurityContext securityContext)
throws NotFoundException {
- return service.uploadFile(input,petId,securityContext);
+ return service.uploadFile(petId,body,securityContext);
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java
index 5b44f5d18b9..d738a5e1a11 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java
@@ -2,13 +2,12 @@
import io.swagger.api.*;
import io.swagger.model.*;
-import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import java.util.List;
import io.swagger.api.NotFoundException;
@@ -18,21 +17,32 @@
import javax.ws.rs.core.SecurityContext;
+
public interface PetApiService {
- Response addPet(Pet body,SecurityContext securityContext)
+
+ Response addPet(Pet pet,SecurityContext securityContext)
throws NotFoundException;
- Response deletePet(Long petId,String apiKey,SecurityContext securityContext)
+
+ Response deletePet(Integer petId,String apiKey,SecurityContext securityContext)
throws NotFoundException;
+
Response findPetsByStatus(List status,SecurityContext securityContext)
throws NotFoundException;
+
Response findPetsByTags(List tags,SecurityContext securityContext)
throws NotFoundException;
- Response getPetById(Long petId,SecurityContext securityContext)
+
+ Response getPetById(Integer petId,SecurityContext securityContext)
throws NotFoundException;
- Response updatePet(Pet body,SecurityContext securityContext)
+
+ Response updatePet(Pet pet,SecurityContext securityContext)
throws NotFoundException;
- Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext)
+
+ Response updatePetWithForm(Integer petId,Object body,SecurityContext securityContext)
throws NotFoundException;
- Response uploadFile(MultipartFormDataInput input,Long petId,SecurityContext securityContext)
+
+ Response uploadFile(Integer petId,Object body,SecurityContext securityContext)
throws NotFoundException;
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApi.java
index 6b3a6cc3a07..de9b83c28bb 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApi.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApi.java
@@ -9,6 +9,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import java.util.Map;
import java.util.List;
import io.swagger.api.NotFoundException;
@@ -21,21 +22,25 @@
import javax.ws.rs.*;
import javax.inject.Inject;
+
import javax.validation.constraints.*;
+
@Path("/store")
@io.swagger.annotations.Api(description = "the store API")
+
public class StoreApi {
@Inject StoreApiService service;
+
@DELETE
@Path("/order/{orderId}")
- @Produces({ "application/xml", "application/json" })
+
@io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@@ -45,19 +50,19 @@ public Response deleteOrder( @PathParam("orderId") String orderId,@Context Secur
throws NotFoundException {
return service.deleteOrder(orderId,securityContext);
}
+
@GET
@Path("/inventory")
@Produces({ "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
- @io.swagger.annotations.Authorization(value = "api_key")
- }, tags={ "store", })
+ @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", tags={ "store", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Response getInventory(@Context SecurityContext securityContext)
throws NotFoundException {
return service.getInventory(securityContext);
}
+
@GET
@Path("/order/{orderId}")
@@ -69,21 +74,24 @@ public Response getInventory(@Context SecurityContext securityContext)
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) })
- public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext)
+ public Response getOrderById( @DecimalMin("1") @DecimalMax("5") @PathParam("orderId") Integer orderId,@Context SecurityContext securityContext)
throws NotFoundException {
return service.getOrderById(orderId,securityContext);
}
+
@POST
@Path("/order")
-
+ @Consumes({ "*/*" })
@Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
- public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body,@Context SecurityContext securityContext)
+ public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order order,@Context SecurityContext securityContext)
throws NotFoundException {
- return service.placeOrder(body,securityContext);
+ return service.placeOrder(order,securityContext);
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApiService.java
index 46958ea45c4..de964599520 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApiService.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApiService.java
@@ -7,6 +7,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import java.util.List;
import io.swagger.api.NotFoundException;
@@ -16,13 +17,20 @@
import javax.ws.rs.core.SecurityContext;
+
public interface StoreApiService {
+
Response deleteOrder(String orderId,SecurityContext securityContext)
throws NotFoundException;
+
Response getInventory(SecurityContext securityContext)
throws NotFoundException;
- Response getOrderById(Long orderId,SecurityContext securityContext)
+
+ Response getOrderById(Integer orderId,SecurityContext securityContext)
throws NotFoundException;
- Response placeOrder(Order body,SecurityContext securityContext)
+
+ Response placeOrder(Order order,SecurityContext securityContext)
throws NotFoundException;
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApi.java
index 30d8e9bae59..179c0626973 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApi.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApi.java
@@ -6,9 +6,9 @@
import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*;
-import java.util.List;
import io.swagger.model.User;
+
import java.util.Map;
import java.util.List;
import io.swagger.api.NotFoundException;
@@ -21,32 +21,37 @@
import javax.ws.rs.*;
import javax.inject.Inject;
+
import javax.validation.constraints.*;
+
@Path("/user")
@io.swagger.annotations.Api(description = "the user API")
+
public class UserApi {
@Inject UserApiService service;
+
@POST
+ @Consumes({ "*/*" })
- @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
- public Response createUser(@ApiParam(value = "Created user object" ,required=true) User body,@Context SecurityContext securityContext)
+ public Response createUser(@ApiParam(value = "Created user object" ,required=true) User user,@Context SecurityContext securityContext)
throws NotFoundException {
- return service.createUser(body,securityContext);
+ return service.createUser(user,securityContext);
}
+
@POST
@Path("/createWithArray")
+ @Consumes({ "*/*" })
- @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@@ -54,10 +59,11 @@ public Response createUsersWithArrayInput(@ApiParam(value = "List of user object
throws NotFoundException {
return service.createUsersWithArrayInput(body,securityContext);
}
+
@POST
@Path("/createWithList")
+ @Consumes({ "*/*" })
- @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@@ -65,10 +71,11 @@ public Response createUsersWithListInput(@ApiParam(value = "List of user object"
throws NotFoundException {
return service.createUsersWithListInput(body,securityContext);
}
+
@DELETE
@Path("/{username}")
- @Produces({ "application/xml", "application/json" })
+
@io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@@ -78,6 +85,7 @@ public Response deleteUser( @PathParam("username") String username,@Context Secu
throws NotFoundException {
return service.deleteUser(username,securityContext);
}
+
@GET
@Path("/{username}")
@@ -93,6 +101,7 @@ public Response getUserByName( @PathParam("username") String username,@Context S
throws NotFoundException {
return service.getUserByName(username,securityContext);
}
+
@GET
@Path("/login")
@@ -106,10 +115,11 @@ public Response loginUser( @NotNull @QueryParam("username") String username, @N
throws NotFoundException {
return service.loginUser(username,password,securityContext);
}
+
@GET
@Path("/logout")
- @Produces({ "application/xml", "application/json" })
+
@io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@@ -117,17 +127,20 @@ public Response logoutUser(@Context SecurityContext securityContext)
throws NotFoundException {
return service.logoutUser(securityContext);
}
+
@PUT
@Path("/{username}")
+ @Consumes({ "*/*" })
- @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
- public Response updateUser( @PathParam("username") String username,@ApiParam(value = "Updated user object" ,required=true) User body,@Context SecurityContext securityContext)
+ public Response updateUser(@ApiParam(value = "Updated user object" ,required=true) User user, @PathParam("username") String username,@Context SecurityContext securityContext)
throws NotFoundException {
- return service.updateUser(username,body,securityContext);
+ return service.updateUser(user,username,securityContext);
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApiService.java
index 54f5d5c105f..f5068f387d2 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApiService.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApiService.java
@@ -4,9 +4,9 @@
import io.swagger.model.*;
-import java.util.List;
import io.swagger.model.User;
+
import java.util.List;
import io.swagger.api.NotFoundException;
@@ -16,21 +16,32 @@
import javax.ws.rs.core.SecurityContext;
+
public interface UserApiService {
- Response createUser(User body,SecurityContext securityContext)
+
+ Response createUser(User user,SecurityContext securityContext)
throws NotFoundException;
+
Response createUsersWithArrayInput(List body,SecurityContext securityContext)
throws NotFoundException;
+
Response createUsersWithListInput(List body,SecurityContext securityContext)
throws NotFoundException;
+
Response deleteUser(String username,SecurityContext securityContext)
throws NotFoundException;
+
Response getUserByName(String username,SecurityContext securityContext)
throws NotFoundException;
+
Response loginUser(String username,String password,SecurityContext securityContext)
throws NotFoundException;
+
Response logoutUser(SecurityContext securityContext)
throws NotFoundException;
- Response updateUser(String username,User body,SecurityContext securityContext)
+
+ Response updateUser(User user,String username,SecurityContext securityContext)
throws NotFoundException;
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java
index 85fdecdc662..6458c75a81b 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java
@@ -5,21 +5,35 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
+
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.*;
@ApiModel(description="A category for a pet")
public class Category {
+
private Long id = null;
private String name = null;
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("id")
+
public Long getId() {
return id;
}
@@ -27,11 +41,16 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("name")
+
public String getName() {
return name;
}
@@ -39,6 +58,7 @@ public void setName(String name) {
this.name = name;
}
+
@Override
public boolean equals(java.lang.Object o) {
@@ -81,3 +101,6 @@ private String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java
index 9a9ff0db8cd..0e5fb3475db 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java
@@ -5,22 +5,36 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
+
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.*;
@ApiModel(description="Describes the result of uploading an image resource")
public class ModelApiResponse {
+
private Integer code = null;
private String type = null;
private String message = null;
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("code")
+
public Integer getCode() {
return code;
}
@@ -28,11 +42,16 @@ public void setCode(Integer code) {
this.code = code;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("type")
+
public String getType() {
return type;
}
@@ -40,11 +59,16 @@ public void setType(String type) {
this.type = type;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("message")
+
public String getMessage() {
return message;
}
@@ -52,6 +76,7 @@ public void setMessage(String message) {
this.message = message;
}
+
@Override
public boolean equals(java.lang.Object o) {
@@ -96,3 +121,6 @@ private String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java
index 2f62263c9d3..de4051f9fc8 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java
@@ -7,12 +7,21 @@
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import java.util.Date;
+
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.*;
@ApiModel(description="An order for a pets from the pet store")
public class Order {
+
private Long id = null;
private Long petId = null;
@@ -23,11 +32,20 @@ public class Order {
* Order Status
*/
public enum StatusEnum {
+
+
PLACED("placed"),
- APPROVED("approved"),
+
+
+ APPROVED("approved"),
- DELIVERED("delivered");
+
+
+ DELIVERED("delivered");
+
+
+
private String value;
StatusEnum(String value) {
@@ -44,11 +62,16 @@ public String toString() {
private StatusEnum status = null;
private Boolean complete = false;
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("id")
+
public Long getId() {
return id;
}
@@ -56,11 +79,16 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("petId")
+
public Long getPetId() {
return petId;
}
@@ -68,11 +96,16 @@ public void setPetId(Long petId) {
this.petId = petId;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("quantity")
+
public Integer getQuantity() {
return quantity;
}
@@ -80,11 +113,16 @@ public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("shipDate")
+
public Date getShipDate() {
return shipDate;
}
@@ -92,12 +130,18 @@ public void setShipDate(Date shipDate) {
this.shipDate = shipDate;
}
+
/**
+
* Order Status
+
+
+
**/
@ApiModelProperty(value = "Order Status")
@JsonProperty("status")
+
public StatusEnum getStatus() {
return status;
}
@@ -105,18 +149,24 @@ public void setStatus(StatusEnum status) {
this.status = status;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("complete")
- public Boolean isComplete() {
+
+ public Boolean isisComplete() {
return complete;
}
public void setComplete(Boolean complete) {
this.complete = complete;
}
+
@Override
public boolean equals(java.lang.Object o) {
@@ -167,3 +217,6 @@ private String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java
index 4e48fb253b1..a6bf78bd1f7 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java
@@ -9,12 +9,21 @@
import io.swagger.model.Category;
import io.swagger.model.Tag;
import java.util.List;
+
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.*;
@ApiModel(description="A pet for sale in the pet store")
public class Pet {
+
private Long id = null;
private Category category = null;
@@ -26,11 +35,20 @@ public class Pet {
* pet status in the store
*/
public enum StatusEnum {
+
+
AVAILABLE("available"),
- PENDING("pending"),
+
+
+ PENDING("pending"),
- SOLD("sold");
+
+
+ SOLD("sold");
+
+
+
private String value;
StatusEnum(String value) {
@@ -46,11 +64,16 @@ public String toString() {
private StatusEnum status = null;
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("id")
+
public Long getId() {
return id;
}
@@ -58,11 +81,16 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("category")
+
public Category getCategory() {
return category;
}
@@ -70,12 +98,18 @@ public void setCategory(Category category) {
this.category = category;
}
+
/**
+
+
+
**/
@ApiModelProperty(example = "doggie", required = true, value = "")
@JsonProperty("name")
+
@NotNull
+
public String getName() {
return name;
}
@@ -83,12 +117,18 @@ public void setName(String name) {
this.name = name;
}
+
/**
+
+
+
**/
@ApiModelProperty(required = true, value = "")
@JsonProperty("photoUrls")
+
@NotNull
+
public List getPhotoUrls() {
return photoUrls;
}
@@ -96,11 +136,16 @@ public void setPhotoUrls(List photoUrls) {
this.photoUrls = photoUrls;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("tags")
+
public List getTags() {
return tags;
}
@@ -108,12 +153,18 @@ public void setTags(List tags) {
this.tags = tags;
}
+
/**
+
* pet status in the store
+
+
+
**/
@ApiModelProperty(value = "pet status in the store")
@JsonProperty("status")
+
public StatusEnum getStatus() {
return status;
}
@@ -121,6 +172,7 @@ public void setStatus(StatusEnum status) {
this.status = status;
}
+
@Override
public boolean equals(java.lang.Object o) {
@@ -171,3 +223,6 @@ private String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java
index 750e1a82b1e..8799d74474f 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java
@@ -5,21 +5,35 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
+
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.*;
@ApiModel(description="A tag for a pet")
public class Tag {
+
private Long id = null;
private String name = null;
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("id")
+
public Long getId() {
return id;
}
@@ -27,11 +41,16 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("name")
+
public String getName() {
return name;
}
@@ -39,6 +58,7 @@ public void setName(String name) {
this.name = name;
}
+
@Override
public boolean equals(java.lang.Object o) {
@@ -81,3 +101,6 @@ private String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java
index a52524db22a..c3ef44a581a 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java
@@ -5,12 +5,21 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
+
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.*;
@ApiModel(description="A User who is purchasing from the pet store")
public class User {
+
private Long id = null;
private String username = null;
@@ -21,11 +30,16 @@ public class User {
private String phone = null;
private Integer userStatus = null;
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("id")
+
public Long getId() {
return id;
}
@@ -33,11 +47,16 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("username")
+
public String getUsername() {
return username;
}
@@ -45,11 +64,16 @@ public void setUsername(String username) {
this.username = username;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("firstName")
+
public String getFirstName() {
return firstName;
}
@@ -57,11 +81,16 @@ public void setFirstName(String firstName) {
this.firstName = firstName;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("lastName")
+
public String getLastName() {
return lastName;
}
@@ -69,11 +98,16 @@ public void setLastName(String lastName) {
this.lastName = lastName;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("email")
+
public String getEmail() {
return email;
}
@@ -81,11 +115,16 @@ public void setEmail(String email) {
this.email = email;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("password")
+
public String getPassword() {
return password;
}
@@ -93,11 +132,16 @@ public void setPassword(String password) {
this.password = password;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("phone")
+
public String getPhone() {
return phone;
}
@@ -105,12 +149,18 @@ public void setPhone(String phone) {
this.phone = phone;
}
+
/**
+
* User Status
+
+
+
**/
@ApiModelProperty(value = "User Status")
@JsonProperty("userStatus")
+
public Integer getUserStatus() {
return userStatus;
}
@@ -118,6 +168,7 @@ public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}
+
@Override
public boolean equals(java.lang.Object o) {
@@ -172,3 +223,6 @@ private String toIndentedString(java.lang.Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
index d8f13b40060..616bd0a25dc 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
@@ -2,13 +2,12 @@
import io.swagger.api.*;
import io.swagger.model.*;
-import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import java.util.List;
import io.swagger.api.NotFoundException;
@@ -20,45 +19,56 @@
@RequestScoped
+
public class PetApiServiceImpl implements PetApiService {
- public Response addPet(Pet body,SecurityContext securityContext)
+
+ public Response addPet(Pet pet,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
- public Response deletePet(Long petId,String apiKey,SecurityContext securityContext)
+
+ public Response deletePet(Integer petId,String apiKey,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
+
public Response findPetsByStatus(List status,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
+
public Response findPetsByTags(List tags,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
- public Response getPetById(Long petId,SecurityContext securityContext)
+
+ public Response getPetById(Integer petId,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
- public Response updatePet(Pet body,SecurityContext securityContext)
+
+ public Response updatePet(Pet pet,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
- public Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext)
+
+ public Response updatePetWithForm(Integer petId,Object body,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
- public Response uploadFile(MultipartFormDataInput input,Long petId,SecurityContext securityContext)
+
+ public Response uploadFile(Integer petId,Object body,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
index edbf993ef74..852ca3e6ec5 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
@@ -7,6 +7,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import java.util.List;
import io.swagger.api.NotFoundException;
@@ -18,25 +19,32 @@
@RequestScoped
+
public class StoreApiServiceImpl implements StoreApiService {
+
public Response deleteOrder(String orderId,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
+
public Response getInventory(SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
- public Response getOrderById(Long orderId,SecurityContext securityContext)
+
+ public Response getOrderById(Integer orderId,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
- public Response placeOrder(Order body,SecurityContext securityContext)
+
+ public Response placeOrder(Order order,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
index a0d5982520a..0ae2e9ac794 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
@@ -4,9 +4,9 @@
import io.swagger.model.*;
-import java.util.List;
import io.swagger.model.User;
+
import java.util.List;
import io.swagger.api.NotFoundException;
@@ -18,45 +18,56 @@
@RequestScoped
+
public class UserApiServiceImpl implements UserApiService {
- public Response createUser(User body,SecurityContext securityContext)
+
+ public Response createUser(User user,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
+
public Response createUsersWithArrayInput(List body,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
+
public Response createUsersWithListInput(List body,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
+
public Response deleteUser(String username,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
+
public Response getUserByName(String username,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
+
public Response loginUser(String username,String password,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
+
public Response logoutUser(SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
- public Response updateUser(String username,User body,SecurityContext securityContext)
+
+ public Response updateUser(User user,String username,SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-java8/.swagger-codegen/VERSION
index 50794f17f1a..096bf47efe3 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.swagger-codegen/VERSION
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.3.1-SNAPSHOT
\ No newline at end of file
+3.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/README.md b/samples/server/petstore/jaxrs-resteasy/eap-java8/README.md
index 499909ec874..30bfb068a61 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/README.md
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/README.md
@@ -12,7 +12,7 @@ You can deploy the WAR file to Jboss EAP or any other JEE server supporting Jbos
You can then view the swagger listing here:
```
-http://localhost:8080/v2/swagger.json
+http://localhost:-1/v2/swagger.json
```
Note that if you have configured the `host` to be something other than localhost, the calls through
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle
index e189fe88dfb..cd3a7906c19 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle
@@ -15,8 +15,13 @@ dependencies {
providedCompile 'javax.annotation:javax.annotation-api:1.2'
providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final'
compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final'
+
providedCompile 'javax.validation:validation-api:1.1.0.Final'
+
+
+
compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.6.3'
+
testCompile 'junit:junit:4.12',
'org.hamcrest:hamcrest-core:1.3'
}
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml b/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml
index 1edeb42aa1c..35de0eae9af 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml
@@ -138,6 +138,7 @@
+
javax.validation
@@ -145,11 +146,15 @@
1.1.0.Final
provided
+
+
+
com.fasterxml.jackson.datatype
jackson-datatype-jsr310
2.6.3
+
@@ -162,7 +167,7 @@
- 1.5.15
+ 1.5.18
9.2.9.v20150224
3.0.11.Final
1.6.3
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/PetApi.java
index fafe4a5b85c..e12a0c7baf5 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/PetApi.java
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/PetApi.java
@@ -5,10 +5,10 @@
import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import java.util.List;
import java.util.Map;
@@ -18,127 +18,102 @@
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*;
+
import javax.validation.constraints.*;
-import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
+
@Path("/pet")
@io.swagger.annotations.Api(description = "the pet API")
+
public interface PetApi {
+
@POST
@Consumes({ "application/json", "application/xml" })
- @Produces({ "application/xml", "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+
+ @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
- public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body,@Context SecurityContext securityContext);
+ public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet pet,@Context SecurityContext securityContext);
+
@DELETE
@Path("/{petId}")
- @Produces({ "application/xml", "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+
+ @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
- public Response deletePet( @PathParam("petId") Long petId,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext);
+ public Response deletePet( @PathParam("petId") Integer petId,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext);
+
@GET
@Path("/findByStatus")
@Produces({ "application/xml", "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+ @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) })
public Response findPetsByStatus( @NotNull @QueryParam("status") List status,@Context SecurityContext securityContext);
+
@GET
@Path("/findByTags")
@Produces({ "application/xml", "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+ @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) })
public Response findPetsByTags( @NotNull @QueryParam("tags") List tags,@Context SecurityContext securityContext);
+
@GET
@Path("/{petId}")
@Produces({ "application/xml", "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "api_key")
- }, tags={ "pet", })
+ @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class) })
- public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext);
+ public Response getPetById( @PathParam("petId") Integer petId,@Context SecurityContext securityContext);
+
@PUT
@Consumes({ "application/json", "application/xml" })
- @Produces({ "application/xml", "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+
+ @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
- public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body,@Context SecurityContext securityContext);
+ public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet pet,@Context SecurityContext securityContext);
+
@POST
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" })
- @Produces({ "application/xml", "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+
+ @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
- public Response updatePetWithForm( @PathParam("petId") Long petId,@ApiParam(value = "Updated name of the pet")@FormParam("name") String name,@ApiParam(value = "Updated status of the pet")@FormParam("status") String status,@Context SecurityContext securityContext);
+ public Response updatePetWithForm( @PathParam("petId") Integer petId,@ApiParam(value = "" ) Object body,@Context SecurityContext securityContext);
+
@POST
@Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
- @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
+ @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- public Response uploadFile(MultipartFormDataInput input, @PathParam("petId") Long petId,@Context SecurityContext securityContext);
+ public Response uploadFile( @PathParam("petId") Integer petId,@ApiParam(value = "" ) Object body,@Context SecurityContext securityContext);
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/StoreApi.java
index 133e801e900..0535d026b86 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/StoreApi.java
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/StoreApi.java
@@ -8,6 +8,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import java.util.List;
import java.util.Map;
@@ -17,35 +18,39 @@
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*;
+
import javax.validation.constraints.*;
+
@Path("/store")
@io.swagger.annotations.Api(description = "the store API")
+
public interface StoreApi {
+
@DELETE
@Path("/order/{orderId}")
- @Produces({ "application/xml", "application/json" })
+
@io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) })
public Response deleteOrder( @PathParam("orderId") String orderId,@Context SecurityContext securityContext);
+
@GET
@Path("/inventory")
@Produces({ "application/json" })
- @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
- @io.swagger.annotations.Authorization(value = "api_key")
- }, tags={ "store", })
+ @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", tags={ "store", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Response getInventory(@Context SecurityContext securityContext);
+
@GET
@Path("/order/{orderId}")
@@ -57,15 +62,18 @@ public interface StoreApi {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) })
- public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext);
+ public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Integer orderId,@Context SecurityContext securityContext);
+
@POST
@Path("/order")
-
+ @Consumes({ "*/*" })
@Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
- public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body,@Context SecurityContext securityContext);
+ public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order order,@Context SecurityContext securityContext);
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/UserApi.java
index 384aac51777..19f7c4403cd 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/UserApi.java
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/UserApi.java
@@ -5,9 +5,9 @@
import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*;
-import java.util.List;
import io.swagger.model.User;
+
import java.util.List;
import java.util.Map;
@@ -17,49 +17,57 @@
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*;
+
import javax.validation.constraints.*;
+
@Path("/user")
@io.swagger.annotations.Api(description = "the user API")
+
public interface UserApi {
+
@POST
+ @Consumes({ "*/*" })
- @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
- public Response createUser(@ApiParam(value = "Created user object" ,required=true) User body,@Context SecurityContext securityContext);
+ public Response createUser(@ApiParam(value = "Created user object" ,required=true) User user,@Context SecurityContext securityContext);
+
@POST
@Path("/createWithArray")
+ @Consumes({ "*/*" })
- @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List body,@Context SecurityContext securityContext);
+
@POST
@Path("/createWithList")
+ @Consumes({ "*/*" })
- @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List body,@Context SecurityContext securityContext);
+
@DELETE
@Path("/{username}")
- @Produces({ "application/xml", "application/json" })
+
@io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response deleteUser( @PathParam("username") String username,@Context SecurityContext securityContext);
+
@GET
@Path("/{username}")
@@ -72,6 +80,7 @@ public interface UserApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext);
+
@GET
@Path("/login")
@@ -82,22 +91,26 @@ public interface UserApi {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) })
public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext);
+
@GET
@Path("/logout")
- @Produces({ "application/xml", "application/json" })
+
@io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response logoutUser(@Context SecurityContext securityContext);
+
@PUT
@Path("/{username}")
+ @Consumes({ "*/*" })
- @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
- public Response updateUser( @PathParam("username") String username,@ApiParam(value = "Updated user object" ,required=true) User body,@Context SecurityContext securityContext);
+ public Response updateUser(@ApiParam(value = "Updated user object" ,required=true) User user, @PathParam("username") String username,@Context SecurityContext securityContext);
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Category.java
index 833b7c04571..6f9a54651d1 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Category.java
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Category.java
@@ -5,21 +5,51 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
+
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.*;
@ApiModel(description="A category for a pet")
public class Category {
+
private Long id = null;
private String name = null;
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("id")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public Long getId() {
return id;
}
@@ -27,11 +57,32 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("name")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public String getName() {
return name;
}
@@ -39,6 +90,7 @@ public void setName(String name) {
this.name = name;
}
+
@Override
public boolean equals(Object o) {
@@ -81,3 +133,6 @@ private String toIndentedString(Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/ModelApiResponse.java
index 2ec59cd9f20..69f187d63ee 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/ModelApiResponse.java
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/ModelApiResponse.java
@@ -5,22 +5,52 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
+
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.*;
@ApiModel(description="Describes the result of uploading an image resource")
public class ModelApiResponse {
+
private Integer code = null;
private String type = null;
private String message = null;
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("code")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public Integer getCode() {
return code;
}
@@ -28,11 +58,32 @@ public void setCode(Integer code) {
this.code = code;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("type")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public String getType() {
return type;
}
@@ -40,11 +91,32 @@ public void setType(String type) {
this.type = type;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("message")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public String getMessage() {
return message;
}
@@ -52,6 +124,7 @@ public void setMessage(String message) {
this.message = message;
}
+
@Override
public boolean equals(Object o) {
@@ -96,3 +169,6 @@ private String toIndentedString(Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Order.java
index 3b7151b390e..c4cdccf2358 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Order.java
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Order.java
@@ -7,12 +7,21 @@
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import java.time.OffsetDateTime;
+
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.*;
@ApiModel(description="An order for a pets from the pet store")
public class Order {
+
private Long id = null;
private Long petId = null;
@@ -23,11 +32,20 @@ public class Order {
* Order Status
*/
public enum StatusEnum {
+
+
PLACED("placed"),
- APPROVED("approved"),
+
+
+ APPROVED("approved"),
- DELIVERED("delivered");
+
+
+ DELIVERED("delivered");
+
+
+
private String value;
StatusEnum(String value) {
@@ -44,11 +62,32 @@ public String toString() {
private StatusEnum status = null;
private Boolean complete = false;
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("id")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public Long getId() {
return id;
}
@@ -56,11 +95,32 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("petId")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public Long getPetId() {
return petId;
}
@@ -68,11 +128,32 @@ public void setPetId(Long petId) {
this.petId = petId;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("quantity")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public Integer getQuantity() {
return quantity;
}
@@ -80,11 +161,32 @@ public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("shipDate")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public OffsetDateTime getShipDate() {
return shipDate;
}
@@ -92,12 +194,34 @@ public void setShipDate(OffsetDateTime shipDate) {
this.shipDate = shipDate;
}
+
/**
+
* Order Status
+
+
+
**/
@ApiModelProperty(value = "Order Status")
@JsonProperty("status")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public StatusEnum getStatus() {
return status;
}
@@ -105,18 +229,40 @@ public void setStatus(StatusEnum status) {
this.status = status;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("complete")
- public Boolean isComplete() {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ public Boolean isisComplete() {
return complete;
}
public void setComplete(Boolean complete) {
this.complete = complete;
}
+
@Override
public boolean equals(Object o) {
@@ -167,3 +313,6 @@ private String toIndentedString(Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Pet.java
index ce855066266..81ee0de9d05 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Pet.java
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Pet.java
@@ -9,12 +9,21 @@
import io.swagger.model.Category;
import io.swagger.model.Tag;
import java.util.List;
+
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.*;
@ApiModel(description="A pet for sale in the pet store")
public class Pet {
+
private Long id = null;
private Category category = null;
@@ -26,11 +35,20 @@ public class Pet {
* pet status in the store
*/
public enum StatusEnum {
+
+
AVAILABLE("available"),
- PENDING("pending"),
+
+
+ PENDING("pending"),
- SOLD("sold");
+
+
+ SOLD("sold");
+
+
+
private String value;
StatusEnum(String value) {
@@ -46,11 +64,32 @@ public String toString() {
private StatusEnum status = null;
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("id")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public Long getId() {
return id;
}
@@ -58,11 +97,32 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("category")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public Category getCategory() {
return category;
}
@@ -70,12 +130,34 @@ public void setCategory(Category category) {
this.category = category;
}
+
/**
+
+
+
**/
@ApiModelProperty(example = "doggie", required = true, value = "")
@JsonProperty("name")
+
@NotNull
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public String getName() {
return name;
}
@@ -83,12 +165,34 @@ public void setName(String name) {
this.name = name;
}
+
/**
+
+
+
**/
@ApiModelProperty(required = true, value = "")
@JsonProperty("photoUrls")
+
@NotNull
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public List getPhotoUrls() {
return photoUrls;
}
@@ -96,11 +200,32 @@ public void setPhotoUrls(List photoUrls) {
this.photoUrls = photoUrls;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("tags")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public List getTags() {
return tags;
}
@@ -108,12 +233,34 @@ public void setTags(List tags) {
this.tags = tags;
}
+
/**
+
* pet status in the store
+
+
+
**/
@ApiModelProperty(value = "pet status in the store")
@JsonProperty("status")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public StatusEnum getStatus() {
return status;
}
@@ -121,6 +268,7 @@ public void setStatus(StatusEnum status) {
this.status = status;
}
+
@Override
public boolean equals(Object o) {
@@ -171,3 +319,6 @@ private String toIndentedString(Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Tag.java
index 356b2abc3b0..946e64918d5 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Tag.java
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Tag.java
@@ -5,21 +5,51 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
+
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.*;
@ApiModel(description="A tag for a pet")
public class Tag {
+
private Long id = null;
private String name = null;
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("id")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public Long getId() {
return id;
}
@@ -27,11 +57,32 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("name")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public String getName() {
return name;
}
@@ -39,6 +90,7 @@ public void setName(String name) {
this.name = name;
}
+
@Override
public boolean equals(Object o) {
@@ -81,3 +133,6 @@ private String toIndentedString(Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/User.java
index 50b50e4551b..db3857ebd5c 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/User.java
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/User.java
@@ -5,12 +5,21 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
+
+
+
import javax.validation.constraints.*;
+
+
+
+
+
import io.swagger.annotations.*;
@ApiModel(description="A User who is purchasing from the pet store")
public class User {
+
private Long id = null;
private String username = null;
@@ -21,11 +30,32 @@ public class User {
private String phone = null;
private Integer userStatus = null;
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("id")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public Long getId() {
return id;
}
@@ -33,11 +63,32 @@ public void setId(Long id) {
this.id = id;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("username")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public String getUsername() {
return username;
}
@@ -45,11 +96,32 @@ public void setUsername(String username) {
this.username = username;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("firstName")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public String getFirstName() {
return firstName;
}
@@ -57,11 +129,32 @@ public void setFirstName(String firstName) {
this.firstName = firstName;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("lastName")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public String getLastName() {
return lastName;
}
@@ -69,11 +162,32 @@ public void setLastName(String lastName) {
this.lastName = lastName;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("email")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public String getEmail() {
return email;
}
@@ -81,11 +195,32 @@ public void setEmail(String email) {
this.email = email;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("password")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public String getPassword() {
return password;
}
@@ -93,11 +228,32 @@ public void setPassword(String password) {
this.password = password;
}
+
/**
+
+
+
**/
@ApiModelProperty(value = "")
@JsonProperty("phone")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public String getPhone() {
return phone;
}
@@ -105,12 +261,34 @@ public void setPhone(String phone) {
this.phone = phone;
}
+
/**
+
* User Status
+
+
+
**/
@ApiModelProperty(value = "User Status")
@JsonProperty("userStatus")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
public Integer getUserStatus() {
return userStatus;
}
@@ -118,6 +296,7 @@ public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}
+
@Override
public boolean equals(Object o) {
@@ -172,3 +351,6 @@ private String toIndentedString(Object o) {
}
}
+
+
+
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/JacksonConfig.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/JacksonConfig.java
index 4109c5875cd..7a5e120b035 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/JacksonConfig.java
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/JacksonConfig.java
@@ -9,8 +9,11 @@
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.databind.ObjectMapper;
+
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
+
+
@Provider
@Produces(MediaType.APPLICATION_JSON)
public class JacksonConfig implements ContextResolver {
@@ -22,8 +25,11 @@ public class JacksonConfig implements ContextResolver {
public JacksonConfig() throws Exception {
this.objectMapper = new ObjectMapper();
+
this.objectMapper.registerModule(new JavaTimeModule());
+
+
// sample to convert any DateTime to readable timestamps
//this.objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, true);
}
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/RestApplication.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/RestApplication.java
index 65184dc2f39..33c4ae2a460 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/RestApplication.java
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/RestApplication.java
@@ -6,20 +6,35 @@
import java.util.Set;
import java.util.HashSet;
+
+
+
import io.swagger.api.impl.PetApiServiceImpl;
+
import io.swagger.api.impl.StoreApiServiceImpl;
+
import io.swagger.api.impl.UserApiServiceImpl;
+
+
@ApplicationPath("/")
public class RestApplication extends Application {
+
public Set> getClasses() {
Set> resources = new HashSet>();
+
+
resources.add(PetApiServiceImpl.class);
+
resources.add(StoreApiServiceImpl.class);
+
resources.add(UserApiServiceImpl.class);
+
+
+
return resources;
}
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
index eb3e35b8280..93481088c92 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
@@ -2,13 +2,12 @@
import io.swagger.api.*;
import io.swagger.model.*;
-import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
-import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
+
import java.util.List;
import java.io.InputStream;
@@ -17,37 +16,48 @@
import javax.ws.rs.core.SecurityContext;
+
public class PetApiServiceImpl implements PetApi {
- public Response addPet(Pet body,SecurityContext securityContext) {
+
+ public Response addPet(Pet pet,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
- public Response deletePet(Long petId,String apiKey,SecurityContext securityContext) {
+
+ public Response deletePet(Integer petId,String apiKey,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
+
public Response findPetsByStatus(List status,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
+
public Response findPetsByTags(List tags,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
- public Response getPetById(Long petId,SecurityContext securityContext) {
+
+ public Response getPetById(Integer petId,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
- public Response updatePet(Pet body,SecurityContext securityContext) {
+
+ public Response updatePet(Pet pet,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
- public Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) {
+
+ public Response updatePetWithForm(Integer petId,Object body,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
- public Response uploadFile(MultipartFormDataInput input,Long petId,SecurityContext securityContext) {
+
+ public Response uploadFile(Integer petId,Object body,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
index 1de821ace75..6c16fdcefa6 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
@@ -7,6 +7,7 @@
import java.util.Map;
import io.swagger.model.Order;
+
import java.util.List;
import java.io.InputStream;
@@ -15,21 +16,28 @@
import javax.ws.rs.core.SecurityContext;
+
public class StoreApiServiceImpl implements StoreApi {
+
public Response deleteOrder(String orderId,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
+
public Response getInventory(SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
- public Response getOrderById(Long orderId,SecurityContext securityContext) {
+
+ public Response getOrderById(Integer orderId,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
- public Response placeOrder(Order body,SecurityContext securityContext) {
+
+ public Response placeOrder(Order order,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
index 67f74c66cb0..893cbc9953f 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
@@ -4,9 +4,9 @@
import io.swagger.model.*;
-import java.util.List;
import io.swagger.model.User;
+
import java.util.List;
import java.io.InputStream;
@@ -15,37 +15,48 @@
import javax.ws.rs.core.SecurityContext;
+
public class UserApiServiceImpl implements UserApi {
- public Response createUser(User body,SecurityContext securityContext) {
+
+ public Response createUser(User user,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
+
public Response createUsersWithArrayInput(List body,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
+
public Response createUsersWithListInput(List body,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
+
public Response deleteUser(String username,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
+
public Response getUserByName(String username,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
+
public Response loginUser(String username,String password,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
+
public Response logoutUser(SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
- public Response updateUser(String username,User body,SecurityContext securityContext) {
+
+ public Response updateUser(User user,String username,SecurityContext securityContext) {
// do some magic!
return Response.ok().build();
}
+
}
+
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-joda/.swagger-codegen/VERSION
index 50794f17f1a..096bf47efe3 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.swagger-codegen/VERSION
+++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.3.1-SNAPSHOT
\ No newline at end of file
+3.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md b/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md
index cc011c37ee5..30bfb068a61 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md
+++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md
@@ -5,18 +5,14 @@ This server was generated by the [swagger-codegen](https://github.com/swagger-ap
[OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This
is an example of building a swagger-enabled JAX-RS server.
-This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework.
+This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework for Jboss Resteasy.
-To run the server, please execute the following:
-
-```
-mvn clean package jetty:run
-```
+You can deploy the WAR file to Jboss EAP or any other JEE server supporting Jboss Resteasy.
You can then view the swagger listing here:
```
-http://localhost:8080/v2/swagger.json
+http://localhost:-1/v2/swagger.json
```
Note that if you have configured the `host` to be something other than localhost, the calls through
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle
index e89fc25bec1..2d83786f7b2 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle
+++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle
@@ -15,9 +15,14 @@ dependencies {
providedCompile 'javax.annotation:javax.annotation-api:1.2'
providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final'
compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final'
+
providedCompile 'javax.validation:validation-api:1.1.0.Final'
+
+
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.6.3'
compile 'joda-time:joda-time:2.7'
+
+
testCompile 'junit:junit:4.12',
'org.hamcrest:hamcrest-core:1.3'
}
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml b/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml
index ca2b969d27c..751349f4dbf 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml
+++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml
@@ -138,6 +138,7 @@
+
javax.validation
@@ -145,6 +146,8 @@
1.1.0.Final
provided
+
+
joda-time
joda-time
@@ -155,6 +158,8 @@
jackson-datatype-joda
2.6.3
+
+
@@ -167,7 +172,7 @@