Write out details of API Evolution into a README

This commit is contained in:
Greg Turnquist
2017-06-01 11:23:25 -05:00
parent 0aad6c3ab4
commit c99ebe755f
8 changed files with 450 additions and 26 deletions

View File

@@ -47,7 +47,7 @@ class EmployeeController {
public ResourceSupport root() {
ResourceSupport rootResource = new ResourceSupport();
rootResource.add(
linkTo(methodOn(EmployeeController.class).root()).withSelfRel(),
linkTo(methodOn(EmployeeController.class).findAll()).withRel("employees"));
@@ -64,7 +64,7 @@ class EmployeeController {
public ResponseEntity<Resource<Employee>> newEmployee(@RequestBody Employee employee) {
Employee savedEmployee = repository.save(employee);
return ResponseEntity
.created(linkTo(methodOn(EmployeeController.class).findOne(savedEmployee.getId())).toUri())
.body(assembler.toResource(savedEmployee));