Skip to content

Commit 3713d94

Browse files
jenkins-botGerrit Code Review
authored andcommitted
Merge "Search: Add query params for pagination to OpenAPI doc"
2 parents e20debc + 9b9f691 commit 3713d94

File tree

3 files changed

+102
-2
lines changed

3 files changed

+102
-2
lines changed

repo/domains/search/specs/global/parameters.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,29 @@
1616
"pattern": "^[a-z]{2}[a-z0-9-]*$"
1717
},
1818
"example": "en"
19+
},
20+
"Limit": {
21+
"in": "query",
22+
"name": "limit",
23+
"description": "The number of items to show in the results",
24+
"required": false,
25+
"schema": {
26+
"type": "integer",
27+
"minimum": 1,
28+
"maximum": 500,
29+
"default": 10
30+
},
31+
"example": 20
32+
},
33+
"Offset": {
34+
"in": "query",
35+
"name": "offset",
36+
"description": "The index to start showing results from",
37+
"required": false,
38+
"schema": {
39+
"type": "integer",
40+
"default": 0
41+
},
42+
"example": 4
1943
}
2044
}

repo/domains/search/specs/index.fragment.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"$ref": "./global/parameters.json#/SearchQuery",
1818
"example": "potato"
1919
},
20-
{ "$ref": "./global/parameters.json#/SearchLanguage" }
20+
{ "$ref": "./global/parameters.json#/SearchLanguage" },
21+
{ "$ref": "./global/parameters.json#/Limit" },
22+
{ "$ref": "./global/parameters.json#/Offset" }
2123
],
2224
"responses": {
2325
"200": { "$ref": "./global/responses.json#/SearchItemSuccess" },
@@ -36,7 +38,9 @@
3638
"$ref": "./global/parameters.json#/SearchQuery",
3739
"example": "taxon"
3840
},
39-
{ "$ref": "./global/parameters.json#/SearchLanguage" }
41+
{ "$ref": "./global/parameters.json#/SearchLanguage" },
42+
{ "$ref": "./global/parameters.json#/Limit" },
43+
{ "$ref": "./global/parameters.json#/Offset" }
4044
],
4145
"responses": {
4246
"200": { "$ref": "./global/responses.json#/SearchPropertySuccess" },

repo/rest-api/src/openapi.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33617,6 +33617,30 @@
3361733617
"pattern": "^[a-z]{2}[a-z0-9-]*$"
3361833618
},
3361933619
"example": "en"
33620+
},
33621+
{
33622+
"in": "query",
33623+
"name": "limit",
33624+
"description": "The number of items to show in the results",
33625+
"required": false,
33626+
"schema": {
33627+
"type": "integer",
33628+
"minimum": 1,
33629+
"maximum": 500,
33630+
"default": 10
33631+
},
33632+
"example": 20
33633+
},
33634+
{
33635+
"in": "query",
33636+
"name": "offset",
33637+
"description": "The index to start showing results from",
33638+
"required": false,
33639+
"schema": {
33640+
"type": "integer",
33641+
"default": 0
33642+
},
33643+
"example": 4
3362033644
}
3362133645
],
3362233646
"responses": {
@@ -33827,6 +33851,30 @@
3382733851
"pattern": "^[a-z]{2}[a-z0-9-]*$"
3382833852
},
3382933853
"example": "en"
33854+
},
33855+
{
33856+
"in": "query",
33857+
"name": "limit",
33858+
"description": "The number of items to show in the results",
33859+
"required": false,
33860+
"schema": {
33861+
"type": "integer",
33862+
"minimum": 1,
33863+
"maximum": 500,
33864+
"default": 10
33865+
},
33866+
"example": 20
33867+
},
33868+
{
33869+
"in": "query",
33870+
"name": "offset",
33871+
"description": "The index to start showing results from",
33872+
"required": false,
33873+
"schema": {
33874+
"type": "integer",
33875+
"default": 0
33876+
},
33877+
"example": 4
3383033878
}
3383133879
],
3383233880
"responses": {
@@ -34221,6 +34269,30 @@
3422134269
"pattern": "^[a-z]{2}[a-z0-9-]*$"
3422234270
},
3422334271
"example": "en"
34272+
},
34273+
"Limit": {
34274+
"in": "query",
34275+
"name": "limit",
34276+
"description": "The number of items to show in the results",
34277+
"required": false,
34278+
"schema": {
34279+
"type": "integer",
34280+
"minimum": 1,
34281+
"maximum": 500,
34282+
"default": 10
34283+
},
34284+
"example": 20
34285+
},
34286+
"Offset": {
34287+
"in": "query",
34288+
"name": "offset",
34289+
"description": "The index to start showing results from",
34290+
"required": false,
34291+
"schema": {
34292+
"type": "integer",
34293+
"default": 0
34294+
},
34295+
"example": 4
3422434296
}
3422534297
},
3422634298
"requestBodies": {

0 commit comments

Comments
 (0)