diff --git a/open-api.yaml b/open-api.yaml index 2c74d355d..5a3085d27 100644 --- a/open-api.yaml +++ b/open-api.yaml @@ -25,6 +25,18 @@ servers: description: 'https://example.meilisearch.com:7700' components: schemas: + limit: + type: integer + description: Limit given for the query + example: 10 + offset: + type: integer + description: Offset given for the query + example: 0 + total: + type: integer + description: Total number of browsable results using offset/limit parameters for the given resource. + example: 50 timestamp: type: string description: An `RFC 3339` format for date/time/duration. @@ -680,14 +692,14 @@ components: limit: name: limit in: query - description: Maximum number of documents to return. + description: Maximum number of results to return. schema: type: number default: 20 offset: name: offset in: query - description: Number of documents to skip. + description: Number of results to skip. schema: type: number default: 0 @@ -1055,6 +1067,10 @@ paths: type: array items: $ref: '#/components/schemas/index' + allOf: + - $ref: '#/components/schemas/limit' + - $ref: '#/components/schemas/offset' + - $ref: '#/components/schemas/total' examples: Example: value: @@ -1064,8 +1080,14 @@ paths: primaryKey: movie_id createdAt: '2019-11-20T09:40:33.711324Z' updatedAt: '2019-11-20T09:40:33.711324Z' + limit: 1 + offset: 0 + total: 1 '401': $ref: '#/components/responses/401' + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' post: operationId: indexes.create summary: Create Index @@ -2668,6 +2690,9 @@ paths: updatedAt: '2021-11-12T10:00:00Z' '401': $ref: '#/components/responses/401' + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' '/keys/{key}': get: summary: Get an API key