Skip to content

Commit 34ef9ec

Browse files
Update search API docs
1 parent cab27a0 commit 34ef9ec

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/server/src/routes/pkg/search.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ pub struct SearchQuery {
4646
tag = "Packages",
4747
params(
4848
("q" = Option<String>, Query, description = "The query string"),
49-
("page" = Option<i64>, Query, description = "The current page (zero-based indexed) - defaults to 0"),
50-
("per_page" = Option<i64>, Query, description = "How many items per page - defaults to 25"),
49+
("page" = Option<usize>, Query, description = "The current page. Defaults to 1"),
50+
("per_page" = Option<usize>, Query, description = "How many items per page. Defaults to 25."),
51+
("sort" = Option<Sort>, Query, description = "The sort mode. Defaults to None."),
52+
("dir" = Option<SortMode>, Query, description = "The sort direction. Defaults to None."),
53+
("filters" = Option<Vec<Facet>>, Query, description = "The search filters. This should be serialized as a `Vec<(String, Vec<String>)>` where the first element of the tuple is the facet name and the second is the value(s)."),
5154
),
5255
responses(
5356
(status = 200, description = "Method returned ok", body = SearchResults),

0 commit comments

Comments
 (0)