Update samples for DefaultValue

This commit is contained in:
Nick Maynard 2016-01-31 21:12:16 +00:00
parent e29cf209c8
commit 943c66a975
18 changed files with 96 additions and 69 deletions

View File

@ -1,6 +1,6 @@
package io.swagger.api;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public class ApiException extends Exception{
private int code;
public ApiException (int code, String msg) {

View File

@ -5,7 +5,7 @@ import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public class ApiOriginFilter implements javax.servlet.Filter {
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {

View File

@ -3,7 +3,7 @@ package io.swagger.api;
import javax.xml.bind.annotation.XmlTransient;
@javax.xml.bind.annotation.XmlRootElement
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public class ApiResponseMessage {
public static final int ERROR = 1;
public static final int WARNING = 2;

View File

@ -1,6 +1,6 @@
package io.swagger.api;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public class NotFoundException extends ApiException {
private int code;
public NotFoundException (int code, String msg) {

View File

@ -28,7 +28,7 @@ import javax.ws.rs.*;
@io.swagger.annotations.Api(description = "the pet API")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public class PetApi {
private final PetApiService delegate = PetApiServiceFactory.getPetApi();
@ -36,20 +36,21 @@ public class PetApi {
@Consumes({ "application/json", "application/xml" })
@Produces({ "application/json", "application/xml" })
@io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
@io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
})
}, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = void.class),
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = void.class) })
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body,@Context SecurityContext securityContext)
public Response updatePet(
@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updatePet(body,securityContext);
}
@ -57,16 +58,17 @@ public class PetApi {
@Consumes({ "application/json", "application/xml" })
@Produces({ "application/json", "application/xml" })
@io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
@io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
})
}, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body,@Context SecurityContext securityContext)
public Response addPet(
@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.addPet(body,securityContext);
}
@ -85,7 +87,8 @@ public class PetApi {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") })
public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", defaultValue="available") @QueryParam("status") List<String> status,@Context SecurityContext securityContext)
public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", defaultValue="available") @DefaultValue("available") @QueryParam("status") List<String> status
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.findPetsByStatus(status,securityContext);
}
@ -104,7 +107,8 @@ public class PetApi {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") })
public Response findPetsByTags(@ApiParam(value = "Tags to filter by") @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext)
public Response findPetsByTags(@ApiParam(value = "Tags to filter by") @QueryParam("tags") List<String> tags
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.findPetsByTags(tags,securityContext);
}
@ -122,7 +126,8 @@ public class PetApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
public Response getPetById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("petId") Long petId,@Context SecurityContext securityContext)
public Response getPetById(
@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("petId") Long petId,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.getPetById(petId,securityContext);
}
@ -130,16 +135,19 @@ public class PetApi {
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" })
@Produces({ "application/json", "application/xml" })
@io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = {
@io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
})
}, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") String petId,@ApiParam(value = "Updated name of the pet")@FormParam("name") String name,@ApiParam(value = "Updated status of the pet")@FormParam("status") String status,@Context SecurityContext securityContext)
public Response updatePetWithForm(
@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") String petId,
@ApiParam(value = "Updated name of the pet")@FormParam("name") String name,
@ApiParam(value = "Updated status of the pet")@FormParam("status") String status,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updatePetWithForm(petId,name,status,securityContext);
}
@ -147,16 +155,18 @@ public class PetApi {
@Path("/{petId}")
@Produces({ "application/json", "application/xml" })
@io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = {
@io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
})
}, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = void.class) })
public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext)
public Response deletePet(
@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId,
@ApiParam(value = "" )@HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.deletePet(petId,apiKey,securityContext);
}
@ -164,16 +174,19 @@ public class PetApi {
@Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json", "application/xml" })
@io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = Void.class, authorizations = {
@io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
})
}, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId,@ApiParam(value = "Additional data to pass to server")@FormParam("additionalMetadata") String additionalMetadata, @FormDataParam("file") InputStream inputStream,
public Response uploadFile(
@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId,
@ApiParam(value = "Additional data to pass to server")@FormParam("additionalMetadata") String additionalMetadata,
@FormDataParam("file") InputStream inputStream,
@FormDataParam("file") FormDataContentDisposition fileDetail,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.uploadFile(petId,additionalMetadata,inputStream, fileDetail,securityContext);
@ -192,7 +205,8 @@ public class PetApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = byte[].class) })
public Response getPetByIdWithByteArray(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("petId") Long petId,@Context SecurityContext securityContext)
public Response getPetByIdWithByteArray(
@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("petId") Long petId,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.getPetByIdWithByteArray(petId,securityContext);
}

View File

