@@ -54,7 +54,8 @@ public ResponseEntity<List<Product>> getAllProducts() {
5454 @ ApiResponse (responseCode = "200" , description = "When the product with the provided id has been found." ,
5555 content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = Product .class )) }),
5656 @ ApiResponse (responseCode = "404" , description = "When the product with the given id does not exist." ,
57- content = { @ Content (mediaType = "application/problem+json" , schema = @ Schema (implementation = ErrorResponse .class )) })
57+ content = { @ Content (mediaType = "application/problem+json" ,
58+ schema = @ Schema (implementation = ErrorResponse .class )) })
5859 })
5960 @ GetMapping (path = "/{id}" )
6061 public ResponseEntity <Product > getProductById (@ Valid @ PathVariable @ NotNull final Long id ) {
@@ -66,7 +67,8 @@ public ResponseEntity<Product> getProductById(@Valid @PathVariable @NotNull fina
6667 @ ApiResponse (responseCode = "201" , description = "When the product has been created." ,
6768 content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = Product .class )) }),
6869 @ ApiResponse (responseCode = "400" , description = "When invalid parameters are provided." ,
69- content = { @ Content (mediaType = "application/problem+json" , schema = @ Schema (implementation = ErrorResponse .class )) })
70+ content = { @ Content (mediaType = "application/problem+json" ,
71+ schema = @ Schema (implementation = ErrorResponse .class )) })
7072 })
7173 @ PostMapping
7274 public ResponseEntity <Product > addProduct (@ Valid @ RequestBody final ProductRequest productRequest ) {
@@ -78,9 +80,11 @@ public ResponseEntity<Product> addProduct(@Valid @RequestBody final ProductReque
7880 @ ApiResponse (responseCode = "200" , description = "When the product has been updated." ,
7981 content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = Product .class )) }),
8082 @ ApiResponse (responseCode = "400" , description = "When invalid parameters are provided." ,
81- content = { @ Content (mediaType = "application/problem+json" , schema = @ Schema (implementation = ErrorResponse .class )) }),
83+ content = { @ Content (mediaType = "application/problem+json" ,
84+ schema = @ Schema (implementation = ErrorResponse .class )) }),
8285 @ ApiResponse (responseCode = "404" , description = "When the product with the given id does not exist." ,
83- content = { @ Content (mediaType = "application/problem+json" , schema = @ Schema (implementation = ErrorResponse .class )) })
86+ content = { @ Content (mediaType = "application/problem+json" ,
87+ schema = @ Schema (implementation = ErrorResponse .class )) })
8488 })
8589 @ PutMapping ("/{id}" )
8690 public ResponseEntity <Product > updateProduct (@ PathVariable @ NotNull final Long id ,
@@ -93,9 +97,11 @@ public ResponseEntity<Product> updateProduct(@PathVariable @NotNull final Long i
9397 @ ApiResponse (responseCode = "200" , description = "When the product has been retired." ,
9498 content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = Product .class )) }),
9599 @ ApiResponse (responseCode = "404" , description = "When the product with the given id does not exist." ,
96- content = { @ Content (mediaType = "application/problem+json" , schema = @ Schema (implementation = ErrorResponse .class )) }),
100+ content = { @ Content (mediaType = "application/problem+json" ,
101+ schema = @ Schema (implementation = ErrorResponse .class )) }),
97102 @ ApiResponse (responseCode = "410" , description = "When the product with the given id is already retired." ,
98- content = { @ Content (mediaType = "application/problem+json" , schema = @ Schema (implementation = ErrorResponse .class )) })
103+ content = { @ Content (mediaType = "application/problem+json" ,
104+ schema = @ Schema (implementation = ErrorResponse .class )) })
99105 })
100106 @ DeleteMapping ("/{id}" )
101107 public ResponseEntity <Product > retireProduct (@ PathVariable @ NotNull final Long id ) {
0 commit comments