[issue-2374][koly] generated the spring mvc sample

This commit is contained in:
kolyjjj 2016-04-14 23:25:43 +08:00
parent 03c4e5170f
commit ed164a77bd
18 changed files with 254 additions and 346 deletions

View File

@ -118,7 +118,7 @@
</dependency> </dependency>
</dependencies> </dependencies>
<properties> <properties>
<swagger-core-version>1.5.7</swagger-core-version> <swagger-core-version>1.5.8</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version> <jetty-version>9.2.9.v20150224</jetty-version>
<jersey-version>1.13</jersey-version> <jersey-version>1.13</jersey-version>
<slf4j-version>1.6.3</slf4j-version> <slf4j-version>1.6.3</slf4j-version>

View File

@ -1,6 +1,6 @@
package io.swagger.api; package io.swagger.api;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08: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) {

View File

@ -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.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08: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,

View File

@ -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.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08: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;

View File

@ -1,6 +1,6 @@
package io.swagger.api; package io.swagger.api;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08: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) {

View File

@ -4,6 +4,7 @@ import io.swagger.model.*;
import io.swagger.model.Pet; import io.swagger.model.Pet;
import java.io.File; import java.io.File;
import io.swagger.model.ApiResponse;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -31,9 +32,123 @@ import static org.springframework.http.MediaType.*;
@Controller @Controller
@RequestMapping(value = "/pet", produces = {APPLICATION_JSON_VALUE}) @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.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
public class PetApi { public class PetApi {
@ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets")
})
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
@RequestMapping(value = "",
produces = { "application/xml", "application/json" },
consumes = { "application/json", "application/xml" },
method = RequestMethod.POST)
public ResponseEntity<Void> addPet(
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @RequestBody Pet body
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<Void>(HttpStatus.OK);
}
@ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets")
})
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
@RequestMapping(value = "/{petId}",
produces = { "application/xml", "application/json" },
method = RequestMethod.DELETE)
public ResponseEntity<Void> deletePet(
@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId
,
@ApiParam(value = "" ) @RequestHeader(value="apiKey", required=false) String apiKey
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<Void>(HttpStatus.OK);
}
@ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets")
})
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class) })
@RequestMapping(value = "/findByStatus",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
public 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
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<List<Pet>>(HttpStatus.OK);
}
@ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets")
})
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class) })
@RequestMapping(value = "/findByTags",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
public ResponseEntity<List<Pet>> findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<List<Pet>>(HttpStatus.OK);
}
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
@Authorization(value = "api_key")
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
@RequestMapping(value = "/{petId}",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
public ResponseEntity<Pet> getPetById(
@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<Pet>(HttpStatus.OK);
}
@ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = { @ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = { @Authorization(value = "petstore_auth", scopes = {
@ -42,16 +157,16 @@ public class PetApi {
}) })
}) })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found"), @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception") }) @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
@RequestMapping(value = "", @RequestMapping(value = "",
produces = { "application/json", "application/xml" }, produces = { "application/xml", "application/json" },
consumes = { "application/json", "application/xml" }, consumes = { "application/json", "application/xml" },
method = RequestMethod.PUT) method = RequestMethod.PUT)
public ResponseEntity<Void> updatePet( public ResponseEntity<Void> updatePet(
@ApiParam(value = "Pet object that needs to be added to the store" ) @RequestBody Pet body @ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @RequestBody Pet body
) )
throws NotFoundException { throws NotFoundException {
// do some magic! // do some magic!
@ -59,104 +174,6 @@ public class PetApi {
} }
@ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets")
})
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input") })
@RequestMapping(value = "",
produces = { "application/json", "application/xml" },
consumes = { "application/json", "application/xml" },
method = RequestMethod.POST)
public ResponseEntity<Void> addPet(
@ApiParam(value = "Pet object that needs to be added to the store" ) @RequestBody Pet body
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<Void>(HttpStatus.OK);
}
@ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma seperated strings", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets")
})
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value") })
@RequestMapping(value = "/findByStatus",
produces = { "application/json", "application/xml" },
method = RequestMethod.GET)
public ResponseEntity<List<Pet>> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", defaultValue = "available") @RequestParam(value = "status", required = false, defaultValue="available") List<String> status
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<List<Pet>>(HttpStatus.OK);
}
@ApiOperation(value = "Finds Pets by tags", notes = "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets")
})
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value") })
@RequestMapping(value = "/findByTags",
produces = { "application/json", "application/xml" },
method = RequestMethod.GET)
public ResponseEntity<List<Pet>> findPetsByTags(@ApiParam(value = "Tags to filter by") @RequestParam(value = "tags", required = false) List<String> tags
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<List<Pet>>(HttpStatus.OK);
}
@ApiOperation(value = "Find pet by ID", notes = "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions", response = Pet.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets")
}),
@Authorization(value = "api_key")
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied"),
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found") })
@RequestMapping(value = "/{petId}",
produces = { "application/json", "application/xml" },
method = RequestMethod.GET)
public ResponseEntity<Pet> getPetById(
@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("petId") Long petId
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<Pet>(HttpStatus.OK);
}
@ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = { @ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = { @Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@ -164,13 +181,13 @@ public class PetApi {
}) })
}) })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input") }) @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
@RequestMapping(value = "/{petId}", @RequestMapping(value = "/{petId}",
produces = { "application/json", "application/xml" }, produces = { "application/xml", "application/json" },
consumes = { "application/x-www-form-urlencoded" }, consumes = { "application/x-www-form-urlencoded" },
method = RequestMethod.POST) method = RequestMethod.POST)
public ResponseEntity<Void> updatePetWithForm( public ResponseEntity<Void> updatePetWithForm(
@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") String petId @ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId
, ,
@ -189,47 +206,19 @@ public class PetApi {
} }
@ApiOperation(value = "uploads an image", notes = "", response = ApiResponse.class, authorizations = {
@ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = { @Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets") @AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}) })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value") }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ApiResponse.class) })
@RequestMapping(value = "/{petId}",
produces = { "application/json", "application/xml" },
method = RequestMethod.DELETE)
public ResponseEntity<Void> deletePet(
@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId
,
@ApiParam(value = "" ) @RequestHeader(value="apiKey", required=false) String apiKey
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<Void>(HttpStatus.OK);
}
@ApiOperation(value = "uploads an image", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets")
})
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation") })
@RequestMapping(value = "/{petId}/uploadImage", @RequestMapping(value = "/{petId}/uploadImage",
produces = { "application/json", "application/xml" }, produces = { "application/json" },
consumes = { "multipart/form-data" }, consumes = { "multipart/form-data" },
method = RequestMethod.POST) method = RequestMethod.POST)
public ResponseEntity<Void> uploadFile( public ResponseEntity<ApiResponse> uploadFile(
@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId @ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId
, ,
@ -244,34 +233,7 @@ public class PetApi {
) )
throws NotFoundException { throws NotFoundException {
// do some magic! // do some magic!
return new ResponseEntity<Void>(HttpStatus.OK); return new ResponseEntity<ApiResponse>(HttpStatus.OK);
} }
@ApiOperation(value = "Fake endpoint to test byte array return by 'Find pet by ID'", notes = "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions", response = byte[].class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets")
}),
@Authorization(value = "api_key")
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied"),
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found") })
@RequestMapping(value = "/{petId}?testing_byte_array=true",
produces = { "application/json", "application/xml" },
method = RequestMethod.GET)
public ResponseEntity<byte[]> petPetIdtestingByteArraytrueGet(
@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("petId") Long petId
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<byte[]>(HttpStatus.OK);
}
} }