@ -19,7 +19,7 @@ import com.sun.jersey.multipart.FormDataParam;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public abstract class PetApiService {
public abstract Response updatePet(Pet body,SecurityContext securityContext)

View File

@ -26,7 +26,7 @@ import javax.ws.rs.*;
@io.swagger.annotations.Api(description = "the pet?testing_byte_array=true API")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public class PettestingByteArraytrueApi {
private final PettestingByteArraytrueApiService delegate = PettestingByteArraytrueApiServiceFactory.getPettestingByteArraytrueApi();
@ -34,16 +34,17 @@ public class PettestingByteArraytrueApi {
@Consumes({ "application/json", "application/xml" })
@Produces({ "application/json", "application/xml" })
@io.swagger.annotations.ApiOperation(value = "Fake endpoint to test byte array in body parameter for adding a new pet to the store", notes = "", response = Void.class, authorizations = {
@io.swagger.annotations.ApiOperation(value = "Fake endpoint to test byte array in body parameter for adding a new pet to the store", notes = "", response = void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
})
}, tags={ "pet" })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
public Response addPetUsingByteArray(@ApiParam(value = "Pet object in the form of byte array" ) byte[] body,@Context SecurityContext securityContext)
public Response addPetUsingByteArray(
@ApiParam(value = "Pet object in the form of byte array" ) byte[] body,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.addPetUsingByteArray(body,securityContext);
}

View File

@ -17,7 +17,7 @@ import com.sun.jersey.multipart.FormDataParam;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public abstract class PettestingByteArraytrueApiService {
public abstract Response addPetUsingByteArray(byte[] body,SecurityContext securityContext)

View File

@ -28,7 +28,7 @@ import javax.ws.rs.*;
@io.swagger.annotations.Api(description = "the store API")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public class StoreApi {
private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi();
@ -56,7 +56,8 @@ public class StoreApi {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) })
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ) Order body,@Context SecurityContext securityContext)
public Response placeOrder(
@ApiParam(value = "order placed for purchasing the pet" ) Order body,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.placeOrder(body,securityContext);
}
@ -72,7 +73,8 @@ public class StoreApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) })
public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") String orderId,@Context SecurityContext securityContext)
public Response getOrderById(
@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") String orderId,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.getOrderById(orderId,securityContext);
}
@ -80,13 +82,14 @@ public class StoreApi {
@Path("/order/{orderId}")
@Produces({ "application/json", "application/xml" })
@io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store" })
@io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = void.class, tags={ "store" })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) })
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = void.class) })
public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") String orderId,@Context SecurityContext securityContext)
public Response deleteOrder(
@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") String orderId,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.deleteOrder(orderId,securityContext);
}

View File

@ -19,7 +19,7 @@ import com.sun.jersey.multipart.FormDataParam;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public abstract class StoreApiService {
public abstract Response getInventory(SecurityContext securityContext)

View File

@ -1,6 +1,6 @@
package io.swagger.api;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).

View File

@ -28,7 +28,7 @@ import javax.ws.rs.*;
@io.swagger.annotations.Api(description = "the user API")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public class UserApi {
private final UserApiService delegate = UserApiServiceFactory.getUserApi();
@ -36,11 +36,12 @@ public class UserApi {
@Produces({ "application/json", "application/xml" })
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response createUser(@ApiParam(value = "Created user object" ) User body,@Context SecurityContext securityContext)
public Response createUser(
@ApiParam(value = "Created user object" ) User body,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUser(body,securityContext);
}
@ -48,11 +49,12 @@ public class UserApi {
@Path("/createWithArray")
@Produces({ "application/json", "application/xml" })
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ) List<User> body,@Context SecurityContext securityContext)
public Response createUsersWithArrayInput(
@ApiParam(value = "List of user object" ) List<User> body,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithArrayInput(body,securityContext);
}
@ -60,11 +62,12 @@ public class UserApi {
@Path("/createWithList")
@Produces({ "application/json", "application/xml" })
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ) List<User> body,@Context SecurityContext securityContext)
public Response createUsersWithListInput(
@ApiParam(value = "List of user object" ) List<User> body,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithListInput(body,securityContext);
}
@ -78,7 +81,9 @@ public class UserApi {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) })
public Response loginUser(@ApiParam(value = "The user name for login") @QueryParam("username") String username,@ApiParam(value = "The password for login in clear text") @QueryParam("password") String password,@Context SecurityContext securityContext)
public Response loginUser(@ApiParam(value = "The user name for login") @QueryParam("username") String username
,@ApiParam(value = "The password for login in clear text") @QueryParam("password") String password
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.loginUser(username,password,securityContext);
}
@ -86,9 +91,9 @@ public class UserApi {
@Path("/logout")
@Produces({ "application/json", "application/xml" })
@io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response logoutUser(@Context SecurityContext securityContext)
throws NotFoundException {
@ -106,7 +111,8 @@ public class UserApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) })
public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathParam("username") String username,@Context SecurityContext securityContext)
public Response getUserByName(
@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathParam("username") String username,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.getUserByName(username,securityContext);
}
@ -114,13 +120,15 @@ public class UserApi {
@Path("/{username}")
@Produces({ "application/json", "application/xml" })
@io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) })
public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username,@ApiParam(value = "Updated user object" ) User body,@Context SecurityContext securityContext)
public Response updateUser(
@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username,
@ApiParam(value = "Updated user object" ) User body,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updateUser(username,body,securityContext);
}
@ -128,13 +136,14 @@ public class UserApi {
@Path("/{username}")
@Produces({ "application/json", "application/xml" })
@io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user" })
@io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user" })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) })
public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username,@Context SecurityContext securityContext)
public Response deleteUser(
@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.deleteUser(username,securityContext);
}

View File

@ -19,7 +19,7 @@ import com.sun.jersey.multipart.FormDataParam;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public abstract class UserApiService {
public abstract Response createUser(User body,SecurityContext securityContext)

View File

@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public class Category {
private Long id = null;

View File

@ -11,7 +11,7 @@ import java.util.Date;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public class Order {
private Long id = null;

View File

@ -13,7 +13,7 @@ import java.util.*;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public class Pet {
private Long id = null;

View File

@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public class Tag {
private Long id = null;

View File

@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2016-01-14T21:37:36.074Z")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-01-31T21:10:14.319Z")
public class User {
private Long id = null;