Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* The main order domain REST API
* @author romeh
@Api(value = "Order Manager REST API demo")
public class OrderRestController {
private OrdersBroker ordersBroker;
* @param orderRequest json order request
* @return ASYNC generic JSON response
@RequestMapping(method = RequestMethod.POST)
public CompletableFuture<Response> createOrder(@RequestBody @Valid OrderRequest orderRequest) {
return ordersBroker.createOrder(new OrderCmd.CreateCmd(UUID.randomUUID().toString(), orderRequest.getOrderDetails()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment