-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dobby.swagger.yaml
186 lines (179 loc) · 4.09 KB
/
Dobby.swagger.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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
swagger: 2.0
info:
title: Dobby API
schemes:
- http
host: localhost:8080
basePath: /
parameters:
id:
name: id
description: An identifier
type: string
in: path
required: true
id1:
name: id1
description: A source identifier
type: string
in: path
required: true
id2:
name: id2
description: A destination identifier
type: string
in: path
required: true
definitions:
Metadata:
type: object
additionalProperties:
type: object
properties:
value: any
timestamp: { type: string }
publisher_id: { type: string }
IdInfo:
type: object
properties:
identifier: { type: string }
metadata:
$ref: "#/definitions/Metadata"
LinkInfo:
type: object
properties:
link: { type: string }
metadata:
$ref: "#/definitions/Metadata"
SearchParams:
type: object
properties:
max_depth: { type: integer }
traversal: { type: string }
max_size: { type: integer }
match_metadata: { type: object }
match_links: { type: object }
match_terminal: { type: object }
match_path:
type: array
items:
type: array
items:
type: object
properties:
element: { type: string }
metadata: { type: object }
results_filter:
type: array
items: { type: string }
SearchResult:
type: array
items:
type: object
properties:
identifiers:
type: array
items:
$ref: "#/definitions/IdInfo"
links:
type: array
items:
$ref: "#/definitions/LinkInfo"
paths:
/identifier/{id}:
get:
tags: [ dobby ]
operationId: get_id
parameters:
- $ref: "#/parameters/id"
description: Get identifier details
responses:
200:
description: Ok
schema:
$ref: "#/definitions/IdInfo"
post:
tags: [ dobby ]
operationId: create_id
parameters:
- $ref: "#/parameters/id"
- name: info
schema:
type: object
properties:
metadata:
type: object
in: body
required: true
description: Create an identifier
responses:
201: { description: Created }
delete:
tags: [ dobby ]
operationId: delete_id
parameters:
- $ref: "#/parameters/id"
description: Delete an identifier
responses:
204: { description: Deleted }
/link/{id1}/{id2}:
get:
tags: [ dobby ]
operationId: get_link
parameters:
- $ref: "#/parameters/id1"
- $ref: "#/parameters/id2"
description: Get link details
responses:
200:
description: Ok
schema:
$ref: "#/definitions/LinkInfo"
post:
tags: [ dobby ]
operationId: create_link
parameters:
- $ref: "#/parameters/id1"
- $ref: "#/parameters/id2"
- name: info
schema:
type: object
properties:
metadata:
type: object
in: body
required: true
description: Create a link
responses:
201: { description: Created }
delete:
tags: [ dobby ]
operationId: delete_link
parameters:
- $ref: "#/parameters/id1"
- $ref: "#/parameters/id2"
description: Delete a link
responses:
204: { description: Deleted }
/identifier/{what}/search:
post:
tags: [ dobby ]
operationId: search
parameters:
- name: what
description: A search string
type: string
in: path
required: true
- name: params
description: Search parameters
schema:
$ref: "#/definitions/SearchParams"
in: body
required: true
description: Search
responses:
200:
description: Search ok
schema:
$ref: "#/definitions/SearchResult"