This commit is contained in:
Tony Tam 2017-03-01 09:57:38 -05:00
parent af2749325d
commit 2cec6192a4
9 changed files with 224 additions and 11 deletions

View File

@ -15,6 +15,8 @@ import org.apache.cxf.jaxrs.ext.multipart.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.jaxrs.PATCH;
import javax.validation.constraints.*;
@Path("/v2")
@Api(value = "/", description = "")
@ -37,13 +39,13 @@ public interface PetApi {
@Path("/pet/findByStatus")
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Finds Pets by status", tags={ "pet", })
public List<Pet> findPetsByStatus(@QueryParam("status")List<String> status);
public List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status);
@GET
@Path("/pet/findByTags")
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Finds Pets by tags", tags={ "pet", })
public List<Pet> findPetsByTags(@QueryParam("tags")List<String> tags);
public List<Pet> findPetsByTags(@QueryParam("tags") @NotNull List<String> tags);
@GET
@Path("/pet/{petId}")

View File

@ -14,6 +14,8 @@ import org.apache.cxf.jaxrs.ext.multipart.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.jaxrs.PATCH;
import javax.validation.constraints.*;
@Path("/v2")
@Api(value = "/", description = "")

View File

@ -14,6 +14,8 @@ import org.apache.cxf.jaxrs.ext.multipart.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.jaxrs.PATCH;
import javax.validation.constraints.*;
@Path("/v2")
@Api(value = "/", description = "")
@ -53,7 +55,7 @@ public interface UserApi {
@Path("/user/login")
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Logs user into the system", tags={ "user", })
public String loginUser(@QueryParam("username")String username, @QueryParam("password")String password);
public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password);
@GET
@Path("/user/logout")

View File

