@@ -43,7 +43,7 @@ public ProductController(final ProductService productService) {
4343 @ Operation (summary = "Get all products." )
4444 @ ApiResponses (value = {
4545 @ ApiResponse (responseCode = "200" , description = "When all the products have been returned." ,
46- content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = Product .class )) })
46+ content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = ProductResponse .class )) })
4747 })
4848 @ GetMapping
4949 public ResponseEntity <List <ProductResponse >> getAllProducts () {
@@ -54,7 +54,7 @@ public ResponseEntity<List<ProductResponse>> getAllProducts() {
5454 @ Operation (summary = "Get a single product." )
5555 @ ApiResponses (value = {
5656 @ ApiResponse (responseCode = "200" , description = "When the product with the provided id has been found." ,
57- content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = Product .class )) }),
57+ content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = ProductResponse .class )) }),
5858 @ ApiResponse (responseCode = "404" , description = "When the product with the given id does not exist." ,
5959 content = { @ Content (mediaType = "application/problem+json" ,
6060 schema = @ Schema (implementation = ErrorResponse .class )) })
@@ -67,7 +67,7 @@ public ResponseEntity<ProductResponse> getProductById(@Valid @PathVariable @NotN
6767 @ Operation (summary = "Create a new product." )
6868 @ ApiResponses (value = {
6969 @ ApiResponse (responseCode = "201" , description = "When the product has been created." ,
70- content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = Product .class )) }),
70+ content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = ProductResponse .class )) }),
7171 @ ApiResponse (responseCode = "400" , description = "When invalid parameters are provided." ,
7272 content = { @ Content (mediaType = "application/problem+json" ,
7373 schema = @ Schema (implementation = ErrorResponse .class )) })
@@ -80,7 +80,7 @@ public ResponseEntity<ProductResponse> addProduct(@Valid @RequestBody final Prod
8080 @ Operation (summary = "Update an existing product." )
8181 @ ApiResponses (value = {
8282 @ ApiResponse (responseCode = "200" , description = "When the product has been updated." ,
83- content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = Product .class )) }),
83+ content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = ProductResponse .class )) }),
8484 @ ApiResponse (responseCode = "400" , description = "When invalid parameters are provided." ,
8585 content = { @ Content (mediaType = "application/problem+json" ,
8686 schema = @ Schema (implementation = ErrorResponse .class )) }),
@@ -97,7 +97,7 @@ public ResponseEntity<ProductResponse> updateProduct(@PathVariable @NotNull fina
9797 @ Operation (summary = "Retire an existing product." )
9898 @ ApiResponses (value = {
9999 @ ApiResponse (responseCode = "200" , description = "When the product has been retired." ,
100- content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = Product .class )) }),
100+ content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = ProductResponse .class )) }),
101101 @ ApiResponse (responseCode = "404" , description = "When the product with the given id does not exist." ,
102102 content = { @ Content (mediaType = "application/problem+json" ,
103103 schema = @ Schema (implementation = ErrorResponse .class )) }),
0 commit comments