forked from loafle/openapi-generator-original
don't put RequestMapping on the interface
as Spring-MVC will automatically consider it as a controller which is not necessarily the case (eg. for a spring-cloud FeignClient)
This commit is contained in:
parent
556f529933
commit
1836062e6f
@ -131,9 +131,6 @@ public class SpringBootServerCodegen extends JavaClientCodegen implements Codege
|
|||||||
if (basePath == "") {
|
if (basePath == "") {
|
||||||
basePath = "default";
|
basePath = "default";
|
||||||
} else {
|
} else {
|
||||||
if (co.path.startsWith("/" + basePath)) {
|
|
||||||
co.path = co.path.substring(("/" + basePath).length());
|
|
||||||
}
|
|
||||||
co.subresourceOperation = !co.path.isEmpty();
|
co.subresourceOperation = !co.path.isEmpty();
|
||||||
}
|
}
|
||||||
List<CodegenOperation> opList = operations.get(basePath);
|
List<CodegenOperation> opList = operations.get(basePath);
|
||||||
|
@ -21,8 +21,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import static org.springframework.http.MediaType.*;
|
import static org.springframework.http.MediaType.*;
|
||||||
|
|
||||||
@RequestMapping(value = "/{{{baseName}}}", produces = {APPLICATION_JSON_VALUE})
|
@Api(value = "{{{baseName}}}", description = "the {{{baseName}}} API")
|
||||||
@Api(value = "/{{{baseName}}}", description = "the {{{baseName}}} API")
|
|
||||||
{{>generatedAnnotation}}
|
{{>generatedAnnotation}}
|
||||||
{{#operations}}
|
{{#operations}}
|
||||||
public interface {{classname}} {
|
public interface {{classname}} {
|
||||||
|
@ -22,9 +22,8 @@ import java.util.List;
|
|||||||
|
|
||||||
import static org.springframework.http.MediaType.*;
|
import static org.springframework.http.MediaType.*;
|
||||||
|
|
||||||
@RequestMapping(value = "/pet", produces = {APPLICATION_JSON_VALUE})
|
@Api(value = "pet", description = "the pet API")
|
||||||
@Api(value = "/pet", description = "the pet API")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:44.961+02:00")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T10:53:41.429+02:00")
|
|
||||||
public interface PetApi {
|
public interface PetApi {
|
||||||
|
|
||||||
@ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
|
@ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
|
||||||
@ -35,7 +34,7 @@ public interface PetApi {
|
|||||||
})
|
})
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
||||||
@RequestMapping(value = "",
|
@RequestMapping(value = "/pet",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
@ -50,7 +49,7 @@ public interface PetApi {
|
|||||||
})
|
})
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
|
@ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
|
||||||
@RequestMapping(value = "/{petId}",
|
@RequestMapping(value = "/pet/{petId}",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.DELETE)
|
method = RequestMethod.DELETE)
|
||||||
@ -67,7 +66,7 @@ public interface PetApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid status value", response = Pet.class) })
|
@ApiResponse(code = 400, message = "Invalid status value", response = Pet.class) })
|
||||||
@RequestMapping(value = "/findByStatus",
|
@RequestMapping(value = "/pet/findByStatus",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
@ -83,7 +82,7 @@ public interface PetApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class) })
|
@ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class) })
|
||||||
@RequestMapping(value = "/findByTags",
|
@RequestMapping(value = "/pet/findByTags",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
@ -97,7 +96,7 @@ public interface PetApi {
|
|||||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid ID supplied", 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 = 404, message = "Pet not found", response = Pet.class) })
|
||||||
@RequestMapping(value = "/{petId}",
|
@RequestMapping(value = "/pet/{petId}",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
@ -114,7 +113,7 @@ public interface PetApi {
|
|||||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "Pet not found", response = Void.class),
|
@ApiResponse(code = 404, message = "Pet not found", response = Void.class),
|
||||||
@ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
|
@ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
|
||||||
@RequestMapping(value = "",
|
@RequestMapping(value = "/pet",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.PUT)
|
method = RequestMethod.PUT)
|
||||||
@ -129,7 +128,7 @@ public interface PetApi {
|
|||||||
})
|
})
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
||||||
@RequestMapping(value = "/{petId}",
|
@RequestMapping(value = "/pet/{petId}",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/x-www-form-urlencoded",
|
consumes = "application/x-www-form-urlencoded",
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
@ -146,7 +145,7 @@ public interface PetApi {
|
|||||||
})
|
})
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||||
@RequestMapping(value = "/{petId}/uploadImage",
|
@RequestMapping(value = "/pet/{petId}/uploadImage",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "multipart/form-data",
|
consumes = "multipart/form-data",
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
|
@ -21,16 +21,15 @@ import java.util.List;
|
|||||||
|
|
||||||
import static org.springframework.http.MediaType.*;
|
import static org.springframework.http.MediaType.*;
|
||||||
|
|
||||||
@RequestMapping(value = "/store", produces = {APPLICATION_JSON_VALUE})
|
@Api(value = "store", description = "the store API")
|
||||||
@Api(value = "/store", description = "the store API")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:44.961+02:00")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T10:53:41.429+02:00")
|
|
||||||
public interface StoreApi {
|
public interface StoreApi {
|
||||||
|
|
||||||
@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)
|
@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)
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "Order not found", response = Void.class) })
|
@ApiResponse(code = 404, message = "Order not found", response = Void.class) })
|
||||||
@RequestMapping(value = "/order/{orderId}",
|
@RequestMapping(value = "/store/order/{orderId}",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.DELETE)
|
method = RequestMethod.DELETE)
|
||||||
@ -42,7 +41,7 @@ public interface StoreApi {
|
|||||||
})
|
})
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Integer.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Integer.class) })
|
||||||
@RequestMapping(value = "/inventory",
|
@RequestMapping(value = "/store/inventory",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
@ -54,7 +53,7 @@ public interface StoreApi {
|
|||||||
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid ID supplied", 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 = 404, message = "Order not found", response = Order.class) })
|
||||||
@RequestMapping(value = "/order/{orderId}",
|
@RequestMapping(value = "/store/order/{orderId}",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
@ -65,7 +64,7 @@ public interface StoreApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@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 = Order.class) })
|
||||||
@RequestMapping(value = "/order",
|
@RequestMapping(value = "/store/order",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
|
@ -21,15 +21,14 @@ import java.util.List;
|
|||||||
|
|
||||||
import static org.springframework.http.MediaType.*;
|
import static org.springframework.http.MediaType.*;
|
||||||
|
|
||||||
@RequestMapping(value = "/user", produces = {APPLICATION_JSON_VALUE})
|
@Api(value = "user", description = "the user API")
|
||||||
@Api(value = "/user", description = "the user API")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:44.961+02:00")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T10:53:41.429+02:00")
|
|
||||||
public interface UserApi {
|
public interface UserApi {
|
||||||
|
|
||||||
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class)
|
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class)
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
@RequestMapping(value = "",
|
@RequestMapping(value = "/user",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
@ -39,7 +38,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class)
|
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class)
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
@RequestMapping(value = "/createWithArray",
|
@RequestMapping(value = "/user/createWithArray",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
@ -49,7 +48,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class)
|
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class)
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
@RequestMapping(value = "/createWithList",
|
@RequestMapping(value = "/user/createWithList",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
@ -60,7 +59,7 @@ public interface UserApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
||||||
@RequestMapping(value = "/{username}",
|
@RequestMapping(value = "/user/{username}",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.DELETE)
|
method = RequestMethod.DELETE)
|
||||||
@ -72,7 +71,7 @@ public interface UserApi {
|
|||||||
@ApiResponse(code = 200, message = "successful operation", response = User.class),
|
@ApiResponse(code = 200, message = "successful operation", response = User.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid username supplied", 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 = 404, message = "User not found", response = User.class) })
|
||||||
@RequestMapping(value = "/{username}",
|
@RequestMapping(value = "/user/{username}",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
@ -83,7 +82,7 @@ public interface UserApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = String.class),
|
@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 = String.class) })
|
||||||
@RequestMapping(value = "/login",
|
@RequestMapping(value = "/user/login",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
@ -94,7 +93,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class)
|
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class)
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
@RequestMapping(value = "/logout",
|
@RequestMapping(value = "/user/logout",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
@ -105,7 +104,7 @@ public interface UserApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
||||||
@RequestMapping(value = "/{username}",
|
@RequestMapping(value = "/user/{username}",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.PUT)
|
method = RequestMethod.PUT)
|
||||||
|
@ -11,7 +11,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T10:53:41.429+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:44.961+02:00")
|
||||||
public class Category {
|
public class Category {
|
||||||
|
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
@ -11,7 +11,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T10:53:41.429+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:44.961+02:00")
|
||||||
public class ModelApiResponse {
|
public class ModelApiResponse {
|
||||||
|
|
||||||
private Integer code = null;
|
private Integer code = null;
|
||||||
|
@ -13,7 +13,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T10:53:41.429+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:44.961+02:00")
|
||||||
public class Order {
|
public class Order {
|
||||||
|
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
@ -16,7 +16,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T10:53:41.429+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:44.961+02:00")
|
||||||
public class Pet {
|
public class Pet {
|
||||||
|
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
@ -11,7 +11,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T10:53:41.429+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:44.961+02:00")
|
||||||
public class Tag {
|
public class Tag {
|
||||||
|
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
@ -11,7 +11,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T10:53:41.429+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:44.961+02:00")
|
||||||
public class User {
|
public class User {
|
||||||
|
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package io.swagger.api;
|
package io.swagger.api;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
public class ApiException extends Exception{
|
public class ApiException extends Exception{
|
||||||
private int code;
|
private int code;
|
||||||
public ApiException (int code, String msg) {
|
public ApiException (int code, String msg) {
|
||||||
|
@ -5,7 +5,7 @@ import java.io.IOException;
|
|||||||
import javax.servlet.*;
|
import javax.servlet.*;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
public class ApiOriginFilter implements javax.servlet.Filter {
|
public class ApiOriginFilter implements javax.servlet.Filter {
|
||||||
@Override
|
@Override
|
||||||
public void doFilter(ServletRequest request, ServletResponse response,
|
public void doFilter(ServletRequest request, ServletResponse response,
|
||||||
|
@ -3,7 +3,7 @@ package io.swagger.api;
|
|||||||
import javax.xml.bind.annotation.XmlTransient;
|
import javax.xml.bind.annotation.XmlTransient;
|
||||||
|
|
||||||
@javax.xml.bind.annotation.XmlRootElement
|
@javax.xml.bind.annotation.XmlRootElement
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
public class ApiResponseMessage {
|
public class ApiResponseMessage {
|
||||||
public static final int ERROR = 1;
|
public static final int ERROR = 1;
|
||||||
public static final int WARNING = 2;
|
public static final int WARNING = 2;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package io.swagger.api;
|
package io.swagger.api;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
public class NotFoundException extends ApiException {
|
public class NotFoundException extends ApiException {
|
||||||
private int code;
|
private int code;
|
||||||
public NotFoundException (int code, String msg) {
|
public NotFoundException (int code, String msg) {
|
||||||
|
@ -22,9 +22,8 @@ import java.util.List;
|
|||||||
|
|
||||||
import static org.springframework.http.MediaType.*;
|
import static org.springframework.http.MediaType.*;
|
||||||
|
|
||||||
@RequestMapping(value = "/pet", produces = {APPLICATION_JSON_VALUE})
|
@Api(value = "pet", description = "the pet API")
|
||||||
@Api(value = "/pet", description = "the pet API")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
|
||||||
public interface PetApi {
|
public interface PetApi {
|
||||||
|
|
||||||
@ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
|
@ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
|
||||||
@ -35,7 +34,7 @@ public interface PetApi {
|
|||||||
})
|
})
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
||||||
@RequestMapping(value = "",
|
@RequestMapping(value = "/pet",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
consumes = { "application/json", "application/xml" },
|
consumes = { "application/json", "application/xml" },
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
@ -50,9 +49,8 @@ public interface PetApi {
|
|||||||
})
|
})
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
|
@ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
|
||||||
@RequestMapping(value = "/{petId}",
|
@RequestMapping(value = "/pet/{petId}",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.DELETE)
|
method = RequestMethod.DELETE)
|
||||||
ResponseEntity<Void> deletePet(@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId,
|
ResponseEntity<Void> deletePet(@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId,
|
||||||
@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey);
|
@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey);
|
||||||
@ -67,9 +65,8 @@ public interface PetApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid status value", response = Pet.class) })
|
@ApiResponse(code = 400, message = "Invalid status value", response = Pet.class) })
|
||||||
@RequestMapping(value = "/findByStatus",
|
@RequestMapping(value = "/pet/findByStatus",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<List<Pet>> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", required = true) @RequestParam(value = "status", required = true) List<String> status);
|
ResponseEntity<List<Pet>> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", required = true) @RequestParam(value = "status", required = true) List<String> status);
|
||||||
|
|
||||||
@ -83,9 +80,8 @@ public interface PetApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class) })
|
@ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class) })
|
||||||
@RequestMapping(value = "/findByTags",
|
@RequestMapping(value = "/pet/findByTags",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<List<Pet>> findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags);
|
ResponseEntity<List<Pet>> findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags);
|
||||||
|
|
||||||
@ -97,9 +93,8 @@ public interface PetApi {
|
|||||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid ID supplied", 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 = 404, message = "Pet not found", response = Pet.class) })
|
||||||
@RequestMapping(value = "/{petId}",
|
@RequestMapping(value = "/pet/{petId}",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<Pet> getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId);
|
ResponseEntity<Pet> getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId);
|
||||||
|
|
||||||
@ -114,7 +109,7 @@ public interface PetApi {
|
|||||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "Pet not found", response = Void.class),
|
@ApiResponse(code = 404, message = "Pet not found", response = Void.class),
|
||||||
@ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
|
@ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
|
||||||
@RequestMapping(value = "",
|
@RequestMapping(value = "/pet",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
consumes = { "application/json", "application/xml" },
|
consumes = { "application/json", "application/xml" },
|
||||||
method = RequestMethod.PUT)
|
method = RequestMethod.PUT)
|
||||||
@ -129,7 +124,7 @@ public interface PetApi {
|
|||||||
})
|
})
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
||||||
@RequestMapping(value = "/{petId}",
|
@RequestMapping(value = "/pet/{petId}",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
consumes = { "application/x-www-form-urlencoded" },
|
consumes = { "application/x-www-form-urlencoded" },
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
@ -146,7 +141,7 @@ public interface PetApi {
|
|||||||
})
|
})
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||||
@RequestMapping(value = "/{petId}/uploadImage",
|
@RequestMapping(value = "/pet/{petId}/uploadImage",
|
||||||
produces = { "application/json" },
|
produces = { "application/json" },
|
||||||
consumes = { "multipart/form-data" },
|
consumes = { "multipart/form-data" },
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
|
@ -21,7 +21,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
public class PetApiController implements PetApi {
|
public class PetApiController implements PetApi {
|
||||||
public ResponseEntity<Void> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @RequestBody Pet body) {
|
public ResponseEntity<Void> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @RequestBody Pet body) {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
|
@ -21,18 +21,16 @@ import java.util.List;
|
|||||||
|
|
||||||
import static org.springframework.http.MediaType.*;
|
import static org.springframework.http.MediaType.*;
|
||||||
|
|
||||||
@RequestMapping(value = "/store", produces = {APPLICATION_JSON_VALUE})
|
@Api(value = "store", description = "the store API")
|
||||||
@Api(value = "/store", description = "the store API")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
|
||||||
public interface StoreApi {
|
public interface StoreApi {
|
||||||
|
|
||||||
@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)
|
@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)
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "Order not found", response = Void.class) })
|
@ApiResponse(code = 404, message = "Order not found", response = Void.class) })
|
||||||
@RequestMapping(value = "/order/{orderId}",
|
@RequestMapping(value = "/store/order/{orderId}",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.DELETE)
|
method = RequestMethod.DELETE)
|
||||||
ResponseEntity<Void> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId);
|
ResponseEntity<Void> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId);
|
||||||
|
|
||||||
@ -42,9 +40,8 @@ public interface StoreApi {
|
|||||||
})
|
})
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Integer.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Integer.class) })
|
||||||
@RequestMapping(value = "/inventory",
|
@RequestMapping(value = "/store/inventory",
|
||||||
produces = { "application/json" },
|
produces = { "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<Map<String, Integer>> getInventory();
|
ResponseEntity<Map<String, Integer>> getInventory();
|
||||||
|
|
||||||
@ -54,9 +51,8 @@ public interface StoreApi {
|
|||||||
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid ID supplied", 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 = 404, message = "Order not found", response = Order.class) })
|
||||||
@RequestMapping(value = "/order/{orderId}",
|
@RequestMapping(value = "/store/order/{orderId}",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<Order> getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId);
|
ResponseEntity<Order> getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId);
|
||||||
|
|
||||||
@ -65,9 +61,8 @@ public interface StoreApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@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 = Order.class) })
|
||||||
@RequestMapping(value = "/order",
|
@RequestMapping(value = "/store/order",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
ResponseEntity<Order> placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @RequestBody Order body);
|
ResponseEntity<Order> placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @RequestBody Order body);
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
public class StoreApiController implements StoreApi {
|
public class StoreApiController implements StoreApi {
|
||||||
public ResponseEntity<Void> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId) {
|
public ResponseEntity<Void> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId) {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
|
@ -21,17 +21,15 @@ import java.util.List;
|
|||||||
|
|
||||||
import static org.springframework.http.MediaType.*;
|
import static org.springframework.http.MediaType.*;
|
||||||
|
|
||||||
@RequestMapping(value = "/user", produces = {APPLICATION_JSON_VALUE})
|
@Api(value = "user", description = "the user API")
|
||||||
@Api(value = "/user", description = "the user API")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
|
||||||
public interface UserApi {
|
public interface UserApi {
|
||||||
|
|
||||||
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class)
|
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class)
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
@RequestMapping(value = "",
|
@RequestMapping(value = "/user",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
ResponseEntity<Void> createUser(@ApiParam(value = "Created user object" ,required=true ) @RequestBody User body);
|
ResponseEntity<Void> createUser(@ApiParam(value = "Created user object" ,required=true ) @RequestBody User body);
|
||||||
|
|
||||||
@ -39,9 +37,8 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class)
|
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class)
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
@RequestMapping(value = "/createWithArray",
|
@RequestMapping(value = "/user/createWithArray",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
ResponseEntity<Void> createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @RequestBody List<User> body);
|
ResponseEntity<Void> createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @RequestBody List<User> body);
|
||||||
|
|
||||||
@ -49,9 +46,8 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class)
|
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class)
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
@RequestMapping(value = "/createWithList",
|
@RequestMapping(value = "/user/createWithList",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.POST)
|
method = RequestMethod.POST)
|
||||||
ResponseEntity<Void> createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @RequestBody List<User> body);
|
ResponseEntity<Void> createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @RequestBody List<User> body);
|
||||||
|
|
||||||
@ -60,9 +56,8 @@ public interface UserApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
||||||
@RequestMapping(value = "/{username}",
|
@RequestMapping(value = "/user/{username}",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.DELETE)
|
method = RequestMethod.DELETE)
|
||||||
ResponseEntity<Void> deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true ) @PathVariable("username") String username);
|
ResponseEntity<Void> deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true ) @PathVariable("username") String username);
|
||||||
|
|
||||||
@ -72,9 +67,8 @@ public interface UserApi {
|
|||||||
@ApiResponse(code = 200, message = "successful operation", response = User.class),
|
@ApiResponse(code = 200, message = "successful operation", response = User.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid username supplied", 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 = 404, message = "User not found", response = User.class) })
|
||||||
@RequestMapping(value = "/{username}",
|
@RequestMapping(value = "/user/{username}",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true ) @PathVariable("username") String username);
|
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true ) @PathVariable("username") String username);
|
||||||
|
|
||||||
@ -83,9 +77,8 @@ public interface UserApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = String.class),
|
@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 = String.class) })
|
||||||
@RequestMapping(value = "/login",
|
@RequestMapping(value = "/user/login",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<String> loginUser(@ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username,
|
ResponseEntity<String> loginUser(@ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username,
|
||||||
@ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password);
|
@ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password);
|
||||||
@ -94,9 +87,8 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class)
|
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class)
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
@RequestMapping(value = "/logout",
|
@RequestMapping(value = "/user/logout",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<Void> logoutUser();
|
ResponseEntity<Void> logoutUser();
|
||||||
|
|
||||||
@ -105,9 +97,8 @@ public interface UserApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
||||||
@RequestMapping(value = "/{username}",
|
@RequestMapping(value = "/user/{username}",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
|
|
||||||
method = RequestMethod.PUT)
|
method = RequestMethod.PUT)
|
||||||
ResponseEntity<Void> updateUser(@ApiParam(value = "name that need to be deleted",required=true ) @PathVariable("username") String username,
|
ResponseEntity<Void> updateUser(@ApiParam(value = "name that need to be deleted",required=true ) @PathVariable("username") String username,
|
||||||
@ApiParam(value = "Updated user object" ,required=true ) @RequestBody User body);
|
@ApiParam(value = "Updated user object" ,required=true ) @RequestBody User body);
|
||||||
|
@ -20,7 +20,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
public class UserApiController implements UserApi {
|
public class UserApiController implements UserApi {
|
||||||
public ResponseEntity<Void> createUser(@ApiParam(value = "Created user object" ,required=true ) @RequestBody User body) {
|
public ResponseEntity<Void> createUser(@ApiParam(value = "Created user object" ,required=true ) @RequestBody User body) {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
|
@ -13,7 +13,7 @@ import springfox.documentation.spring.web.plugins.Docket;
|
|||||||
|
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
public class SwaggerDocumentationConfig {
|
public class SwaggerDocumentationConfig {
|
||||||
|
|
||||||
ApiInfo apiInfo() {
|
ApiInfo apiInfo() {
|
||||||
|
@ -11,7 +11,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
public class Category {
|
public class Category {
|
||||||
|
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
@ -11,7 +11,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
public class ModelApiResponse {
|
public class ModelApiResponse {
|
||||||
|
|
||||||
private Integer code = null;
|
private Integer code = null;
|
||||||
|
@ -13,7 +13,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
public class Order {
|
public class Order {
|
||||||
|
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
@ -16,7 +16,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
public class Pet {
|
public class Pet {
|
||||||
|
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
@ -11,7 +11,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
public class Tag {
|
public class Tag {
|
||||||
|
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
@ -11,7 +11,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
@ApiModel(description = "")
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-03T12:27:25.655+02:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringBootServerCodegen", date = "2016-06-06T14:29:50.468+02:00")
|
||||||
public class User {
|
public class User {
|
||||||
|
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user