@ -1,6 +1,7 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
@ -26,9 +27,16 @@ public class Category {
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Category id(Long id) {
this.id = id;
return this;
}
/**
* Get name
* @return name
@ -36,10 +44,17 @@ public class Category {
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Category name(String name) {
this.name = name;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -55,7 +70,7 @@ public class Category {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(Object o) {
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}

View File

@ -1,6 +1,7 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
@ -28,9 +29,16 @@ public class ModelApiResponse {
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public ModelApiResponse code(Integer code) {
this.code = code;
return this;
}
/**
* Get type
* @return type
@ -38,9 +46,16 @@ public class ModelApiResponse {
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public ModelApiResponse type(String type) {
this.type = type;
return this;
}
/**
* Get message
* @return message
@ -48,10 +63,17 @@ public class ModelApiResponse {
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public ModelApiResponse message(String message) {
this.message = message;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -68,7 +90,7 @@ public class ModelApiResponse {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(Object o) {
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}

View File

@ -1,6 +1,7 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
@ -27,7 +28,7 @@ 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"));
@XmlEnumValue("placed") PLACED(String.valueOf("placed")), @XmlEnumValue("approved") APPROVED(String.valueOf("approved")), @XmlEnumValue("delivered") DELIVERED(String.valueOf("delivered"));
private String value;
@ -67,9 +68,16 @@ public enum StatusEnum {
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Order id(Long id) {
this.id = id;
return this;
}
/**
* Get petId
* @return petId
@ -77,9 +85,16 @@ public enum StatusEnum {
public Long getPetId() {
return petId;
}
public void setPetId(Long petId) {
this.petId = petId;
}
public Order petId(Long petId) {
this.petId = petId;
return this;
}
/**
* Get quantity
* @return quantity
@ -87,9 +102,16 @@ public enum StatusEnum {
public Integer getQuantity() {
return quantity;
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
public Order quantity(Integer quantity) {
this.quantity = quantity;
return this;
}
/**
* Get shipDate
* @return shipDate
@ -97,9 +119,16 @@ public enum StatusEnum {
public javax.xml.datatype.XMLGregorianCalendar getShipDate() {
return shipDate;
}
public void setShipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) {
this.shipDate = shipDate;
}
public Order shipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) {
this.shipDate = shipDate;
return this;
}
/**
* Order Status
* @return status
@ -107,9 +136,16 @@ public enum StatusEnum {
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
public Order status(StatusEnum status) {
this.status = status;
return this;
}
/**
* Get complete
* @return complete
@ -117,10 +153,17 @@ public enum StatusEnum {
public Boolean getComplete() {
return complete;
}
public void setComplete(Boolean complete) {
this.complete = complete;
}
public Order complete(Boolean complete) {
this.complete = complete;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -140,7 +183,7 @@ public enum StatusEnum {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(Object o) {
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}

View File

@ -5,6 +5,7 @@ import io.swagger.model.Category;
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;
@ -33,7 +34,7 @@ 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"));
@XmlEnumValue("available") AVAILABLE(String.valueOf("available")), @XmlEnumValue("pending") PENDING(String.valueOf("pending")), @XmlEnumValue("sold") SOLD(String.valueOf("sold"));
private String value;
@ -71,9 +72,16 @@ public enum StatusEnum {
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Pet id(Long id) {
this.id = id;
return this;
}
/**
* Get category
* @return category
@ -81,29 +89,57 @@ public enum StatusEnum {
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.category = category;
}
public Pet category(Category category) {
this.category = category;
return this;
}
/**
* Get name
* @return name
**/
@NotNull
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Pet name(String name) {
this.name = name;
return this;
}
/**
* Get photoUrls
* @return photoUrls
**/
@NotNull
public List<String> getPhotoUrls() {
return photoUrls;
}
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
public Pet photoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
return this;
}
public Pet addPhotoUrlsItem(String photoUrlsItem) {
this.photoUrls.add(photoUrlsItem);
return this;
}
/**
* Get tags
* @return tags
@ -111,9 +147,21 @@ public enum StatusEnum {
public List<Tag> getTags() {
return tags;
}
public void setTags(List<Tag> tags) {
this.tags = tags;
}
public Pet tags(List<Tag> tags) {
this.tags = tags;
return this;
}
public Pet addTagsItem(Tag tagsItem) {
this.tags.add(tagsItem);
return this;
}
/**
* pet status in the store
* @return status
@ -121,10 +169,17 @@ public enum StatusEnum {
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
public Pet status(StatusEnum status) {
this.status = status;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -144,7 +199,7 @@ public enum StatusEnum {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(Object o) {
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}

View File

@ -1,6 +1,7 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
@ -26,9 +27,16 @@ public class Tag {
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Tag id(Long id) {
this.id = id;
return this;
}
/**
* Get name
* @return name
@ -36,10 +44,17 @@ public class Tag {
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Tag name(String name) {
this.name = name;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -55,7 +70,7 @@ public class Tag {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(Object o) {
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}

View File

@ -1,6 +1,7 @@
package io.swagger.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
@ -38,9 +39,16 @@ public class User {
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public User id(Long id) {
this.id = id;
return this;
}
/**
* Get username
* @return username
@ -48,9 +56,16 @@ public class User {
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public User username(String username) {
this.username = username;
return this;
}
/**
* Get firstName
* @return firstName
@ -58,9 +73,16 @@ public class User {
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public User firstName(String firstName) {
this.firstName = firstName;
return this;
}
/**
* Get lastName
* @return lastName
@ -68,9 +90,16 @@ public class User {
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public User lastName(String lastName) {
this.lastName = lastName;
return this;
}
/**
* Get email
* @return email
@ -78,9 +107,16 @@ public class User {
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public User email(String email) {
this.email = email;
return this;
}
/**
* Get password
* @return password
@ -88,9 +124,16 @@ public class User {
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public User password(String password) {
this.password = password;
return this;
}
/**
* Get phone
* @return phone
@ -98,9 +141,16 @@ public class User {
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public User phone(String phone) {
this.phone = phone;
return this;
}
/**
* User Status
* @return userStatus
@ -108,10 +158,17 @@ public class User {
public Integer getUserStatus() {
return userStatus;
}
public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}
public User userStatus(Integer userStatus) {
this.userStatus = userStatus;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -133,7 +190,7 @@ public class User {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(Object o) {
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}