-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
164 lines (162 loc) · 4.18 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
openapi: 3.0.3
info:
title: Example of Issue
description: Mapping Error
version: 1.0.0
servers:
- url: 'https://localhost:8080'
x-realms: ['internal-realm', 'external-realm']
paths:
/funding/v1/thing/{thingId}:
parameters:
- name: thingId
in: path
required: true
description: Id of the thing
schema:
type: string
format: uuid
get:
summary: Retrieve a thing configuration
operationId: getDeal
tags:
- thing
responses:
'200':
description: The retrieved thing
content:
application/json:
schema:
$ref: '#/components/schemas/Thing'
'404':
description: No thing found for the passed id
delete:
summary: Delete a thing configuration
operationId: deleteDeal
tags:
- thing
responses:
'200':
description: The retrieved thing
content:
application/json:
schema:
$ref: '#/components/schemas/Thing'
'404':
description: No thing found for the passed id
put:
summary: Replace a thing configuration with the passed thing
operationId: replaceDeal
tags:
- thing
requestBody:
required: true
description: Thing details
content:
application/json:
schema:
$ref: "#/components/schemas/Thing"
responses:
'200':
description: Successfully replaced the thing
content:
application/json:
schema:
$ref: '#/components/schemas/Thing'
'400':
description: Invalid data was passed
'404':
description: No thing found for the passed id
patch:
summary: Update a thing configuration with any fields present on the passed thing
operationId: updateDeal
tags:
- thing
requestBody:
required: true
description: Thing details
content:
application/json:
schema:
$ref: "#/components/schemas/Thing"
responses:
'200':
description: Successfully updated the thing
content:
application/json:
schema:
$ref: '#/components/schemas/Thing'
'400':
description: Invalid data was passed
'404':
description: No thing found for the passed id
/funding/v1/thing:
post:
summary: Store a thing configuration
operationId: addDeal
tags:
- thing
requestBody:
required: true
description: Thing details
content:
application/json:
schema:
$ref: "#/components/schemas/Thing"
responses:
'200':
description: Successfully stored the thing
content:
application/json:
schema:
$ref: '#/components/schemas/Thing'
'400':
description: Invalid data was passed
get:
summary: Retrieve thing configurations
operationId: getDeals
tags:
- thing
responses:
'200':
description: The retrieved deals
content:
application/json:
schema:
$ref: '#/components/schemas/ThingArray'
components:
schemas:
Thing:
type: object
description: The API model for a Thing
properties:
id:
description: The identifier of this thing
type: string
format: uuid
cash-value:
$ref: '#/components/schemas/CustomThing'
date-one:
description: An example od a date
type: string
format: date
date-time-one:
description: An example od a date-time
type: string
format: date-time
ThingArray:
type: array
items:
$ref: '#/components/schemas/Thing'
CustomThing:
type: object
properties:
name:
type: string
type:
$ref: '#/components/schemas/CustomEnum'
CustomEnum:
type: string
description: a type
enum:
- ONETHING