forked from loafle/openapi-generator-original
update spring samples
This commit is contained in:
@@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* OuterComposite
|
||||
*/
|
||||
@@ -31,6 +33,9 @@ public class OuterComposite {
|
||||
* @return myNumber
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
public BigDecimal getMyNumber() {
|
||||
return myNumber;
|
||||
}
|
||||
@@ -49,6 +54,8 @@ public class OuterComposite {
|
||||
* @return myString
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
|
||||
public String getMyString() {
|
||||
return myString;
|
||||
}
|
||||
@@ -67,6 +74,8 @@ public class OuterComposite {
|
||||
* @return myBoolean
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
|
||||
public Boolean getMyBoolean() {
|
||||
return myBoolean;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* OuterComposite
|
||||
*/
|
||||
@@ -31,6 +33,9 @@ public class OuterComposite {
|
||||
* @return myNumber
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
public BigDecimal getMyNumber() {
|
||||
return myNumber;
|
||||
}
|
||||
@@ -49,6 +54,8 @@ public class OuterComposite {
|
||||
* @return myString
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
|
||||
public String getMyString() {
|
||||
return myString;
|
||||
}
|
||||
@@ -67,6 +74,8 @@ public class OuterComposite {
|
||||
* @return myBoolean
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
|
||||
public Boolean getMyBoolean() {
|
||||
return myBoolean;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* OuterComposite
|
||||
*/
|
||||
@@ -31,6 +33,9 @@ public class OuterComposite {
|
||||
* @return myNumber
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
public BigDecimal getMyNumber() {
|
||||
return myNumber;
|
||||
}
|
||||
@@ -49,6 +54,8 @@ public class OuterComposite {
|
||||
* @return myString
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
|
||||
public String getMyString() {
|
||||
return myString;
|
||||
}
|
||||
@@ -67,6 +74,8 @@ public class OuterComposite {
|
||||
* @return myBoolean
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
|
||||
public Boolean getMyBoolean() {
|
||||
return myBoolean;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* OuterComposite
|
||||
*/
|
||||
@@ -31,6 +33,9 @@ public class OuterComposite {
|
||||
* @return myNumber
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
public BigDecimal getMyNumber() {
|
||||
return myNumber;
|
||||
}
|
||||
@@ -49,6 +54,8 @@ public class OuterComposite {
|
||||
* @return myString
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
|
||||
public String getMyString() {
|
||||
return myString;
|
||||
}
|
||||
@@ -67,6 +74,8 @@ public class OuterComposite {
|
||||
* @return myBoolean
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
|
||||
public Boolean getMyBoolean() {
|
||||
return myBoolean;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* OuterComposite
|
||||
*/
|
||||
@@ -31,6 +33,9 @@ public class OuterComposite {
|
||||
* @return myNumber
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
public BigDecimal getMyNumber() {
|
||||
return myNumber;
|
||||
}
|
||||
@@ -49,6 +54,8 @@ public class OuterComposite {
|
||||
* @return myString
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
|
||||
public String getMyString() {
|
||||
return myString;
|
||||
}
|
||||
@@ -67,6 +74,8 @@ public class OuterComposite {
|
||||
* @return myBoolean
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
|
||||
public Boolean getMyBoolean() {
|
||||
return myBoolean;
|
||||
}
|
||||
|
||||
@@ -64,8 +64,8 @@ public interface PetApi {
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||
@ApiResponse(code = 400, message = "Invalid status value", response = Pet.class) })
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||
@ApiResponse(code = 400, message = "Invalid status value", response = Void.class) })
|
||||
@ApiImplicitParams({
|
||||
|
||||
})
|
||||
@@ -82,8 +82,8 @@ public interface PetApi {
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||
@ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class) })
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||
@ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) })
|
||||
@ApiImplicitParams({
|
||||
|
||||
})
|
||||
@@ -98,8 +98,8 @@ public interface PetApi {
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
|
||||
@ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
||||
@ApiResponse(code = 404, message = "Pet not found", response = Void.class) })
|
||||
@ApiImplicitParams({
|
||||
|
||||
})
|
||||
|
||||
@@ -38,7 +38,7 @@ public interface StoreApi {
|
||||
@Authorization(value = "api_key")
|
||||
}, tags={ "store", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Integer.class) })
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") })
|
||||
@ApiImplicitParams({
|
||||
|
||||
})
|
||||
@@ -51,8 +51,8 @@ public interface StoreApi {
|
||||
@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 = Order.class),
|
||||
@ApiResponse(code = 404, message = "Order not found", response = Order.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
||||
@ApiResponse(code = 404, message = "Order not found", response = Void.class) })
|
||||
@ApiImplicitParams({
|
||||
|
||||
})
|
||||
@@ -65,7 +65,7 @@ public interface StoreApi {
|
||||
@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 = Order.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
|
||||
@ApiImplicitParams({
|
||||
|
||||
})
|
||||
|
||||
@@ -73,8 +73,8 @@ public interface UserApi {
|
||||
@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 = User.class),
|
||||
@ApiResponse(code = 404, message = "User not found", response = User.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
||||
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
||||
@ApiImplicitParams({
|
||||
|
||||
})
|
||||
@@ -87,7 +87,7 @@ public interface UserApi {
|
||||
@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 = String.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) })
|
||||
@ApiImplicitParams({
|
||||
|
||||
})
|
||||
|
||||
@@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* OuterComposite
|
||||
*/
|
||||
@@ -31,6 +33,9 @@ public class OuterComposite {
|
||||
* @return myNumber
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
public BigDecimal getMyNumber() {
|
||||
return myNumber;
|
||||
}
|
||||
@@ -49,6 +54,8 @@ public class OuterComposite {
|
||||
* @return myString
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
|
||||
public String getMyString() {
|
||||
return myString;
|
||||
}
|
||||
@@ -67,6 +74,8 @@ public class OuterComposite {
|
||||
* @return myBoolean
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
|
||||
public Boolean getMyBoolean() {
|
||||
return myBoolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user