-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdigimon-api.yaml
77 lines (76 loc) · 1.92 KB
/
digimon-api.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
openapi: 3.0.1
info:
title: Digimon API
description: A simple API to retrieve information about Digimons
version: 1.0.0
servers:
- url: https://digimon-api.vercel.app/api
paths:
/digimon:
get:
summary: All digimons
description: Returns an array of all Digimons in our database.
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Digimon'
/digimon/name/{name}:
get:
summary: Single digimon
description: Gets a single digimon by its name
parameters:
- name: name
in: path
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Digimon'
/digimon/level/{level}:
get:
summary: Search by level
description: Returns an array of Digimons based on their level.
parameters:
- name: level
in: path
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Digimon'
components:
schemas:
Digimon:
type: object
properties:
name:
type: string
description: Digimon name
example: Koromon
img:
type: string
description: Link to digimon's picture
example: https://digimon.shadowsmith.com/img/koromon.jpg
level:
type: string
description: Digimon level.
example: In Training