Created
July 3, 2019 06:13
-
-
Save juliuscanute/82e1359862617749235f22924f822e0d to your computer and use it in GitHub Desktop.
Get words in a page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/v1/dictionary/page/{pageNo}: | |
get: | |
tags: | |
- 'Query Dictionary' | |
parameters: | |
- name: pageNo | |
in: path | |
required: true | |
description: Page number of the dictionary | |
schema: | |
type: integer | |
format: int64 | |
minimum: 1 | |
example: 1 | |
responses: | |
'200': | |
description: 'Success' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Dictionary' | |
example: | |
currentPage: 1 | |
words: | |
- id: 1 | |
word: Abarticulation | |
meaning: Articulation, usually that kind of articulation which admits of free motion in the joint; diarthrosis. | |
- id: 2 | |
word: Abase | |
meaning: To cast down or reduce low or lower, as in rank, office, condition in life, or estimation of worthiness; to depress; to humble; to degrade. | |
'404': | |
description: 'Requested page not found' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ErrorMessage' | |
example: | |
message: 'Page not found' | |
path: '/v1/dictionary/page/4' | |
'500': | |
description: 'Internal server error' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ErrorMessage' | |
example: | |
message: 'An error has occurred' | |
path: '/v1/dictionary/page/4' | |
components: | |
Dictionary: | |
type: 'object' | |
properties: | |
currentPage: | |
type: 'integer' | |
description: 'Current page number' | |
words: | |
type: 'array' | |
items: | |
$ref: '#/components/schemas/Meaning' | |
Meaning: | |
type: 'object' | |
properties: | |
id: | |
type: 'integer' | |
description: 'Word ID' | |
word: | |
type: 'string' | |
description: 'Word' | |
meaning: | |
type: 'string' | |
description: 'Meaning of the word' | |
ErrorMessage: | |
type: 'object' | |
properties: | |
message: | |
type: 'string' | |
description: 'Description of the error' | |
path: | |
type: 'string' | |
description: 'Identity of the resource' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment