Skip to content

Commit

Permalink
feat : Remove implicit web annotation names
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed Nov 16, 2023
1 parent 993f45c commit bb18e9b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,13 @@ public ProductController(ProductService productService) {

@GetMapping
public Mono<PagedResult<ProductResponse>> getAllPosts(
@RequestParam(
value = "pageNo",
defaultValue = AppConstants.DEFAULT_PAGE_NUMBER,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false)
int pageNo,
@RequestParam(
value = "pageSize",
defaultValue = AppConstants.DEFAULT_PAGE_SIZE,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false)
int pageSize,
@RequestParam(
value = "sortBy",
defaultValue = AppConstants.DEFAULT_SORT_BY,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false)
String sortBy,
@RequestParam(
value = "sortDir",
defaultValue = AppConstants.DEFAULT_SORT_DIRECTION,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false)
String sortDir) {
return productService.findAllProducts(pageNo, pageSize, sortBy, sortDir);
}
Expand All @@ -81,7 +69,7 @@ public Mono<ResponseEntity<ProductResponse>> getProductByProductCode(

@GetMapping("/exists")
public Mono<ResponseEntity<Boolean>> productExistsByProductCodes(
@RequestParam(name = "productCodes") List<String> productCodes) {
@RequestParam List<String> productCodes) {
return productService.productExistsByProductCodes(productCodes).map(ResponseEntity::ok);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,13 @@ public class InventoryController {

@GetMapping
public PagedResult<Inventory> getAllInventories(
@RequestParam(
value = "pageNo",
defaultValue = AppConstants.DEFAULT_PAGE_NUMBER,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false)
int pageNo,
@RequestParam(
value = "pageSize",
defaultValue = AppConstants.DEFAULT_PAGE_SIZE,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false)
int pageSize,
@RequestParam(
value = "sortBy",
defaultValue = AppConstants.DEFAULT_SORT_BY,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false)
String sortBy,
@RequestParam(
value = "sortDir",
defaultValue = AppConstants.DEFAULT_SORT_DIRECTION,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false)
String sortDir) {
return inventoryService.findAllInventories(pageNo, pageSize, sortBy, sortDir);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ Licensed under MIT License Copyright (c) 2022-2023 Raja Kolli.
public interface CatalogServiceProxy {

@GetExchange("/api/catalog/exists")
boolean productsExistsByCodes(@RequestParam(name = "productCodes") List<String> productCodes);
boolean productsExistsByCodes(@RequestParam List<String> productCodes);
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,13 @@ public class OrderController implements OrderApi {

@GetMapping
public PagedResult<OrderResponse> getAllOrders(
@RequestParam(
value = "pageNo",
defaultValue = AppConstants.DEFAULT_PAGE_NUMBER,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false)
int pageNo,
@RequestParam(
value = "pageSize",
defaultValue = AppConstants.DEFAULT_PAGE_SIZE,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false)
int pageSize,
@RequestParam(
value = "sortBy",
defaultValue = AppConstants.DEFAULT_SORT_BY,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false)
String sortBy,
@RequestParam(
value = "sortDir",
defaultValue = AppConstants.DEFAULT_SORT_DIRECTION,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false)
String sortDir) {
return orderService.findAllOrders(pageNo, pageSize, sortBy, sortDir);
}
Expand Down Expand Up @@ -126,15 +114,9 @@ public boolean create() {
@GetMapping("/all")
@Override
public List<OrderDto> all(
@RequestParam(
value = "pageNo",
defaultValue = AppConstants.DEFAULT_PAGE_NUMBER,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false)
int pageNo,
@RequestParam(
value = "pageSize",
defaultValue = AppConstants.DEFAULT_PAGE_SIZE,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false)
int pageSize) {
return orderKafkaStreamService.getAllOrders(pageNo, pageSize);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,13 @@ public class CustomerController {

@GetMapping
public PagedResult<CustomerResponse> getAllCustomers(
@RequestParam(
value = "pageNo",
defaultValue = AppConstants.DEFAULT_PAGE_NUMBER,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false)
int pageNo,
@RequestParam(
value = "pageSize",
defaultValue = AppConstants.DEFAULT_PAGE_SIZE,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false)
int pageSize,
@RequestParam(
value = "sortBy",
defaultValue = AppConstants.DEFAULT_SORT_BY,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false)
String sortBy,
@RequestParam(
value = "sortDir",
defaultValue = AppConstants.DEFAULT_SORT_DIRECTION,
required = false)
@RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false)
String sortDir) {
FindCustomersQuery findCustomersQuery =
new FindCustomersQuery(pageNo, pageSize, sortBy, sortDir);
Expand Down

0 comments on commit bb18e9b

Please sign in to comment.