Skip to content

Commit 12c9c1e

Browse files
committed
Update API spec
1 parent c94eea4 commit 12c9c1e

2 files changed

Lines changed: 410 additions & 5 deletions

File tree

public/api-spec-v1.json

Lines changed: 240 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,46 @@
3232
"links": {}
3333
},
3434
"400": {
35-
"description": "Invalid input"
35+
"description": "Invalid input",
36+
"content": {
37+
"application/ld+json": {
38+
"schema": {
39+
"$ref": "#/components/schemas/Error.jsonld"
40+
}
41+
},
42+
"application/problem+json": {
43+
"schema": {
44+
"$ref": "#/components/schemas/Error"
45+
}
46+
},
47+
"application/json": {
48+
"schema": {
49+
"$ref": "#/components/schemas/Error"
50+
}
51+
}
52+
},
53+
"links": {}
3654
},
3755
"422": {
38-
"description": "Unprocessable entity"
56+
"description": "An error occurred",
57+
"content": {
58+
"application/ld+json": {
59+
"schema": {
60+
"$ref": "#/components/schemas/ConstraintViolation.jsonld-jsonld"
61+
}
62+
},
63+
"application/problem+json": {
64+
"schema": {
65+
"$ref": "#/components/schemas/ConstraintViolation-json"
66+
}
67+
},
68+
"application/json": {
69+
"schema": {
70+
"$ref": "#/components/schemas/ConstraintViolation-json"
71+
}
72+
}
73+
},
74+
"links": {}
3975
}
4076
},
4177
"summary": "Creates a DetectionResult resource.",
@@ -63,6 +99,110 @@
6399
},
64100
"components": {
65101
"schemas": {
102+
"ConstraintViolation-json": {
103+
"type": "object",
104+
"description": "Unprocessable entity",
105+
"deprecated": false,
106+
"properties": {
107+
"status": {
108+
"default": 422,
109+
"example": 422,
110+
"type": "integer"
111+
},
112+
"violations": {
113+
"type": "array",
114+
"items": {
115+
"type": "object",
116+
"properties": {
117+
"propertyPath": {
118+
"type": "string",
119+
"description": "The property path of the violation"
120+
},
121+
"message": {
122+
"type": "string",
123+
"description": "The message associated with the violation"
124+
}
125+
}
126+
}
127+
},
128+
"detail": {
129+
"readOnly": true,
130+
"type": "string"
131+
},
132+
"type": {
133+
"readOnly": true,
134+
"type": "string"
135+
},
136+
"title": {
137+
"readOnly": true,
138+
"type": [
139+
"string",
140+
"null"
141+
]
142+
},
143+
"instance": {
144+
"readOnly": true,
145+
"type": [
146+
"string",
147+
"null"
148+
]
149+
}
150+
}
151+
},
152+
"ConstraintViolation.jsonld-jsonld": {
153+
"type": "object",
154+
"description": "Unprocessable entity",
155+
"deprecated": false,
156+
"properties": {
157+
"status": {
158+
"default": 422,
159+
"example": 422,
160+
"type": "integer"
161+
},
162+
"violations": {
163+
"type": "array",
164+
"items": {
165+
"type": "object",
166+
"properties": {
167+
"propertyPath": {
168+
"type": "string",
169+
"description": "The property path of the violation"
170+
},
171+
"message": {
172+
"type": "string",
173+
"description": "The message associated with the violation"
174+
}
175+
}
176+
}
177+
},
178+
"detail": {
179+
"readOnly": true,
180+
"type": "string"
181+
},
182+
"description": {
183+
"readOnly": true,
184+
"type": "string"
185+
},
186+
"type": {
187+
"readOnly": true,
188+
"type": "string"
189+
},
190+
"title": {
191+
"readOnly": true,
192+
"type": [
193+
"string",
194+
"null"
195+
]
196+
},
197+
"instance": {
198+
"readOnly": true,
199+
"type": [
200+
"string",
201+
"null"
202+
]
203+
}
204+
}
205+
},
66206
"DetectionResult-write": {
67207
"type": "object",
68208
"description": "",
@@ -78,6 +218,99 @@
78218
"type": "string"
79219
}
80220
}
221+
},
222+
"Error": {
223+
"type": "object",
224+
"description": "A representation of common errors.",
225+
"deprecated": false,
226+
"properties": {
227+
"title": {
228+
"readOnly": true,
229+
"description": "A short, human-readable summary of the problem.",
230+
"type": [
231+
"string",
232+
"null"
233+
]
234+
},
235+
"detail": {
236+
"readOnly": true,
237+
"description": "A human-readable explanation specific to this occurrence of the problem.",
238+
"type": [
239+
"string",
240+
"null"
241+
]
242+
},
243+
"status": {
244+
"type": "number",
245+
"examples": [
246+
404
247+
],
248+
"default": 400
249+
},
250+
"instance": {
251+
"readOnly": true,
252+
"description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",
253+
"type": [
254+
"string",
255+
"null"
256+
]
257+
},
258+
"type": {
259+
"readOnly": true,
260+
"description": "A URI reference that identifies the problem type",
261+
"type": "string"
262+
}
263+
}
264+
},
265+
"Error.jsonld": {
266+
"type": "object",
267+
"description": "A representation of common errors.",
268+
"deprecated": false,
269+
"properties": {
270+
"title": {
271+
"readOnly": true,
272+
"description": "A short, human-readable summary of the problem.",
273+
"type": [
274+
"string",
275+
"null"
276+
]
277+
},
278+
"detail": {
279+
"readOnly": true,
280+
"description": "A human-readable explanation specific to this occurrence of the problem.",
281+
"type": [
282+
"string",
283+
"null"
284+
]
285+
},
286+
"status": {
287+
"type": "number",
288+
"examples": [
289+
404
290+
],
291+
"default": 400
292+
},
293+
"instance": {
294+
"readOnly": true,
295+
"description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",
296+
"type": [
297+
"string",
298+
"null"
299+
]
300+
},
301+
"type": {
302+
"readOnly": true,
303+
"description": "A URI reference that identifies the problem type",
304+
"type": "string"
305+
},
306+
"description": {
307+
"readOnly": true,
308+
"type": [
309+
"string",
310+
"null"
311+
]
312+
}
313+
}
81314
}
82315
},
83316
"responses": {},
@@ -99,6 +332,10 @@
99332
"apiKey": []
100333
}
101334
],
102-
"tags": [],
335+
"tags": [
336+
{
337+
"name": "DetectionResult"
338+
}
339+
],
103340
"webhooks": {}
104341
}

0 commit comments

Comments
 (0)