View File

@ -31,78 +31,15 @@ import static org.springframework.http.MediaType.*;
@Controller @Controller
@RequestMapping(value = "/store", produces = {APPLICATION_JSON_VALUE}) @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.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
public class StoreApi { public class StoreApi {
@ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
@Authorization(value = "api_key")
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation") })
@RequestMapping(value = "/inventory",
produces = { "application/json", "application/xml" },
method = RequestMethod.GET)
public ResponseEntity<Map<String, Integer>> getInventory()
throws NotFoundException {
// do some magic!
return new ResponseEntity<Map<String, Integer>>(HttpStatus.OK);
}
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, authorizations = {
@Authorization(value = "test_api_client_id"),
@Authorization(value = "test_api_client_secret")
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order") })
@RequestMapping(value = "/order",
produces = { "application/json", "application/xml" },
method = RequestMethod.POST)
public ResponseEntity<Order> placeOrder(
@ApiParam(value = "order placed for purchasing the pet" ) @RequestBody Order body
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<Order>(HttpStatus.OK);
}
@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, authorizations = {
@Authorization(value = "test_api_key_query"),
@Authorization(value = "test_api_key_header")
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied"),
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found") })
@RequestMapping(value = "/order/{orderId}",
produces = { "application/json", "application/xml" },
method = RequestMethod.GET)
public ResponseEntity<Order> getOrderById(
@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") String orderId
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<Order>(HttpStatus.OK);
}
@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)
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found") }) @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) })
@RequestMapping(value = "/order/{orderId}", @RequestMapping(value = "/order/{orderId}",
produces = { "application/json", "application/xml" }, produces = { "application/xml", "application/json" },
method = RequestMethod.DELETE) method = RequestMethod.DELETE)
public ResponseEntity<Void> deleteOrder( public ResponseEntity<Void> deleteOrder(
@ -115,4 +52,56 @@ public class StoreApi {
} }
@ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
@Authorization(value = "api_key")
})
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class) })
@RequestMapping(value = "/inventory",
produces = { "application/json" },
method = RequestMethod.GET)
public ResponseEntity<Map<String, Integer>> getInventory()
throws NotFoundException {
// do some magic!
return new ResponseEntity<Map<String, Integer>>(HttpStatus.OK);
}
@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)
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) })
@RequestMapping(value = "/order/{orderId}",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
public ResponseEntity<Order> getOrderById(
@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<Order>(HttpStatus.OK);
}
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class)
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) })
@RequestMapping(value = "/order",
produces = { "application/xml", "application/json" },
method = RequestMethod.POST)
public ResponseEntity<Order> placeOrder(
@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @RequestBody Order body
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<Order>(HttpStatus.OK);
}
} }

