to add Swagger generated API documentation, I do: A) add this dependency to the project pom.xml org.springdoc springdoc-openapi-starter-webmvc-ui 2.0.3 B) open a Browser to: http://localhost:9091/swagger-ui/index.html To see the actual Open-Api data use this URL: http://localhost:9091/v3/api-docs (JSON format) http://localhost:9091/v3/api-docs.yaml (YAML format) I can customize the generated documentation by adding Open-API annotations tot my RestController @Operation(summary = "Get a specific Route by Route Code") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Found the Route", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = Route.class)) }), @ApiResponse(responseCode = "400", description = "Invalid code format", content = @Content), @ApiResponse(responseCode = "404", description = "Route not found", content = @Content) }) @GetMapping(value="/route/{code}", produces="application/json") Route getRouteByCode(@PathVariable String code) throws IOException; and my implementation has this code: @Override public Route getRouteByCode(String code) throws IOException { if (code.length() < 2) { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The code must be at least 2 chars in length"); } Route route = routeService.getRouteByCode(code); if (route == null) { throw new ResponseStatusException(HttpStatus.NOT_FOUND, "The route cannot be found"); } return route; } I you would like your Message included in the HttpResponse error, you add this to the application.properties file server.error.include-message=always