Update repositories search max limit (#1394)

The new max limit is 60.

Signed-off-by: Sergio Castaño Arteaga <tegioz@icloud.com>
This commit is contained in:
Sergio C. Arteaga 2021-06-15 10:51:14 +02:00 committed by GitHub
parent 8ff9b853e7
commit 3aba3a9549
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 21 deletions

View File

@ -612,7 +612,7 @@ paths:
operationId: searchRepositories
parameters:
- $ref: "#/components/parameters/OffsetParam"
- $ref: "#/components/parameters/LimitRepositoriesParam"
- $ref: "#/components/parameters/LimitParam"
- $ref: "#/components/parameters/RepositoryKindsListParam"
- $ref: "#/components/parameters/UsersListParam"
- $ref: "#/components/parameters/OrgsListParam"
@ -939,7 +939,7 @@ paths:
operationId: searchPackages
parameters:
- $ref: "#/components/parameters/OffsetParam"
- $ref: "#/components/parameters/LimitPackagesParam"
- $ref: "#/components/parameters/LimitParam"
- $ref: "#/components/parameters/FacetsParam"
- $ref: "#/components/parameters/TSQueryWebParam"
- $ref: "#/components/parameters/TSQueryParam"
@ -3855,15 +3855,6 @@ components:
default: false
required: true
description: Whether we should get facets or not
LimitPackagesParam:
in: query
name: limit
schema:
type: integer
default: 20
maximum: 60
required: false
description: The number of packages to return
LimitParam:
in: query
name: limit
@ -3873,15 +3864,6 @@ components:
maximum: 60
required: false
description: The number of items to return
LimitRepositoriesParam:
in: query
name: limit
schema:
type: integer
default: 20
maximum: 50
required: false
description: The number of packages to return
OffsetParam:
in: query
name: offset

View File

@ -19,7 +19,7 @@ import (
const (
logoSVG = `<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-hexagon"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path></svg>`
searchDefaultLimit = 20
searchMaxLimit = 50
searchMaxLimit = 60
)
// Handlers represents a group of http handlers in charge of handling