View File

@ -31,20 +31,19 @@ import static org.springframework.http.MediaType.*;
@Controller @Controller
@RequestMapping(value = "/user", produces = {APPLICATION_JSON_VALUE}) @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.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
public class UserApi { public class 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)
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation") }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@RequestMapping(value = "", @RequestMapping(value = "",
produces = { "application/json", "application/xml" }, produces = { "application/xml", "application/json" },
method = RequestMethod.POST) method = RequestMethod.POST)
public ResponseEntity<Void> createUser( public ResponseEntity<Void> createUser(
@ApiParam(value = "Created user object" ) @RequestBody User body @ApiParam(value = "Created user object" ,required=true ) @RequestBody User body
) )
throws NotFoundException { throws NotFoundException {
// do some magic! // do some magic!
@ -52,17 +51,16 @@ public class 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)
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation") }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@RequestMapping(value = "/createWithArray", @RequestMapping(value = "/createWithArray",
produces = { "application/json", "application/xml" }, produces = { "application/xml", "application/json" },
method = RequestMethod.POST) method = RequestMethod.POST)
public ResponseEntity<Void> createUsersWithArrayInput( public ResponseEntity<Void> createUsersWithArrayInput(
@ApiParam(value = "List of user object" ) @RequestBody List<User> body @ApiParam(value = "List of user object" ,required=true ) @RequestBody List<User> body
) )
throws NotFoundException { throws NotFoundException {
// do some magic! // do some magic!
@ -70,17 +68,16 @@ public class 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)
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation") }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@RequestMapping(value = "/createWithList", @RequestMapping(value = "/createWithList",
produces = { "application/json", "application/xml" }, produces = { "application/xml", "application/json" },
method = RequestMethod.POST) method = RequestMethod.POST)
public ResponseEntity<Void> createUsersWithListInput( public ResponseEntity<Void> createUsersWithListInput(
@ApiParam(value = "List of user object" ) @RequestBody List<User> body @ApiParam(value = "List of user object" ,required=true ) @RequestBody List<User> body
) )
throws NotFoundException { throws NotFoundException {
// do some magic! // do some magic!
@ -88,94 +85,12 @@ public class UserApi {
} }
@ApiOperation(value = "Logs user into the system", notes = "", response = String.class)
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied") })
@RequestMapping(value = "/login",
produces = { "application/json", "application/xml" },
method = RequestMethod.GET)
public ResponseEntity<String> loginUser(@ApiParam(value = "The user name for login") @RequestParam(value = "username", required = false) String username
,
@ApiParam(value = "The password for login in clear text") @RequestParam(value = "password", required = false) String password
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<String>(HttpStatus.OK);
}
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class)
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation") })
@RequestMapping(value = "/logout",
produces = { "application/json", "application/xml" },
method = RequestMethod.GET)
public ResponseEntity<Void> logoutUser()
throws NotFoundException {
// do some magic!
return new ResponseEntity<Void>(HttpStatus.OK);
}
@ApiOperation(value = "Get user by user name", notes = "", response = User.class)
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied"),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found") })
@RequestMapping(value = "/{username}",
produces = { "application/json", "application/xml" },
method = RequestMethod.GET)
public ResponseEntity<User> getUserByName(
@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true ) @PathVariable("username") String username
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<User>(HttpStatus.OK);
}
@ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class)
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied"),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found") })
@RequestMapping(value = "/{username}",
produces = { "application/json", "application/xml" },
method = RequestMethod.PUT)
public ResponseEntity<Void> updateUser(
@ApiParam(value = "name that need to be deleted",required=true ) @PathVariable("username") String username
,
@ApiParam(value = "Updated user object" ) @RequestBody User body
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<Void>(HttpStatus.OK);
}
@ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class) @ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class)
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found") }) @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
@RequestMapping(value = "/{username}", @RequestMapping(value = "/{username}",
produces = { "application/json", "application/xml" }, produces = { "application/xml", "application/json" },
method = RequestMethod.DELETE) method = RequestMethod.DELETE)
public ResponseEntity<Void> deleteUser( public ResponseEntity<Void> deleteUser(
@ -188,4 +103,80 @@ public class UserApi {
} }
@ApiOperation(value = "Get user by user name", notes = "", response = User.class)
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) })
@RequestMapping(value = "/{username}",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
public ResponseEntity<User> getUserByName(
@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true ) @PathVariable("username") String username
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<User>(HttpStatus.OK);
}
@ApiOperation(value = "Logs user into the system", notes = "", response = String.class)
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) })
@RequestMapping(value = "/login",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
public 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
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<String>(HttpStatus.OK);
}
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class)
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
@RequestMapping(value = "/logout",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
public ResponseEntity<Void> logoutUser()
throws NotFoundException {
// do some magic!
return new ResponseEntity<Void>(HttpStatus.OK);
}
@ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class)
@io.swagger.annotations.ApiResponses(value = {
@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) })
@RequestMapping(value = "/{username}",
produces = { "application/xml", "application/json" },
method = RequestMethod.PUT)
public 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
)
throws NotFoundException {
// do some magic!
return new ResponseEntity<Void>(HttpStatus.OK);
}
} }

