Skip to content

Commit

Permalink
update java petstore sample
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed May 8, 2017
1 parent 4096386 commit 621ff06
Show file tree
Hide file tree
Showing 31 changed files with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.List;
import java.util.Map;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* AdditionalPropertiesClass
Expand Down Expand Up @@ -78,6 +79,7 @@ public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String,
* Get mapOfMapProperty
* @return mapOfMapProperty
**/
@Valid
@ApiModelProperty(value = "")
public Map<String, Map<String, String>> getMapOfMapProperty() {
return mapOfMapProperty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* Animal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* AnimalFarm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* ArrayOfArrayOfNumberOnly
Expand All @@ -49,6 +50,7 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayAr
* Get arrayArrayNumber
* @return arrayArrayNumber
**/
@Valid
@ApiModelProperty(value = "")
public List<List<BigDecimal>> getArrayArrayNumber() {
return arrayArrayNumber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* ArrayOfNumberOnly
Expand All @@ -49,6 +50,7 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
* Get arrayNumber
* @return arrayNumber
**/
@Valid
@ApiModelProperty(value = "")
public List<BigDecimal> getArrayNumber() {
return arrayNumber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* ArrayTest
Expand Down Expand Up @@ -81,6 +82,7 @@ public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem)
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
**/
@Valid
@ApiModelProperty(value = "")
public List<List<Long>> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
Expand All @@ -107,6 +109,7 @@ public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelI
* Get arrayArrayOfModel
* @return arrayArrayOfModel
**/
@Valid
@ApiModelProperty(value = "")
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
return arrayArrayOfModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* Capitalization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* Cat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* Category
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* Model for testing model with \&quot;_class\&quot; property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* Dog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* EnumArrays
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import java.util.Objects;
import javax.validation.constraints.*;
import javax.validation.Valid;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.OuterEnum;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* EnumTest
Expand Down Expand Up @@ -197,6 +198,7 @@ public EnumTest outerEnum(OuterEnum outerEnum) {
* Get outerEnum
* @return outerEnum
**/
@Valid
@ApiModelProperty(value = "")
public OuterEnum getOuterEnum() {
return outerEnum;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* FormatTest
Expand Down Expand Up @@ -139,6 +140,7 @@ public FormatTest number(BigDecimal number) {
* @return number
**/
@NotNull
@Valid
@DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "")
public BigDecimal getNumber() {
return number;
Expand Down Expand Up @@ -253,6 +255,7 @@ public FormatTest date(LocalDate date) {
* @return date
**/
@NotNull
@Valid
@ApiModelProperty(required = true, value = "")
public LocalDate getDate() {
return date;
Expand All @@ -271,6 +274,7 @@ public FormatTest dateTime(DateTime dateTime) {
* Get dateTime
* @return dateTime
**/
@Valid
@ApiModelProperty(value = "")
public DateTime getDateTime() {
return dateTime;
Expand All @@ -289,6 +293,7 @@ public FormatTest uuid(UUID uuid) {
* Get uuid
* @return uuid
**/
@Valid
@ApiModelProperty(value = "")
public UUID getUuid() {
return uuid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* HasOnlyReadOnly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.List;
import java.util.Map;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* MapTest
Expand Down Expand Up @@ -83,6 +84,7 @@ public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStr
* Get mapMapOfString
* @return mapMapOfString
**/
@Valid
@ApiModelProperty(value = "")
public Map<String, Map<String, String>> getMapMapOfString() {
return mapMapOfString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.UUID;
import org.joda.time.DateTime;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* MixedPropertiesAndAdditionalPropertiesClass
Expand All @@ -50,6 +51,7 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
* Get uuid
* @return uuid
**/
@Valid
@ApiModelProperty(value = "")
public UUID getUuid() {
return uuid;
Expand All @@ -68,6 +70,7 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(DateTime dateTime) {
* Get dateTime
* @return dateTime
**/
@Valid
@ApiModelProperty(value = "")
public DateTime getDateTime() {
return dateTime;
Expand All @@ -94,6 +97,7 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal
* Get map
* @return map
**/
@Valid
@ApiModelProperty(value = "")
public Map<String, Animal> getMap() {
return map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* Model for testing model name starting with number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* ModelApiResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* Model for testing reserved words
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* Model for testing model name same as property name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* NumberOnly
Expand All @@ -39,6 +40,7 @@ public NumberOnly justNumber(BigDecimal justNumber) {
* Get justNumber
* @return justNumber
**/
@Valid
@ApiModelProperty(value = "")
public BigDecimal getJustNumber() {
return justNumber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.swagger.annotations.ApiModelProperty;
import org.joda.time.DateTime;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* Order
Expand Down Expand Up @@ -141,6 +142,7 @@ public Order shipDate(DateTime shipDate) {
* Get shipDate
* @return shipDate
**/
@Valid
@ApiModelProperty(value = "")
public DateTime getShipDate() {
return shipDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import java.util.Objects;
import javax.validation.constraints.*;
import javax.validation.Valid;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* Pet
Expand Down Expand Up @@ -108,6 +109,7 @@ public Pet category(Category category) {
* Get category
* @return category
**/
@Valid
@ApiModelProperty(value = "")
public Category getCategory() {
return category;
Expand Down Expand Up @@ -177,6 +179,7 @@ public Pet addTagsItem(Tag tagsItem) {
* Get tags
* @return tags
**/
@Valid
@ApiModelProperty(value = "")
public List<Tag> getTags() {
return tags;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* ReadOnlyFirst
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* SpecialModelName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* Tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import javax.validation.Valid;

/**
* User
Expand Down

0 comments on commit 621ff06

Please sign in to comment.