-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenapi.yaml
97 lines (97 loc) · 2.54 KB
/
openapi.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
openapi: 3.1.0
info:
title: glass-pane
description: An attempt at a glass pane through which to view the internals of power. 🪟
termsOfService: https://github.com/MattMoony/glass-pane/blob/master/LICENSE
version: 0.0.1
license:
name: GNU General Public License v3.0
identifier: GPL-3.0-or-later
contact:
name: MattMoony
url: https://github.com/MattMoony
externalDocs:
description: General documentation
url: https://github.com/MattMoony/glass-pane/
servers:
- url: http://localhost:8888
description: Currently not public (locally hosted).
tags:
- name: organs
description: All operations relating to base organs.
- name: people
description: All operatoins relating to people.
- name: organizations
description: All operations relating to organizations.
paths:
/organ/{organId}:
get:
tags:
- organs
summary: Get an organ by its ID.
description: Get an organ by its ID.
operationId: organ-get
parameters:
- in: path
name: organId
schema:
type: integer
required: true
description: Numeric ID of the organ to get.
responses:
"200":
description: The target organ, if found.
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/Response"
- type: object
properties:
organ:
$ref: "#/components/schemas/Organ"
examples:
ValidResponse:
description: Valid Response.
value:
success: true
organ:
id: 8
bio: This is some info bla bla.
InvalidResponse:
$ref: "#/components/examples/InvalidResponse"
components:
schemas:
Response:
type: object
required:
- success
properties:
success:
type: boolean
msg:
type: string
Organ:
type: object
required:
- id
properties:
id:
type: integer
bio:
type: string
examples:
ValidResponse:
description: Valid response.
value:
success: true
InvalidResponse:
description: Invalid response.
value:
success: false
msg: Missing parameters.
SampleOrgan:
description: A sample organ.
value:
id: 8
bio: Some description bla bla.