Skip to content

Commit

Permalink
update array
Browse files Browse the repository at this point in the history
  • Loading branch information
ntqdinh-axonivy committed Jul 30, 2024
1 parent e3a6f6f commit a7bac17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
Expand Down Expand Up @@ -69,8 +70,10 @@ public FeedbackController(FeedbackService feedbackService, JwtService jwtService
}

@GetMapping(PRODUCT_BY_ID)
@Operation(summary = "Find feedbacks by product id with lazy loading", description = "Get all user feedback by product id (from meta.json) with lazy loading")
@PageableAsQueryParam
@Operation(summary = "Find feedbacks by product id with lazy loading", description = "Get all user feedback by product id (from meta.json) with lazy loading", parameters = {
@Parameter(name = "page", description = "Page number to retrieve", in = ParameterIn.QUERY, example = "0", required = true),
@Parameter(name = "size", description = "Number of items per page", in = ParameterIn.QUERY, example = "20", required = true),
@Parameter(name = "sort", description = "Sorting criteria in the format: Sorting criteria(popularity|alphabetically|recent), Sorting order(asc|desc)", in = ParameterIn.QUERY, example = "[\"popularity\",\"asc\"]", required = true)})
public ResponseEntity<PagedModel<FeedbackModel>> findFeedbacks(@PathVariable(ID)
@Parameter(description = "Product id (from meta.json)", example = "portal", in = ParameterIn.PATH)
String productId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ public ProductController(ProductService productService, GitHubService gitHubServ
@Operation(summary = "Find all products", description = "Be default system will finds product by type as 'all'", parameters = {
@Parameter(name = "page", description = "Page number to retrieve", in = ParameterIn.QUERY, example = "0", required = true),
@Parameter(name = "size", description = "Number of items per page", in = ParameterIn.QUERY, example = "20", required = true),
@Parameter(name = "sort", description = "Sorting criteria in the format: property(popularity|alphabetically|recent),(asc|desc)", in = ParameterIn.QUERY, example = "popularity,asc", required = true)
})
@Parameter(name = "sort", description = "Sorting criteria in the format: Sorting criteria(popularity|alphabetically|recent), Sorting order(asc|desc)", in = ParameterIn.QUERY, example = "[\"popularity\",\"asc\"]", required = true)})
public ResponseEntity<PagedModel<ProductModel>> findProducts(@RequestParam(name = TYPE)
@Parameter(description = "Type of product.", in = ParameterIn.QUERY,
schema = @Schema(type = "string", allowableValues = {"all", "connectors", "utilities", "solutions", "demos"}))
Expand Down

0 comments on commit a7bac17

Please sign in to comment.