View File

@ -18,13 +18,13 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableSwagger2 //Loads the spring beans required by the framework @EnableSwagger2 //Loads the spring beans required by the framework
@PropertySource("classpath:swagger.properties") @PropertySource("classpath:swagger.properties")
@Import(SwaggerUiConfiguration.class) @Import(SwaggerUiConfiguration.class)
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
public class SwaggerConfig { public class SwaggerConfig {
@Bean @Bean
ApiInfo apiInfo() { ApiInfo apiInfo() {
ApiInfo apiInfo = new ApiInfo( ApiInfo apiInfo = new ApiInfo(
"Swagger Petstore", "Swagger Petstore",
"This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters", "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
"1.0.0", "1.0.0",
"", "",
"apiteam@swagger.io", "apiteam@swagger.io",

View File

@ -8,7 +8,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
@Configuration @Configuration
@EnableWebMvc @EnableWebMvc
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
public class SwaggerUiConfiguration extends WebMvcConfigurerAdapter { public class SwaggerUiConfiguration extends WebMvcConfigurerAdapter {
private static final String[] SERVLET_RESOURCE_LOCATIONS = { "/" }; private static final String[] SERVLET_RESOURCE_LOCATIONS = { "/" };

View File

@ -2,7 +2,7 @@ package io.swagger.configuration;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer { public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer {
@Override @Override

View File

@ -3,7 +3,7 @@ package io.swagger.configuration;
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
public class WebMvcConfiguration extends WebMvcConfigurationSupport { public class WebMvcConfiguration extends WebMvcConfigurationSupport {
@Override @Override
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {

View File

@ -1,7 +1,6 @@
package io.swagger.model; package io.swagger.model;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@ -12,14 +11,13 @@ import java.util.Objects;
@ApiModel(description = "") @ApiModel(description = "")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-01-22T15:27:38.634-06:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
public class ApiResponse { public class ApiResponse {
private Integer code = null; private Integer code = null;
private String type = null; private String type = null;
private String message = null; private String message = null;
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -31,7 +29,6 @@ public class ApiResponse {
this.code = code; this.code = code;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -43,7 +40,6 @@ public class ApiResponse {
this.type = type; this.type = type;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -56,7 +52,6 @@ public class ApiResponse {
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@ -11,13 +11,12 @@ import java.util.Objects;
@ApiModel(description = "") @ApiModel(description = "")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
public class Category { public class Category {
private Long id = null; private Long id = null;
private String name = null; private String name = null;
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -29,7 +28,6 @@ public class Category {
this.id = id; this.id = id;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -42,7 +40,6 @@ public class Category {
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@ -13,7 +13,7 @@ import java.util.Objects;
@ApiModel(description = "") @ApiModel(description = "")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
public class Order { public class Order {
private Long id = null; private Long id = null;
@ -25,8 +25,7 @@ public class Order {
}; };
private StatusEnum status = null; private StatusEnum status = null;
private Boolean complete = null; private Boolean complete = false;
/** /**
**/ **/
@ -39,7 +38,6 @@ public class Order {
this.id = id; this.id = id;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -51,7 +49,6 @@ public class Order {
this.petId = petId; this.petId = petId;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -63,7 +60,6 @@ public class Order {
this.quantity = quantity; this.quantity = quantity;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -75,7 +71,6 @@ public class Order {
this.shipDate = shipDate; this.shipDate = shipDate;
} }
/** /**
* Order Status * Order Status
**/ **/
@ -88,7 +83,6 @@ public class Order {
this.status = status; this.status = status;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -101,7 +95,6 @@ public class Order {
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@ -16,7 +16,7 @@ import java.util.Objects;
@ApiModel(description = "") @ApiModel(description = "")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
public class Pet { public class Pet {
private Long id = null; private Long id = null;
@ -30,7 +30,6 @@ public class Pet {
private StatusEnum status = null; private StatusEnum status = null;
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -42,7 +41,6 @@ public class Pet {
this.id = id; this.id = id;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -54,7 +52,6 @@ public class Pet {
this.category = category; this.category = category;
} }
/** /**
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@ -66,7 +63,6 @@ public class Pet {
this.name = name; this.name = name;
} }
/** /**
**/ **/
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@ -78,7 +74,6 @@ public class Pet {
this.photoUrls = photoUrls; this.photoUrls = photoUrls;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -90,7 +85,6 @@ public class Pet {
this.tags = tags; this.tags = tags;
} }
/** /**
* pet status in the store * pet status in the store
**/ **/
@ -104,7 +98,6 @@ public class Pet {
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@ -11,13 +11,12 @@ import java.util.Objects;
@ApiModel(description = "") @ApiModel(description = "")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
public class Tag { public class Tag {
private Long id = null; private Long id = null;
private String name = null; private String name = null;
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -29,7 +28,6 @@ public class Tag {
this.id = id; this.id = id;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -42,7 +40,6 @@ public class Tag {
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@ -11,7 +11,7 @@ import java.util.Objects;
@ApiModel(description = "") @ApiModel(description = "")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-02-26T13:58:54.483Z") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
public class User { public class User {
private Long id = null; private Long id = null;
@ -23,7 +23,6 @@ public class User {
private String phone = null; private String phone = null;
private Integer userStatus = null; private Integer userStatus = null;
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -35,7 +34,6 @@ public class User {
this.id = id; this.id = id;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -47,7 +45,6 @@ public class User {
this.username = username; this.username = username;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -59,7 +56,6 @@ public class User {
this.firstName = firstName; this.firstName = firstName;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -71,7 +67,6 @@ public class User {
this.lastName = lastName; this.lastName = lastName;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -83,7 +78,6 @@ public class User {
this.email = email; this.email = email;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -95,7 +89,6 @@ public class User {
this.password = password; this.password = password;
} }
/** /**
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@ -107,7 +100,6 @@ public class User {
this.phone = phone; this.phone = phone;
} }
/** /**
* User Status * User Status
**/ **/
@ -121,7 +113,6 @@ public class User {
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {