@RestController @Generated(value="com.github.davidmoten:openapi-codegen-runtime:0.1.5") public class ServiceController extends Object implements ControllerExceptionHandler
| Constructor and Description |
|---|
ServiceController(Service service) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<?> |
createUser(User requestBody)
Creates a new user
|
org.springframework.http.ResponseEntity<?> |
deleteUser(String id)
Deletes a user (logically)
|
org.springframework.http.ResponseEntity<?> |
getItem(String itemId)
Gets item details
|
org.springframework.http.ResponseEntity<?> |
getUser(String id)
Gets user details
|
org.springframework.http.ResponseEntity<?> |
getUsers(Optional<String> search,
Optional<String> continuationToken)
List users page by page, filtered by search if present
|
org.springframework.http.ResponseEntity<?> |
updateUser(String id,
User requestBody)
Updates a user
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleBadRequestExceptionpublic ServiceController(@Autowired(required=false)
Service service)
@RequestMapping(method=GET,
value="/user",
produces="application/json")
public org.springframework.http.ResponseEntity<?> getUsers(@RequestParam(name="search",required=false)
Optional<String> search,
@RequestParam(name="continuationToken",required=false)
Optional<String> continuationToken)
List users page by page, filtered by search if present
[status=200, application/json] --> UsersPage
search - searchcontinuationToken - continuationToken@RequestMapping(method=POST,
value="/user",
consumes="application/json")
public org.springframework.http.ResponseEntity<?> createUser(@RequestBody
User requestBody)
Creates a new user
requestBody - requestBody@RequestMapping(method=GET,
value="/user/{id}",
produces="application/json")
public org.springframework.http.ResponseEntity<?> getUser(@PathVariable(name="id",required=true)
String id)
Gets user details
[status=200, application/json] --> User
id - id@RequestMapping(method=PUT,
value="/user/{id}",
consumes="application/json")
public org.springframework.http.ResponseEntity<?> updateUser(@PathVariable(name="id",required=true)
String id,
@RequestBody
User requestBody)
Updates a user
requestBody - requestBodyid - id@RequestMapping(method=DELETE,
value="/user/{id}")
public org.springframework.http.ResponseEntity<?> deleteUser(@PathVariable(name="id",required=true)
String id)
Deletes a user (logically)
id - id@RequestMapping(method=GET,
value="/item/{itemId}",
produces="application/json")
public org.springframework.http.ResponseEntity<?> getItem(@PathVariable(name="itemId",required=true)
String itemId)
Gets item details
[status=200, application/json] --> Item
itemId - itemIdCopyright © 2023. All rights reserved.