Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit b3226b3

Browse files
committed
Try to add multipe refs to a response object
1 parent 1f9b162 commit b3226b3

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

open-api.yaml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ servers:
2525
description: 'https://example.meilisearch.com:7700'
2626
components:
2727
schemas:
28+
limit:
29+
type: integer
30+
description: Limit given for the query
31+
example: 10
32+
offset:
33+
type: integer
34+
description: Offset given for the query
35+
example: 0
36+
total:
37+
type: integer
38+
description: Total number of browsable results using offset/limit parameters for the given resource.
39+
example: 50
2840
timestamp:
2941
type: string
3042
description: An `RFC 3339` format for date/time/duration.
@@ -680,14 +692,14 @@ components:
680692
limit:
681693
name: limit
682694
in: query
683-
description: Maximum number of documents to return.
695+
description: Maximum number of results to return.
684696
schema:
685697
type: number
686698
default: 20
687699
offset:
688700
name: offset
689701
in: query
690-
description: Number of documents to skip.
702+
description: Number of results to skip.
691703
schema:
692704
type: number
693705
default: 0
@@ -1055,6 +1067,10 @@ paths:
10551067
type: array
10561068
items:
10571069
$ref: '#/components/schemas/index'
1070+
allOf:
1071+
- $ref: '#/components/schemas/limit'
1072+
- $ref: '#/components/schemas/offset'
1073+
- $ref: '#/components/schemas/total'
10581074
examples:
10591075
Example:
10601076
value:
@@ -1064,8 +1080,14 @@ paths:
10641080
primaryKey: movie_id
10651081
createdAt: '2019-11-20T09:40:33.711324Z'
10661082
updatedAt: '2019-11-20T09:40:33.711324Z'
1083+
limit: 1
1084+
offset: 0
1085+
total: 1
10671086
'401':
10681087
$ref: '#/components/responses/401'
1088+
parameters:
1089+
- $ref: '#/components/parameters/limit'
1090+
- $ref: '#/components/parameters/offset'
10691091
post:
10701092
operationId: indexes.create
10711093
summary: Create Index
@@ -2668,6 +2690,9 @@ paths:
26682690
updatedAt: '2021-11-12T10:00:00Z'
26692691
'401':
26702692
$ref: '#/components/responses/401'
2693+
parameters:
2694+
- $ref: '#/components/parameters/limit'
2695+
- $ref: '#/components/parameters/offset'
26712696
'/keys/{key}':
26722697
get:
26732698
summary: Get an API key

0 commit comments

Comments
 (0)