@GetMapping("/employees")
	ResponseEntity<CollectionModel<EntityModel<Employee>>> findAll() {

		List<EntityModel<Employee>> employees = StreamSupport.stream(repository.findAll().spliterator(), false)
				.map(employee -> EntityModel.of(employee, //
						linkTo(methodOn(EmployeeController.class).findOne(employee.getId())).withSelfRel(), //
						linkTo(methodOn(EmployeeController.class).findAll()).withRel("employees"))) //
				.toList();

		return ResponseEntity.ok( //
				CollectionModel.of(employees, //
						linkTo(methodOn(EmployeeController.class).findAll()).withSelfRel()));
	}
Look up all employees, and transform them into a REST collection resource. Then return them through Spring Web's
{@link ResponseEntity} fluent API.
springdoc-openapi-tests/springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api/v31/app8/EmployeeController.java