-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathopenapi.yaml
More file actions
78 lines (73 loc) · 1.98 KB
/
openapi.yaml
File metadata and controls
78 lines (73 loc) · 1.98 KB
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
78
openapi: 3.0.3
info:
title: Planets and Webhooks Demo API
version: 0.0.1
description: Simple flask-backed API showing some example API endpoints and with webhook debugging features.
contact:
name: Lorna Mitchell
url: https://github.com/lornajane/flask-planets-and-webhooks
email: github@lornajane.net
servers:
- url: http://localhost:5000
description: Sample project running locally
externalDocs:
description: GitHub project for the code and information about this API
url: https://github.com/lornajane/flask-planets-and-webhooks
paths:
/planets:
get:
operationId: allPlanets
summary: List all planets
description: Returns a list of all the planets that are stored in the system.
tags:
- planets
responses:
'200':
description: Planets in a list
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/planet"
/planets/{planetId}:
get:
operationId: onePlanet
summary: Fetch one planet by position
description: Get the data relating to one planet
tags:
- planets
parameters:
- name: planetId
in: path
required: true
schema:
type: number
example: 4
responses:
'200':
description: Planets in a list
content:
application/json:
schema:
$ref: "#/components/schemas/planet"
components:
schemas:
planet:
type: object
properties:
name:
type: string
description: Name of planet
example: "Saturn"
position:
type: number
description: Order in place from the sun
example: 6
moons:
type: number
description: Number of moons, according to NASA
example: 62
tags:
- name: planets
description: API containing solar system data