Software Development, Programming, API, Software Engineering, Product Development.
("2".equals(version)) { // Fetch and return product details for version 2 Product product = new Product(id, "Product Name v2", "Description v2", "Additional Field v2"); return ResponseEntity.ok(product); } else { return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(null); } } } Media Type