@twin.org/blob-storage-service 0.0.1-next.8 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/cjs/index.cjs +643 -114
  2. package/dist/esm/index.mjs +645 -117
  3. package/dist/types/blobStorageRoutes.d.ts +17 -3
  4. package/dist/types/blobStorageService.d.ts +55 -31
  5. package/dist/types/entities/blobStorageEntry.d.ts +55 -0
  6. package/dist/types/index.d.ts +2 -1
  7. package/dist/types/models/IBlobStorageServiceConfig.d.ts +9 -2
  8. package/dist/types/models/IBlobStorageServiceConstructorOptions.d.ts +19 -0
  9. package/dist/types/restEntryPoints.d.ts +5 -0
  10. package/docs/changelog.md +161 -1
  11. package/docs/open-api/spec.json +1230 -1853
  12. package/docs/reference/classes/BlobStorageEntry.md +109 -0
  13. package/docs/reference/classes/BlobStorageService.md +188 -49
  14. package/docs/reference/functions/blobStorageCreate.md +9 -3
  15. package/docs/reference/functions/blobStorageGet.md +9 -3
  16. package/docs/reference/functions/blobStorageGetContent.md +9 -3
  17. package/docs/reference/functions/blobStorageList.md +31 -0
  18. package/docs/reference/functions/blobStorageRemove.md +9 -3
  19. package/docs/reference/functions/blobStorageUpdate.md +9 -3
  20. package/docs/reference/functions/generateRestRoutesBlobStorage.md +24 -4
  21. package/docs/reference/index.md +3 -1
  22. package/docs/reference/interfaces/IBlobStorageServiceConfig.md +17 -7
  23. package/docs/reference/interfaces/IBlobStorageServiceConstructorOptions.md +33 -0
  24. package/docs/reference/variables/restEntryPoints.md +4 -0
  25. package/locales/en.json +2 -1
  26. package/package.json +15 -13
  27. package/dist/types/entities/blobMetadata.d.ts +0 -22
  28. package/docs/reference/classes/BlobMetadata.md +0 -45
@@ -1,1854 +1,1231 @@
1
1
  {
2
- "openapi": "3.1.0",
3
- "info": {
4
- "title": "TWIN - Test Endpoints",
5
- "description": "REST API for TWIN - Test Endpoints.",
6
- "version": "1.0.0",
7
- "license": {
8
- "name": "Apache 2.0 License",
9
- "url": "https://opensource.org/licenses/Apache-2.0"
10
- }
11
- },
12
- "servers": [
13
- {
14
- "url": "https://localhost"
15
- }
16
- ],
17
- "tags": [
18
- {
19
- "name": "Blob Storage",
20
- "description": "Endpoints which are modelled to access a blob storage contract."
21
- }
22
- ],
23
- "paths": {
24
- "/blob": {
25
- "post": {
26
- "operationId": "blobStorageCreate",
27
- "summary": "Create a blob in to storage",
28
- "tags": [
29
- "Blob Storage"
30
- ],
31
- "security": [
32
- {
33
- "jwtBearerAuthScheme": []
34
- }
35
- ],
36
- "requestBody": {
37
- "description": "Request to create an entry in blob storage.",
38
- "required": true,
39
- "content": {
40
- "application/json": {
41
- "schema": {
42
- "$ref": "#/components/schemas/BlobStorageCreateRequest"
43
- },
44
- "examples": {
45
- "blobStorageCreateExample": {
46
- "value": {
47
- "blob": "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw==",
48
- "metadata": {
49
- "@context": "http://schema.org/",
50
- "@type": "DigitalDocument",
51
- "name": "myfile.pdf"
52
- }
53
- }
54
- }
55
- }
56
- }
57
- }
58
- },
59
- "responses": {
60
- "201": {
61
- "description": "The rest request ended in created response.",
62
- "headers": {
63
- "location": {
64
- "schema": {
65
- "type": "string"
66
- },
67
- "description": "e.g. blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70"
68
- }
69
- }
70
- },
71
- "400": {
72
- "description": "The server cannot process the request, see the content for more details.",
73
- "content": {
74
- "application/json": {
75
- "schema": {
76
- "$ref": "#/components/schemas/Error"
77
- },
78
- "examples": {
79
- "exampleResponse": {
80
- "value": {
81
- "name": "GeneralError",
82
- "message": "component.error",
83
- "properties": {
84
- "foo": "bar"
85
- }
86
- }
87
- }
88
- }
89
- }
90
- }
91
- },
92
- "401": {
93
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
94
- "content": {
95
- "application/json": {
96
- "schema": {
97
- "$ref": "#/components/schemas/Error"
98
- },
99
- "examples": {
100
- "exampleResponse": {
101
- "value": {
102
- "name": "UnauthorizedError",
103
- "message": "component.error"
104
- }
105
- }
106
- }
107
- }
108
- }
109
- },
110
- "500": {
111
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
112
- "content": {
113
- "application/json": {
114
- "schema": {
115
- "$ref": "#/components/schemas/Error"
116
- },
117
- "examples": {
118
- "exampleResponse": {
119
- "value": {
120
- "name": "InternalServerError",
121
- "message": "component.error"
122
- }
123
- }
124
- }
125
- }
126
- }
127
- }
128
- }
129
- }
130
- },
131
- "/blob/{id}": {
132
- "get": {
133
- "operationId": "blobStorageGet",
134
- "summary": "Get the blob metadata from storage",
135
- "tags": [
136
- "Blob Storage"
137
- ],
138
- "parameters": [
139
- {
140
- "name": "id",
141
- "description": "The id of the blob to get in urn format.",
142
- "in": "path",
143
- "required": true,
144
- "schema": {
145
- "type": "string"
146
- },
147
- "style": "simple",
148
- "example": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70"
149
- },
150
- {
151
- "name": "includeContent",
152
- "description": "Include the content in the response, otherwise only metadata is returned.",
153
- "in": "query",
154
- "required": false,
155
- "schema": {
156
- "type": "boolean"
157
- },
158
- "example": true
159
- }
160
- ],
161
- "security": [
162
- {
163
- "jwtBearerAuthScheme": []
164
- }
165
- ],
166
- "responses": {
167
- "200": {
168
- "description": "Response to get an entry from blob storage.",
169
- "content": {
170
- "application/json": {
171
- "schema": {
172
- "$ref": "#/components/schemas/BlobStorageGetResponse"
173
- },
174
- "examples": {
175
- "blobStorageGetResponseExample": {
176
- "value": {
177
- "metadata": {
178
- "@context": "http://schema.org/",
179
- "@type": "DigitalDocument",
180
- "name": "myfile.pdf"
181
- },
182
- "blob": "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw=="
183
- }
184
- }
185
- }
186
- }
187
- }
188
- },
189
- "400": {
190
- "description": "The server cannot process the request, see the content for more details.",
191
- "content": {
192
- "application/json": {
193
- "schema": {
194
- "$ref": "#/components/schemas/Error"
195
- },
196
- "examples": {
197
- "exampleResponse": {
198
- "value": {
199
- "name": "GeneralError",
200
- "message": "component.error",
201
- "properties": {
202
- "foo": "bar"
203
- }
204
- }
205
- }
206
- }
207
- }
208
- }
209
- },
210
- "401": {
211
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
212
- "content": {
213
- "application/json": {
214
- "schema": {
215
- "$ref": "#/components/schemas/Error"
216
- },
217
- "examples": {
218
- "exampleResponse": {
219
- "value": {
220
- "name": "UnauthorizedError",
221
- "message": "component.error"
222
- }
223
- }
224
- }
225
- }
226
- }
227
- },
228
- "404": {
229
- "description": "The resource you tried to access does not exist, see the content for more details.",
230
- "content": {
231
- "application/json": {
232
- "schema": {
233
- "$ref": "#/components/schemas/NotFoundResponse"
234
- },
235
- "examples": {
236
- "exampleResponse": {
237
- "value": {
238
- "name": "NotFoundError",
239
- "message": "component.error",
240
- "properties": {
241
- "notFoundId": "1"
242
- }
243
- }
244
- }
245
- }
246
- }
247
- }
248
- },
249
- "500": {
250
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
251
- "content": {
252
- "application/json": {
253
- "schema": {
254
- "$ref": "#/components/schemas/Error"
255
- },
256
- "examples": {
257
- "exampleResponse": {
258
- "value": {
259
- "name": "InternalServerError",
260
- "message": "component.error"
261
- }
262
- }
263
- }
264
- }
265
- }
266
- }
267
- }
268
- },
269
- "put": {
270
- "operationId": "blobStorageUpdate",
271
- "summary": "Update a blob metadata in storage",
272
- "tags": [
273
- "Blob Storage"
274
- ],
275
- "parameters": [
276
- {
277
- "name": "id",
278
- "description": "The id of the blob to get in urn format.",
279
- "in": "path",
280
- "required": true,
281
- "schema": {
282
- "type": "string"
283
- },
284
- "style": "simple",
285
- "example": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70"
286
- }
287
- ],
288
- "security": [
289
- {
290
- "jwtBearerAuthScheme": []
291
- }
292
- ],
293
- "requestBody": {
294
- "description": "Request to update a blob entry.",
295
- "required": true,
296
- "content": {
297
- "application/json": {
298
- "schema": {
299
- "$ref": "#/components/schemas/BlobStorageUpdateRequest"
300
- },
301
- "examples": {
302
- "blobStorageUpdateExample": {
303
- "value": {
304
- "metadata": {
305
- "@context": "http://schema.org/",
306
- "@type": "DigitalDocument",
307
- "name": "myfile.pdf"
308
- }
309
- }
310
- }
311
- }
312
- }
313
- }
314
- },
315
- "responses": {
316
- "204": {
317
- "description": "The rest request ended in success with no data."
318
- },
319
- "400": {
320
- "description": "The server cannot process the request, see the content for more details.",
321
- "content": {
322
- "application/json": {
323
- "schema": {
324
- "$ref": "#/components/schemas/Error"
325
- },
326
- "examples": {
327
- "exampleResponse": {
328
- "value": {
329
- "name": "GeneralError",
330
- "message": "component.error",
331
- "properties": {
332
- "foo": "bar"
333
- }
334
- }
335
- }
336
- }
337
- }
338
- }
339
- },
340
- "401": {
341
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
342
- "content": {
343
- "application/json": {
344
- "schema": {
345
- "$ref": "#/components/schemas/Error"
346
- },
347
- "examples": {
348
- "exampleResponse": {
349
- "value": {
350
- "name": "UnauthorizedError",
351
- "message": "component.error"
352
- }
353
- }
354
- }
355
- }
356
- }
357
- },
358
- "500": {
359
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
360
- "content": {
361
- "application/json": {
362
- "schema": {
363
- "$ref": "#/components/schemas/Error"
364
- },
365
- "examples": {
366
- "exampleResponse": {
367
- "value": {
368
- "name": "InternalServerError",
369
- "message": "component.error"
370
- }
371
- }
372
- }
373
- }
374
- }
375
- }
376
- }
377
- },
378
- "delete": {
379
- "operationId": "blobStorageRemove",
380
- "summary": "Remove the blob from storage",
381
- "tags": [
382
- "Blob Storage"
383
- ],
384
- "parameters": [
385
- {
386
- "name": "id",
387
- "description": "The id of the blob to remove in urn format.",
388
- "in": "path",
389
- "required": true,
390
- "schema": {
391
- "type": "string"
392
- },
393
- "style": "simple",
394
- "example": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70"
395
- }
396
- ],
397
- "security": [
398
- {
399
- "jwtBearerAuthScheme": []
400
- }
401
- ],
402
- "responses": {
403
- "204": {
404
- "description": "The rest request ended in success with no data."
405
- },
406
- "400": {
407
- "description": "The server cannot process the request, see the content for more details.",
408
- "content": {
409
- "application/json": {
410
- "schema": {
411
- "$ref": "#/components/schemas/Error"
412
- },
413
- "examples": {
414
- "exampleResponse": {
415
- "value": {
416
- "name": "GeneralError",
417
- "message": "component.error",
418
- "properties": {
419
- "foo": "bar"
420
- }
421
- }
422
- }
423
- }
424
- }
425
- }
426
- },
427
- "401": {
428
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
429
- "content": {
430
- "application/json": {
431
- "schema": {
432
- "$ref": "#/components/schemas/Error"
433
- },
434
- "examples": {
435
- "exampleResponse": {
436
- "value": {
437
- "name": "UnauthorizedError",
438
- "message": "component.error"
439
- }
440
- }
441
- }
442
- }
443
- }
444
- },
445
- "404": {
446
- "description": "The resource you tried to access does not exist, see the content for more details.",
447
- "content": {
448
- "application/json": {
449
- "schema": {
450
- "$ref": "#/components/schemas/NotFoundResponse"
451
- },
452
- "examples": {
453
- "exampleResponse": {
454
- "value": {
455
- "name": "NotFoundError",
456
- "message": "component.error",
457
- "properties": {
458
- "notFoundId": "1"
459
- }
460
- }
461
- }
462
- }
463
- }
464
- }
465
- },
466
- "500": {
467
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
468
- "content": {
469
- "application/json": {
470
- "schema": {
471
- "$ref": "#/components/schemas/Error"
472
- },
473
- "examples": {
474
- "exampleResponse": {
475
- "value": {
476
- "name": "InternalServerError",
477
- "message": "component.error"
478
- }
479
- }
480
- }
481
- }
482
- }
483
- }
484
- }
485
- }
486
- },
487
- "/blob/{id}/content": {
488
- "get": {
489
- "operationId": "blobStorageGetContent",
490
- "summary": "Get the blob from storage",
491
- "tags": [
492
- "Blob Storage"
493
- ],
494
- "parameters": [
495
- {
496
- "name": "id",
497
- "description": "",
498
- "in": "path",
499
- "required": true,
500
- "schema": {
501
- "type": "string"
502
- },
503
- "style": "simple",
504
- "example": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70"
505
- }
506
- ],
507
- "security": [
508
- {
509
- "jwtBearerAuthScheme": []
510
- }
511
- ],
512
- "responses": {
513
- "200": {
514
- "description": "The content of the blob, which will be a specific mime type if one can be detected from the content (or set as mimeType in the metadata), or defaults to application/octet-stream.",
515
- "content": {
516
- "application/octet-stream": {
517
- "schema": {
518
- "type": "string",
519
- "format": "binary"
520
- },
521
- "examples": {
522
- "blobStorageGetContentResponseExample": {
523
- "summary": "Binary Data",
524
- "value": ""
525
- }
526
- }
527
- }
528
- }
529
- },
530
- "400": {
531
- "description": "The server cannot process the request, see the content for more details.",
532
- "content": {
533
- "application/json": {
534
- "schema": {
535
- "$ref": "#/components/schemas/Error"
536
- },
537
- "examples": {
538
- "exampleResponse": {
539
- "value": {
540
- "name": "GeneralError",
541
- "message": "component.error",
542
- "properties": {
543
- "foo": "bar"
544
- }
545
- }
546
- }
547
- }
548
- }
549
- }
550
- },
551
- "401": {
552
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
553
- "content": {
554
- "application/json": {
555
- "schema": {
556
- "$ref": "#/components/schemas/Error"
557
- },
558
- "examples": {
559
- "exampleResponse": {
560
- "value": {
561
- "name": "UnauthorizedError",
562
- "message": "component.error"
563
- }
564
- }
565
- }
566
- }
567
- }
568
- },
569
- "404": {
570
- "description": "The resource you tried to access does not exist, see the content for more details.",
571
- "content": {
572
- "application/json": {
573
- "schema": {
574
- "$ref": "#/components/schemas/NotFoundResponse"
575
- },
576
- "examples": {
577
- "exampleResponse": {
578
- "value": {
579
- "name": "NotFoundError",
580
- "message": "component.error",
581
- "properties": {
582
- "notFoundId": "1"
583
- }
584
- }
585
- }
586
- }
587
- }
588
- }
589
- },
590
- "500": {
591
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
592
- "content": {
593
- "application/json": {
594
- "schema": {
595
- "$ref": "#/components/schemas/Error"
596
- },
597
- "examples": {
598
- "exampleResponse": {
599
- "value": {
600
- "name": "InternalServerError",
601
- "message": "component.error"
602
- }
603
- }
604
- }
605
- }
606
- }
607
- }
608
- }
609
- }
610
- }
611
- },
612
- "components": {
613
- "schemas": {
614
- "ArrayBuffer": {
615
- "type": "object",
616
- "properties": {
617
- "byteLength": {
618
- "type": "number"
619
- }
620
- },
621
- "required": [
622
- "byteLength"
623
- ],
624
- "additionalProperties": false
625
- },
626
- "BlobStorageCreateRequest": {
627
- "type": "object",
628
- "properties": {
629
- "blob": {
630
- "type": "string",
631
- "description": "The data to store in base64 encoding."
632
- },
633
- "mimeType": {
634
- "type": "string",
635
- "description": "The mime type of the blob, will be detected if left undefined."
636
- },
637
- "extension": {
638
- "type": "string",
639
- "description": "The extension of the blob, will be detected if left undefined."
640
- },
641
- "metadata": {
642
- "$ref": "#/components/schemas/JsonLdNodeObject"
643
- },
644
- "namespace": {
645
- "type": "string",
646
- "description": "The namespace to store the data in, defaults to component configured namespace."
647
- }
648
- },
649
- "required": [
650
- "blob"
651
- ],
652
- "additionalProperties": false,
653
- "description": "The body parameters."
654
- },
655
- "BlobStorageGetResponse": {
656
- "type": "object",
657
- "properties": {
658
- "mimeType": {
659
- "type": "string",
660
- "description": "The mime type of the blob."
661
- },
662
- "extension": {
663
- "type": "string",
664
- "description": "The extension of the blob."
665
- },
666
- "metadata": {
667
- "$ref": "#/components/schemas/JsonLdNodeObject"
668
- },
669
- "blob": {
670
- "type": "string",
671
- "description": "The blob in base64 format, if the includeContent flag was set in the request."
672
- }
673
- },
674
- "additionalProperties": false,
675
- "description": "The body parameters."
676
- },
677
- "BlobStorageUpdateRequest": {
678
- "type": "object",
679
- "properties": {
680
- "mimeType": {
681
- "type": "string",
682
- "description": "The mime type of the blob, will be detected if left undefined."
683
- },
684
- "extension": {
685
- "type": "string",
686
- "description": "The extension of the blob, will be detected if left undefined."
687
- },
688
- "metadata": {
689
- "$ref": "#/components/schemas/JsonLdNodeObject"
690
- }
691
- },
692
- "additionalProperties": false,
693
- "description": "The body parameters."
694
- },
695
- "Error": {
696
- "type": "object",
697
- "properties": {
698
- "name": {
699
- "type": "string",
700
- "description": "The name for the error."
701
- },
702
- "message": {
703
- "type": "string",
704
- "description": "The message for the error."
705
- },
706
- "source": {
707
- "type": "string",
708
- "description": "The source of the error."
709
- },
710
- "properties": {
711
- "type": "object",
712
- "additionalProperties": {},
713
- "description": "Any additional information for the error."
714
- },
715
- "stack": {
716
- "type": "string",
717
- "description": "The stack trace for the error."
718
- },
719
- "inner": {
720
- "$ref": "#/components/schemas/Error"
721
- }
722
- },
723
- "required": [
724
- "name",
725
- "message"
726
- ],
727
- "additionalProperties": false,
728
- "description": "Model to describe serialized error."
729
- },
730
- "JsonLdContainerType": {
731
- "type": "string",
732
- "enum": [
733
- "@language",
734
- "@index",
735
- "@id",
736
- "@graph",
737
- "@type"
738
- ]
739
- },
740
- "JsonLdContainerTypeArray": {
741
- "anyOf": [
742
- {
743
- "type": "array",
744
- "minItems": 2,
745
- "items": [
746
- {
747
- "type": "string",
748
- "const": "@graph"
749
- },
750
- {
751
- "type": "string",
752
- "const": "@id"
753
- }
754
- ],
755
- "maxItems": 2
756
- },
757
- {
758
- "type": "array",
759
- "minItems": 2,
760
- "items": [
761
- {
762
- "type": "string",
763
- "const": "@id"
764
- },
765
- {
766
- "type": "string",
767
- "const": "@graph"
768
- }
769
- ],
770
- "maxItems": 2
771
- },
772
- {
773
- "type": "array",
774
- "minItems": 3,
775
- "items": [
776
- {
777
- "type": "string",
778
- "const": "@set"
779
- },
780
- {
781
- "type": "string",
782
- "const": "@graph"
783
- },
784
- {
785
- "type": "string",
786
- "const": "@id"
787
- }
788
- ],
789
- "maxItems": 3
790
- },
791
- {
792
- "type": "array",
793
- "minItems": 3,
794
- "items": [
795
- {
796
- "type": "string",
797
- "const": "@set"
798
- },
799
- {
800
- "type": "string",
801
- "const": "@id"
802
- },
803
- {
804
- "type": "string",
805
- "const": "@graph"
806
- }
807
- ],
808
- "maxItems": 3
809
- },
810
- {
811
- "type": "array",
812
- "minItems": 3,
813
- "items": [
814
- {
815
- "type": "string",
816
- "const": "@graph"
817
- },
818
- {
819
- "type": "string",
820
- "const": "@set"
821
- },
822
- {
823
- "type": "string",
824
- "const": "@id"
825
- }
826
- ],
827
- "maxItems": 3
828
- },
829
- {
830
- "type": "array",
831
- "minItems": 3,
832
- "items": [
833
- {
834
- "type": "string",
835
- "const": "@id"
836
- },
837
- {
838
- "type": "string",
839
- "const": "@set"
840
- },
841
- {
842
- "type": "string",
843
- "const": "@graph"
844
- }
845
- ],
846
- "maxItems": 3
847
- },
848
- {
849
- "type": "array",
850
- "minItems": 3,
851
- "items": [
852
- {
853
- "type": "string",
854
- "const": "@graph"
855
- },
856
- {
857
- "type": "string",
858
- "const": "@id"
859
- },
860
- {
861
- "type": "string",
862
- "const": "@set"
863
- }
864
- ],
865
- "maxItems": 3
866
- },
867
- {
868
- "type": "array",
869
- "minItems": 3,
870
- "items": [
871
- {
872
- "type": "string",
873
- "const": "@id"
874
- },
875
- {
876
- "type": "string",
877
- "const": "@graph"
878
- },
879
- {
880
- "type": "string",
881
- "const": "@set"
882
- }
883
- ],
884
- "maxItems": 3
885
- },
886
- {
887
- "type": "array",
888
- "minItems": 2,
889
- "items": [
890
- {
891
- "type": "string",
892
- "const": "@set"
893
- },
894
- {
895
- "$ref": "#/components/schemas/JsonLdContainerType"
896
- }
897
- ],
898
- "maxItems": 2
899
- },
900
- {
901
- "type": "array",
902
- "minItems": 2,
903
- "items": [
904
- {
905
- "$ref": "#/components/schemas/JsonLdContainerType"
906
- },
907
- {
908
- "type": "string",
909
- "const": "@set"
910
- }
911
- ],
912
- "maxItems": 2
913
- }
914
- ]
915
- },
916
- "JsonLdContextDefinition": {
917
- "type": "object",
918
- "properties": {
919
- "@base": {
920
- "$ref": "#/components/schemas/JsonLdKeyword"
921
- },
922
- "@direction": {
923
- "$ref": "#/components/schemas/JsonLdKeyword"
924
- },
925
- "@import": {
926
- "$ref": "#/components/schemas/JsonLdKeyword"
927
- },
928
- "@language": {
929
- "$ref": "#/components/schemas/JsonLdKeyword"
930
- },
931
- "@propagate": {
932
- "$ref": "#/components/schemas/JsonLdKeyword"
933
- },
934
- "@protected": {
935
- "$ref": "#/components/schemas/JsonLdKeyword"
936
- },
937
- "@type": {
938
- "type": "object",
939
- "properties": {
940
- "@container": {
941
- "type": "string",
942
- "const": "@set"
943
- },
944
- "@protected": {
945
- "$ref": "#/components/schemas/JsonLdKeyword"
946
- }
947
- },
948
- "required": [
949
- "@container"
950
- ],
951
- "additionalProperties": false
952
- },
953
- "@version": {
954
- "$ref": "#/components/schemas/JsonLdKeyword"
955
- },
956
- "@vocab": {
957
- "$ref": "#/components/schemas/JsonLdKeyword"
958
- }
959
- },
960
- "additionalProperties": {
961
- "anyOf": [
962
- {
963
- "type": "null"
964
- },
965
- {
966
- "type": "string"
967
- },
968
- {
969
- "$ref": "#/components/schemas/JsonLdExpandedTermDefinition"
970
- }
971
- ]
972
- },
973
- "description": "A context definition defines a local context in a node object."
974
- },
975
- "JsonLdContextDefinitionElement": {
976
- "anyOf": [
977
- {
978
- "type": "null"
979
- },
980
- {
981
- "type": "string"
982
- },
983
- {
984
- "$ref": "#/components/schemas/JsonLdContextDefinition"
985
- }
986
- ],
987
- "description": "A context definition element is used to define the types of a context definition."
988
- },
989
- "JsonLdContextDefinitionRoot": {
990
- "anyOf": [
991
- {
992
- "$ref": "#/components/schemas/JsonLdContextDefinitionElement"
993
- },
994
- {
995
- "type": "array",
996
- "items": {
997
- "$ref": "#/components/schemas/JsonLdContextDefinitionElement"
998
- }
999
- }
1000
- ],
1001
- "description": "A context definition root is used to define the root of a context definition."
1002
- },
1003
- "JsonLdExpandedTermDefinition": {
1004
- "anyOf": [
1005
- {
1006
- "type": "object",
1007
- "additionalProperties": false,
1008
- "properties": {
1009
- "@id": {
1010
- "anyOf": [
1011
- {
1012
- "$ref": "#/components/schemas/JsonLdKeyword"
1013
- },
1014
- {
1015
- "type": "null"
1016
- }
1017
- ]
1018
- },
1019
- "@nest": {
1020
- "type": "string"
1021
- },
1022
- "@container": {
1023
- "$ref": "#/components/schemas/JsonLdKeyword"
1024
- },
1025
- "@type": {
1026
- "type": "string"
1027
- },
1028
- "@language": {
1029
- "$ref": "#/components/schemas/JsonLdKeyword"
1030
- },
1031
- "@index": {
1032
- "$ref": "#/components/schemas/JsonLdKeyword"
1033
- },
1034
- "@context": {
1035
- "$ref": "#/components/schemas/JsonLdContextDefinition"
1036
- },
1037
- "@prefix": {
1038
- "$ref": "#/components/schemas/JsonLdKeyword"
1039
- },
1040
- "@propagate": {
1041
- "$ref": "#/components/schemas/JsonLdKeyword"
1042
- },
1043
- "@protected": {
1044
- "$ref": "#/components/schemas/JsonLdKeyword"
1045
- }
1046
- }
1047
- },
1048
- {
1049
- "type": "object",
1050
- "additionalProperties": false,
1051
- "properties": {
1052
- "@reverse": {
1053
- "$ref": "#/components/schemas/JsonLdKeyword"
1054
- },
1055
- "@container": {
1056
- "type": [
1057
- "string",
1058
- "null"
1059
- ],
1060
- "enum": [
1061
- "@set",
1062
- "@index",
1063
- null
1064
- ]
1065
- },
1066
- "@type": {
1067
- "type": "string"
1068
- },
1069
- "@language": {
1070
- "$ref": "#/components/schemas/JsonLdKeyword"
1071
- },
1072
- "@index": {
1073
- "$ref": "#/components/schemas/JsonLdKeyword"
1074
- },
1075
- "@context": {
1076
- "$ref": "#/components/schemas/JsonLdContextDefinition"
1077
- },
1078
- "@prefix": {
1079
- "$ref": "#/components/schemas/JsonLdKeyword"
1080
- },
1081
- "@propagate": {
1082
- "$ref": "#/components/schemas/JsonLdKeyword"
1083
- },
1084
- "@protected": {
1085
- "$ref": "#/components/schemas/JsonLdKeyword"
1086
- }
1087
- },
1088
- "required": [
1089
- "@reverse"
1090
- ]
1091
- }
1092
- ],
1093
- "description": "An expanded term definition is used to describe the mapping between a term and its expanded identifier, as well as other properties of the value associated with the term when it is used as key in a node object."
1094
- },
1095
- "JsonLdGraphObject": {
1096
- "type": "object",
1097
- "properties": {
1098
- "@graph": {
1099
- "anyOf": [
1100
- {
1101
- "$ref": "#/components/schemas/JsonLdNodeObject"
1102
- },
1103
- {
1104
- "type": "array",
1105
- "items": {
1106
- "$ref": "#/components/schemas/JsonLdNodeObject"
1107
- }
1108
- }
1109
- ]
1110
- },
1111
- "@index": {
1112
- "type": "string"
1113
- },
1114
- "@id": {
1115
- "anyOf": [
1116
- {
1117
- "type": "string"
1118
- },
1119
- {
1120
- "type": "array",
1121
- "items": {
1122
- "type": "string"
1123
- }
1124
- }
1125
- ]
1126
- },
1127
- "@context": {
1128
- "$ref": "#/components/schemas/JsonLdContextDefinitionRoot"
1129
- }
1130
- },
1131
- "required": [
1132
- "@graph"
1133
- ],
1134
- "additionalProperties": false,
1135
- "description": "A graph object represents a named graph, which MAY include an explicit graph name."
1136
- },
1137
- "JsonLdIdMap": {
1138
- "type": "object",
1139
- "additionalProperties": {
1140
- "$ref": "#/components/schemas/JsonLdNodeObject"
1141
- },
1142
- "description": "An id map is used to associate an IRI with a value that allows easy programmatic access."
1143
- },
1144
- "JsonLdIncludedBlock": {
1145
- "anyOf": [
1146
- {
1147
- "$ref": "#/components/schemas/JsonLdNodeObject"
1148
- },
1149
- {
1150
- "type": "array",
1151
- "items": {
1152
- "$ref": "#/components/schemas/JsonLdNodeObject"
1153
- }
1154
- }
1155
- ],
1156
- "description": "An included block is used to provide a set of node objects."
1157
- },
1158
- "JsonLdIndexMap": {
1159
- "type": "object",
1160
- "additionalProperties": {
1161
- "anyOf": [
1162
- {
1163
- "$ref": "#/components/schemas/JsonLdIndexMapItem"
1164
- },
1165
- {
1166
- "type": "array",
1167
- "items": {
1168
- "$ref": "#/components/schemas/JsonLdIndexMapItem"
1169
- }
1170
- }
1171
- ]
1172
- },
1173
- "description": "An index map allows keys that have no semantic meaning, but should be preserved regardless, to be used in JSON-LD documents."
1174
- },
1175
- "JsonLdIndexMapItem": {
1176
- "anyOf": [
1177
- {
1178
- "type": "null"
1179
- },
1180
- {
1181
- "type": "boolean"
1182
- },
1183
- {
1184
- "type": "number"
1185
- },
1186
- {
1187
- "type": "string"
1188
- },
1189
- {
1190
- "$ref": "#/components/schemas/JsonLdNodeObject"
1191
- },
1192
- {
1193
- "$ref": "#/components/schemas/JsonLdValueObject"
1194
- },
1195
- {
1196
- "$ref": "#/components/schemas/JsonLdListObject"
1197
- },
1198
- {
1199
- "$ref": "#/components/schemas/JsonLdSetObject"
1200
- }
1201
- ],
1202
- "description": "The items that can be stored in an index map."
1203
- },
1204
- "JsonLdJsonArray": {
1205
- "type": "array",
1206
- "items": {
1207
- "$ref": "#/components/schemas/JsonLdJsonValue"
1208
- }
1209
- },
1210
- "JsonLdJsonObject": {
1211
- "type": "object",
1212
- "additionalProperties": {
1213
- "anyOf": [
1214
- {
1215
- "$ref": "#/components/schemas/JsonLdJsonValue"
1216
- },
1217
- {
1218
- "not": {}
1219
- }
1220
- ]
1221
- }
1222
- },
1223
- "JsonLdJsonPrimitive": {
1224
- "type": [
1225
- "string",
1226
- "number",
1227
- "boolean",
1228
- "null"
1229
- ]
1230
- },
1231
- "JsonLdJsonValue": {
1232
- "anyOf": [
1233
- {
1234
- "$ref": "#/components/schemas/JsonLdJsonPrimitive"
1235
- },
1236
- {
1237
- "$ref": "#/components/schemas/JsonLdJsonArray"
1238
- },
1239
- {
1240
- "$ref": "#/components/schemas/JsonLdJsonObject"
1241
- }
1242
- ]
1243
- },
1244
- "JsonLdKeyword": {
1245
- "type": "object",
1246
- "properties": {
1247
- "@base": {
1248
- "type": [
1249
- "string",
1250
- "null"
1251
- ]
1252
- },
1253
- "@container": {
1254
- "anyOf": [
1255
- {
1256
- "type": "string",
1257
- "const": "@list"
1258
- },
1259
- {
1260
- "type": "string",
1261
- "const": "@set"
1262
- },
1263
- {
1264
- "$ref": "#/components/schemas/JsonLdContainerType"
1265
- },
1266
- {
1267
- "type": "array",
1268
- "items": {
1269
- "anyOf": [
1270
- {
1271
- "type": "string",
1272
- "const": "@list"
1273
- },
1274
- {
1275
- "type": "string",
1276
- "const": "@set"
1277
- },
1278
- {
1279
- "$ref": "#/components/schemas/JsonLdContainerType"
1280
- }
1281
- ]
1282
- }
1283
- },
1284
- {
1285
- "$ref": "#/components/schemas/JsonLdContainerTypeArray"
1286
- },
1287
- {
1288
- "type": "null"
1289
- }
1290
- ]
1291
- },
1292
- "@context": {
1293
- "$ref": "#/components/schemas/JsonLdContextDefinitionRoot"
1294
- },
1295
- "@direction": {
1296
- "type": [
1297
- "string",
1298
- "null"
1299
- ],
1300
- "enum": [
1301
- "ltr",
1302
- "rtl",
1303
- null
1304
- ]
1305
- },
1306
- "@graph": {
1307
- "anyOf": [
1308
- {
1309
- "$ref": "#/components/schemas/JsonLdValueObject"
1310
- },
1311
- {
1312
- "$ref": "#/components/schemas/JsonLdNodeObject"
1313
- },
1314
- {
1315
- "type": "array",
1316
- "items": {
1317
- "anyOf": [
1318
- {
1319
- "$ref": "#/components/schemas/JsonLdValueObject"
1320
- },
1321
- {
1322
- "$ref": "#/components/schemas/JsonLdNodeObject"
1323
- }
1324
- ]
1325
- }
1326
- }
1327
- ]
1328
- },
1329
- "@id": {
1330
- "anyOf": [
1331
- {
1332
- "type": "string"
1333
- },
1334
- {
1335
- "type": "array",
1336
- "items": {
1337
- "type": "string"
1338
- }
1339
- }
1340
- ]
1341
- },
1342
- "@import": {
1343
- "type": "string"
1344
- },
1345
- "@included": {
1346
- "$ref": "#/components/schemas/JsonLdIncludedBlock"
1347
- },
1348
- "@index": {
1349
- "type": "string"
1350
- },
1351
- "@json": {
1352
- "type": "string",
1353
- "const": "@json"
1354
- },
1355
- "@language": {
1356
- "type": "string"
1357
- },
1358
- "@list": {
1359
- "anyOf": [
1360
- {
1361
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
1362
- },
1363
- {
1364
- "type": "array",
1365
- "items": {
1366
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
1367
- }
1368
- }
1369
- ]
1370
- },
1371
- "@nest": {
1372
- "type": "object"
1373
- },
1374
- "@none": {
1375
- "type": "string",
1376
- "const": "@none"
1377
- },
1378
- "@prefix": {
1379
- "type": "boolean"
1380
- },
1381
- "@propagate": {
1382
- "type": "boolean"
1383
- },
1384
- "@protected": {
1385
- "type": "boolean"
1386
- },
1387
- "@reverse": {
1388
- "type": "string"
1389
- },
1390
- "@set": {
1391
- "anyOf": [
1392
- {
1393
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
1394
- },
1395
- {
1396
- "type": "array",
1397
- "items": {
1398
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
1399
- }
1400
- }
1401
- ]
1402
- },
1403
- "@type": {
1404
- "type": "string"
1405
- },
1406
- "@value": {
1407
- "type": [
1408
- "null",
1409
- "boolean",
1410
- "number",
1411
- "string"
1412
- ]
1413
- },
1414
- "@version": {
1415
- "type": "string",
1416
- "const": "1.1"
1417
- },
1418
- "@vocab": {
1419
- "type": [
1420
- "string",
1421
- "null"
1422
- ]
1423
- }
1424
- },
1425
- "required": [
1426
- "@base",
1427
- "@container",
1428
- "@context",
1429
- "@direction",
1430
- "@graph",
1431
- "@id",
1432
- "@import",
1433
- "@included",
1434
- "@index",
1435
- "@json",
1436
- "@language",
1437
- "@list",
1438
- "@nest",
1439
- "@none",
1440
- "@prefix",
1441
- "@propagate",
1442
- "@protected",
1443
- "@reverse",
1444
- "@set",
1445
- "@type",
1446
- "@value",
1447
- "@version",
1448
- "@vocab"
1449
- ],
1450
- "additionalProperties": false,
1451
- "description": "A list of keywords and their types. Only used for internal reference; not an actual interface. Not for export."
1452
- },
1453
- "JsonLdLanguageMap": {
1454
- "type": "object",
1455
- "additionalProperties": {
1456
- "anyOf": [
1457
- {
1458
- "type": "null"
1459
- },
1460
- {
1461
- "type": "string"
1462
- },
1463
- {
1464
- "type": "array",
1465
- "items": {
1466
- "type": "string"
1467
- }
1468
- }
1469
- ]
1470
- },
1471
- "description": "A language map is used to associate a language with a value in a way that allows easy programmatic access."
1472
- },
1473
- "JsonLdListObject": {
1474
- "type": "object",
1475
- "properties": {
1476
- "@list": {
1477
- "anyOf": [
1478
- {
1479
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
1480
- },
1481
- {
1482
- "type": "array",
1483
- "items": {
1484
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
1485
- }
1486
- }
1487
- ]
1488
- },
1489
- "@index": {
1490
- "type": "string"
1491
- }
1492
- },
1493
- "required": [
1494
- "@list"
1495
- ],
1496
- "additionalProperties": false,
1497
- "description": "A list represents an ordered set of values."
1498
- },
1499
- "JsonLdListOrSetItem": {
1500
- "anyOf": [
1501
- {
1502
- "type": "null"
1503
- },
1504
- {
1505
- "type": "boolean"
1506
- },
1507
- {
1508
- "type": "number"
1509
- },
1510
- {
1511
- "type": "string"
1512
- },
1513
- {
1514
- "$ref": "#/components/schemas/JsonLdNodeObject"
1515
- },
1516
- {
1517
- "$ref": "#/components/schemas/JsonLdValueObject"
1518
- }
1519
- ],
1520
- "description": "A list or set item can be a null, boolean, number, string, node object, or value object."
1521
- },
1522
- "JsonLdNodeObject": {
1523
- "type": "object",
1524
- "additionalProperties": {
1525
- "anyOf": [
1526
- {
1527
- "$ref": "#/components/schemas/JsonLdNodePrimitive"
1528
- },
1529
- {
1530
- "$ref": "#/components/schemas/JsonLdLanguageMap"
1531
- },
1532
- {
1533
- "$ref": "#/components/schemas/JsonLdIndexMap"
1534
- },
1535
- {
1536
- "$ref": "#/components/schemas/JsonLdIncludedBlock"
1537
- },
1538
- {
1539
- "$ref": "#/components/schemas/JsonLdIdMap"
1540
- },
1541
- {
1542
- "$ref": "#/components/schemas/JsonLdTypeMap"
1543
- },
1544
- {
1545
- "type": "array"
1546
- }
1547
- ]
1548
- },
1549
- "properties": {
1550
- "@context": {
1551
- "$ref": "#/components/schemas/JsonLdContextDefinitionRoot"
1552
- },
1553
- "@id": {
1554
- "anyOf": [
1555
- {
1556
- "type": "string"
1557
- },
1558
- {
1559
- "type": "array",
1560
- "items": {
1561
- "type": "string"
1562
- }
1563
- }
1564
- ]
1565
- },
1566
- "@included": {
1567
- "$ref": "#/components/schemas/JsonLdIncludedBlock"
1568
- },
1569
- "@graph": {
1570
- "anyOf": [
1571
- {
1572
- "$ref": "#/components/schemas/JsonLdNodeObject"
1573
- },
1574
- {
1575
- "type": "array",
1576
- "items": {
1577
- "$ref": "#/components/schemas/JsonLdNodeObject"
1578
- }
1579
- }
1580
- ]
1581
- },
1582
- "@nest": {
1583
- "anyOf": [
1584
- {
1585
- "$ref": "#/components/schemas/JsonLdJsonObject"
1586
- },
1587
- {
1588
- "type": "array",
1589
- "items": {
1590
- "$ref": "#/components/schemas/JsonLdJsonObject"
1591
- }
1592
- }
1593
- ]
1594
- },
1595
- "@type": {
1596
- "anyOf": [
1597
- {
1598
- "type": "string"
1599
- },
1600
- {
1601
- "type": "array",
1602
- "items": {
1603
- "type": "string"
1604
- }
1605
- }
1606
- ]
1607
- },
1608
- "@reverse": {
1609
- "type": "object",
1610
- "additionalProperties": {
1611
- "type": "string"
1612
- }
1613
- },
1614
- "@index": {
1615
- "type": "string"
1616
- }
1617
- },
1618
- "description": "A node object represents zero or more properties of a node in the graph serialized by the JSON-LD document."
1619
- },
1620
- "JsonLdNodePrimitive": {
1621
- "anyOf": [
1622
- {
1623
- "type": "null"
1624
- },
1625
- {
1626
- "type": "boolean"
1627
- },
1628
- {
1629
- "type": "number"
1630
- },
1631
- {
1632
- "type": "string"
1633
- },
1634
- {
1635
- "$ref": "#/components/schemas/JsonLdNodeObject"
1636
- },
1637
- {
1638
- "$ref": "#/components/schemas/JsonLdGraphObject"
1639
- },
1640
- {
1641
- "$ref": "#/components/schemas/JsonLdValueObject"
1642
- },
1643
- {
1644
- "$ref": "#/components/schemas/JsonLdListObject"
1645
- },
1646
- {
1647
- "$ref": "#/components/schemas/JsonLdSetObject"
1648
- }
1649
- ],
1650
- "description": "A node primitive is a JSON-LD value which is not one of the defined NodeObject properties."
1651
- },
1652
- "JsonLdSetObject": {
1653
- "type": "object",
1654
- "properties": {
1655
- "@set": {
1656
- "anyOf": [
1657
- {
1658
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
1659
- },
1660
- {
1661
- "type": "array",
1662
- "items": {
1663
- "$ref": "#/components/schemas/JsonLdListOrSetItem"
1664
- }
1665
- }
1666
- ]
1667
- },
1668
- "@index": {
1669
- "type": "string"
1670
- }
1671
- },
1672
- "required": [
1673
- "@set"
1674
- ],
1675
- "additionalProperties": false,
1676
- "description": "A set represents an unordered set of values."
1677
- },
1678
- "JsonLdTypeMap": {
1679
- "type": "object",
1680
- "additionalProperties": {
1681
- "anyOf": [
1682
- {
1683
- "type": "string"
1684
- },
1685
- {
1686
- "$ref": "#/components/schemas/JsonLdNodeObject"
1687
- }
1688
- ]
1689
- },
1690
- "description": "A type map is used to associate an IRI with a value that allows easy programmatic access."
1691
- },
1692
- "JsonLdValueObject": {
1693
- "anyOf": [
1694
- {
1695
- "type": "object",
1696
- "additionalProperties": false,
1697
- "properties": {
1698
- "@value": {
1699
- "$ref": "#/components/schemas/JsonLdKeyword"
1700
- },
1701
- "@language": {
1702
- "$ref": "#/components/schemas/JsonLdKeyword"
1703
- },
1704
- "@direction": {
1705
- "$ref": "#/components/schemas/JsonLdKeyword"
1706
- },
1707
- "@index": {
1708
- "$ref": "#/components/schemas/JsonLdKeyword"
1709
- },
1710
- "@context": {
1711
- "$ref": "#/components/schemas/JsonLdKeyword"
1712
- }
1713
- },
1714
- "required": [
1715
- "@value"
1716
- ]
1717
- },
1718
- {
1719
- "type": "object",
1720
- "additionalProperties": false,
1721
- "properties": {
1722
- "@value": {
1723
- "$ref": "#/components/schemas/JsonLdKeyword"
1724
- },
1725
- "@type": {
1726
- "$ref": "#/components/schemas/JsonLdKeyword"
1727
- },
1728
- "@index": {
1729
- "$ref": "#/components/schemas/JsonLdKeyword"
1730
- },
1731
- "@context": {
1732
- "$ref": "#/components/schemas/JsonLdKeyword"
1733
- }
1734
- },
1735
- "required": [
1736
- "@type",
1737
- "@value"
1738
- ]
1739
- },
1740
- {
1741
- "type": "object",
1742
- "additionalProperties": false,
1743
- "properties": {
1744
- "@value": {
1745
- "anyOf": [
1746
- {
1747
- "$ref": "#/components/schemas/JsonLdKeyword"
1748
- },
1749
- {
1750
- "$ref": "#/components/schemas/JsonLdJsonObject"
1751
- },
1752
- {
1753
- "$ref": "#/components/schemas/JsonLdJsonArray"
1754
- }
1755
- ]
1756
- },
1757
- "@type": {
1758
- "type": "string",
1759
- "const": "@json"
1760
- },
1761
- "@index": {
1762
- "$ref": "#/components/schemas/JsonLdKeyword"
1763
- },
1764
- "@context": {
1765
- "$ref": "#/components/schemas/JsonLdKeyword"
1766
- }
1767
- },
1768
- "required": [
1769
- "@type",
1770
- "@value"
1771
- ]
1772
- }
1773
- ],
1774
- "description": "A value object is used to explicitly associate a type or a language with a value to create a typed value or a language-tagged string and possibly associate a base direction."
1775
- },
1776
- "NotFoundResponse": {
1777
- "type": "object",
1778
- "additionalProperties": false,
1779
- "properties": {
1780
- "notFoundId": {
1781
- "type": "string",
1782
- "description": "The id if the item that was not found."
1783
- },
1784
- "name": {
1785
- "type": "string",
1786
- "description": "The name for the error."
1787
- },
1788
- "message": {
1789
- "type": "string",
1790
- "description": "The message for the error."
1791
- },
1792
- "source": {
1793
- "type": "string",
1794
- "description": "The source of the error."
1795
- },
1796
- "properties": {
1797
- "type": "object",
1798
- "additionalProperties": {},
1799
- "description": "Any additional information for the error."
1800
- },
1801
- "stack": {
1802
- "type": "string",
1803
- "description": "The stack trace for the error."
1804
- },
1805
- "inner": {
1806
- "$ref": "#/components/schemas/Error"
1807
- }
1808
- },
1809
- "required": [
1810
- "message",
1811
- "name"
1812
- ],
1813
- "description": "The body which contains the error."
1814
- },
1815
- "Uint8Array": {
1816
- "type": "object",
1817
- "properties": {
1818
- "BYTES_PER_ELEMENT": {
1819
- "type": "number"
1820
- },
1821
- "buffer": {
1822
- "$ref": "#/components/schemas/ArrayBuffer"
1823
- },
1824
- "byteLength": {
1825
- "type": "number"
1826
- },
1827
- "byteOffset": {
1828
- "type": "number"
1829
- },
1830
- "length": {
1831
- "type": "number"
1832
- }
1833
- },
1834
- "required": [
1835
- "BYTES_PER_ELEMENT",
1836
- "buffer",
1837
- "byteLength",
1838
- "byteOffset",
1839
- "length"
1840
- ],
1841
- "additionalProperties": {
1842
- "type": "number"
1843
- }
1844
- }
1845
- },
1846
- "securitySchemes": {
1847
- "jwtBearerAuthScheme": {
1848
- "type": "http",
1849
- "scheme": "bearer",
1850
- "bearerFormat": "JWT"
1851
- }
1852
- }
1853
- }
1854
- }
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "TWIN - Test Endpoints",
5
+ "description": "REST API for TWIN - Test Endpoints.",
6
+ "version": "1.0.0",
7
+ "license": {
8
+ "name": "Apache 2.0 License",
9
+ "url": "https://opensource.org/licenses/Apache-2.0"
10
+ }
11
+ },
12
+ "servers": [
13
+ {
14
+ "url": "https://localhost"
15
+ }
16
+ ],
17
+ "tags": [
18
+ {
19
+ "name": "Blob Storage",
20
+ "description": "Endpoints which are modelled to access a blob storage contract."
21
+ }
22
+ ],
23
+ "paths": {
24
+ "/blob-storage": {
25
+ "post": {
26
+ "operationId": "blobStorageCreate",
27
+ "summary": "Create an entry in blob storage",
28
+ "tags": [
29
+ "Blob Storage"
30
+ ],
31
+ "security": [
32
+ {
33
+ "jwtBearerAuthScheme": []
34
+ }
35
+ ],
36
+ "requestBody": {
37
+ "description": "Request to create an entry in blob storage.",
38
+ "required": true,
39
+ "content": {
40
+ "application/json": {
41
+ "schema": {
42
+ "$ref": "#/components/schemas/BlobStorageCreateRequest"
43
+ },
44
+ "examples": {
45
+ "blobStorageCreateRequestExample": {
46
+ "value": {
47
+ "blob": "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw==",
48
+ "metadata": {
49
+ "@context": "https://schema.org",
50
+ "@type": "DigitalDocument",
51
+ "name": "myfile.pdf"
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+ },
59
+ "responses": {
60
+ "201": {
61
+ "description": "The rest request ended in created response.",
62
+ "headers": {
63
+ "location": {
64
+ "schema": {
65
+ "type": "string"
66
+ },
67
+ "description": "e.g. blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70"
68
+ }
69
+ }
70
+ },
71
+ "400": {
72
+ "description": "The server cannot process the request, see the content for more details.",
73
+ "content": {
74
+ "application/json": {
75
+ "schema": {
76
+ "$ref": "#/components/schemas/Error"
77
+ },
78
+ "examples": {
79
+ "exampleResponse": {
80
+ "value": {
81
+ "name": "GeneralError",
82
+ "message": "component.error",
83
+ "properties": {
84
+ "foo": "bar"
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
91
+ },
92
+ "401": {
93
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
94
+ "content": {
95
+ "application/json": {
96
+ "schema": {
97
+ "$ref": "#/components/schemas/Error"
98
+ },
99
+ "examples": {
100
+ "exampleResponse": {
101
+ "value": {
102
+ "name": "UnauthorizedError",
103
+ "message": "component.error"
104
+ }
105
+ }
106
+ }
107
+ }
108
+ }
109
+ },
110
+ "500": {
111
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
112
+ "content": {
113
+ "application/json": {
114
+ "schema": {
115
+ "$ref": "#/components/schemas/Error"
116
+ },
117
+ "examples": {
118
+ "exampleResponse": {
119
+ "value": {
120
+ "name": "InternalServerError",
121
+ "message": "component.error"
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }
129
+ },
130
+ "get": {
131
+ "operationId": "blobStorageQuery",
132
+ "summary": "Query the items from blob storage",
133
+ "tags": [
134
+ "Blob Storage"
135
+ ],
136
+ "parameters": [
137
+ {
138
+ "name": "conditions",
139
+ "description": "The condition for the query as JSON version of EntityCondition type.",
140
+ "in": "query",
141
+ "required": false,
142
+ "schema": {
143
+ "type": "string"
144
+ }
145
+ },
146
+ {
147
+ "name": "orderBy",
148
+ "description": "The order for the results, default to created.",
149
+ "in": "query",
150
+ "required": false,
151
+ "schema": {
152
+ "type": "string",
153
+ "enum": [
154
+ "dateCreated",
155
+ "dateModified"
156
+ ]
157
+ }
158
+ },
159
+ {
160
+ "name": "orderByDirection",
161
+ "description": "The direction for the order, defaults to desc.",
162
+ "in": "query",
163
+ "required": false,
164
+ "schema": {
165
+ "$ref": "#/components/schemas/SortDirection"
166
+ }
167
+ },
168
+ {
169
+ "name": "pageSize",
170
+ "description": "The number of entries to return per page.",
171
+ "in": "query",
172
+ "required": false,
173
+ "schema": {
174
+ "type": [
175
+ "number",
176
+ "string"
177
+ ]
178
+ }
179
+ },
180
+ {
181
+ "name": "cursor",
182
+ "description": "The cursor to get next chunk of data, returned in previous response.",
183
+ "in": "query",
184
+ "required": false,
185
+ "schema": {
186
+ "type": "string"
187
+ }
188
+ },
189
+ {
190
+ "name": "accept",
191
+ "in": "header",
192
+ "required": true,
193
+ "schema": {
194
+ "type": "string"
195
+ },
196
+ "style": "simple"
197
+ }
198
+ ],
199
+ "security": [
200
+ {
201
+ "jwtBearerAuthScheme": []
202
+ }
203
+ ],
204
+ "responses": {
205
+ "200": {
206
+ "description": "Response to getting the list of entries from a query.",
207
+ "content": {
208
+ "application/json": {
209
+ "schema": {
210
+ "$ref": "#/components/schemas/BlobStorageEntryList"
211
+ },
212
+ "examples": {
213
+ "blobStorageListResponseExample": {
214
+ "value": {
215
+ "@context": [
216
+ "https://schema.org",
217
+ "https://schema.twindev.org/blob-storage/",
218
+ "https://schema.twindev.org/common/"
219
+ ],
220
+ "type": "ItemList",
221
+ "itemListElement": [
222
+ {
223
+ "@context": [
224
+ "https://schema.twindev.org/blob-storage/",
225
+ "https://schema.twindev.org/common/",
226
+ "https://schema.org"
227
+ ],
228
+ "type": "BlobStorageEntry",
229
+ "id": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
230
+ "dateCreated": "2024-01-01T00:00:00Z",
231
+ "encodingFormat": "application/pdf",
232
+ "blobSize": 42,
233
+ "blobHash": "sha256:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
234
+ "fileExtension": "pdf",
235
+ "metadata": {
236
+ "@context": "https://schema.org",
237
+ "@type": "DigitalDocument",
238
+ "name": "myfile.pdf"
239
+ },
240
+ "blob": "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw=="
241
+ }
242
+ ]
243
+ }
244
+ }
245
+ }
246
+ },
247
+ "application/ld+json": {
248
+ "schema": {
249
+ "$ref": "#/components/schemas/BlobStorageEntryList"
250
+ },
251
+ "examples": {
252
+ "blobStorageListResponseJsonLdExample": {
253
+ "value": {
254
+ "@context": [
255
+ "https://schema.org",
256
+ "https://schema.twindev.org/blob-storage/",
257
+ "https://schema.twindev.org/common/"
258
+ ],
259
+ "type": "ItemList",
260
+ "itemListElement": [
261
+ {
262
+ "@context": [
263
+ "https://schema.twindev.org/blob-storage/",
264
+ "https://schema.twindev.org/common/",
265
+ "https://schema.org"
266
+ ],
267
+ "type": "BlobStorageEntry",
268
+ "id": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
269
+ "dateCreated": "2024-01-01T00:00:00Z",
270
+ "encodingFormat": "application/pdf",
271
+ "blobSize": 42,
272
+ "blobHash": "sha256:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
273
+ "fileExtension": "pdf",
274
+ "metadata": {
275
+ "@context": "https://schema.org",
276
+ "@type": "DigitalDocument",
277
+ "name": "myfile.pdf"
278
+ },
279
+ "blob": "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw=="
280
+ }
281
+ ]
282
+ }
283
+ }
284
+ }
285
+ }
286
+ }
287
+ },
288
+ "400": {
289
+ "description": "The server cannot process the request, see the content for more details.",
290
+ "content": {
291
+ "application/json": {
292
+ "schema": {
293
+ "$ref": "#/components/schemas/Error"
294
+ },
295
+ "examples": {
296
+ "exampleResponse": {
297
+ "value": {
298
+ "name": "GeneralError",
299
+ "message": "component.error",
300
+ "properties": {
301
+ "foo": "bar"
302
+ }
303
+ }
304
+ }
305
+ }
306
+ }
307
+ }
308
+ },
309
+ "401": {
310
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
311
+ "content": {
312
+ "application/json": {
313
+ "schema": {
314
+ "$ref": "#/components/schemas/Error"
315
+ },
316
+ "examples": {
317
+ "exampleResponse": {
318
+ "value": {
319
+ "name": "UnauthorizedError",
320
+ "message": "component.error"
321
+ }
322
+ }
323
+ }
324
+ }
325
+ }
326
+ },
327
+ "404": {
328
+ "description": "The resource you tried to access does not exist, see the content for more details.",
329
+ "content": {
330
+ "application/json": {
331
+ "schema": {
332
+ "$ref": "#/components/schemas/NotFoundResponse"
333
+ },
334
+ "examples": {
335
+ "exampleResponse": {
336
+ "value": {
337
+ "name": "NotFoundError",
338
+ "message": "component.error",
339
+ "properties": {
340
+ "notFoundId": "1"
341
+ }
342
+ }
343
+ }
344
+ }
345
+ }
346
+ }
347
+ },
348
+ "500": {
349
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
350
+ "content": {
351
+ "application/json": {
352
+ "schema": {
353
+ "$ref": "#/components/schemas/Error"
354
+ },
355
+ "examples": {
356
+ "exampleResponse": {
357
+ "value": {
358
+ "name": "InternalServerError",
359
+ "message": "component.error"
360
+ }
361
+ }
362
+ }
363
+ }
364
+ }
365
+ }
366
+ }
367
+ }
368
+ },
369
+ "/blob-storage/{id}": {
370
+ "get": {
371
+ "operationId": "blobStorageGet",
372
+ "summary": "Get the metadata for an item from blob storage",
373
+ "tags": [
374
+ "Blob Storage"
375
+ ],
376
+ "parameters": [
377
+ {
378
+ "name": "id",
379
+ "description": "The id of the blob to get in urn format.",
380
+ "in": "path",
381
+ "required": true,
382
+ "schema": {
383
+ "type": "string"
384
+ },
385
+ "style": "simple",
386
+ "example": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70"
387
+ },
388
+ {
389
+ "name": "includeContent",
390
+ "description": "Include the content in the response, otherwise only metadata is returned.",
391
+ "in": "query",
392
+ "required": false,
393
+ "schema": {
394
+ "type": [
395
+ "boolean",
396
+ "string"
397
+ ]
398
+ },
399
+ "example": "true"
400
+ },
401
+ {
402
+ "name": "decompress",
403
+ "description": "If the content should be decompressed, if it was compressed when stored, defaults to true.",
404
+ "in": "query",
405
+ "required": false,
406
+ "schema": {
407
+ "type": [
408
+ "boolean",
409
+ "string"
410
+ ]
411
+ }
412
+ },
413
+ {
414
+ "name": "overrideVaultKeyId",
415
+ "description": "Use a different vault key id for decryption, if not provided the default vault key id will be used.",
416
+ "in": "query",
417
+ "required": false,
418
+ "schema": {
419
+ "type": "string"
420
+ }
421
+ },
422
+ {
423
+ "name": "accept",
424
+ "in": "header",
425
+ "required": true,
426
+ "schema": {
427
+ "type": "string"
428
+ },
429
+ "style": "simple"
430
+ }
431
+ ],
432
+ "security": [
433
+ {
434
+ "jwtBearerAuthScheme": []
435
+ }
436
+ ],
437
+ "responses": {
438
+ "200": {
439
+ "description": "Response to get an entry from blob storage.",
440
+ "content": {
441
+ "application/json": {
442
+ "schema": {
443
+ "$ref": "#/components/schemas/BlobStorageEntry"
444
+ },
445
+ "examples": {
446
+ "blobStorageGetResponseExample": {
447
+ "value": {
448
+ "@context": [
449
+ "https://schema.twindev.org/blob-storage/",
450
+ "https://schema.twindev.org/common/",
451
+ "https://schema.org"
452
+ ],
453
+ "type": "BlobStorageEntry",
454
+ "id": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
455
+ "dateCreated": "2024-01-01T00:00:00Z",
456
+ "encodingFormat": "application/pdf",
457
+ "blobSize": 42,
458
+ "blobHash": "sha256:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
459
+ "fileExtension": "pdf",
460
+ "metadata": {
461
+ "@context": "https://schema.org",
462
+ "@type": "DigitalDocument",
463
+ "name": "myfile.pdf"
464
+ },
465
+ "blob": "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw=="
466
+ }
467
+ }
468
+ }
469
+ },
470
+ "application/ld+json": {
471
+ "schema": {
472
+ "$ref": "#/components/schemas/BlobStorageEntry"
473
+ },
474
+ "examples": {
475
+ "blobStorageGetResponseJsonLdExample": {
476
+ "value": {
477
+ "@context": [
478
+ "https://schema.twindev.org/blob-storage/",
479
+ "https://schema.twindev.org/common/",
480
+ "https://schema.org"
481
+ ],
482
+ "type": "BlobStorageEntry",
483
+ "id": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
484
+ "dateCreated": "2024-01-01T00:00:00Z",
485
+ "encodingFormat": "application/pdf",
486
+ "blobSize": 42,
487
+ "blobHash": "sha256:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
488
+ "fileExtension": "pdf",
489
+ "metadata": {
490
+ "@context": "https://schema.org",
491
+ "@type": "DigitalDocument",
492
+ "name": "myfile.pdf"
493
+ },
494
+ "blob": "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZw=="
495
+ }
496
+ }
497
+ }
498
+ }
499
+ }
500
+ },
501
+ "400": {
502
+ "description": "The server cannot process the request, see the content for more details.",
503
+ "content": {
504
+ "application/json": {
505
+ "schema": {
506
+ "$ref": "#/components/schemas/Error"
507
+ },
508
+ "examples": {
509
+ "exampleResponse": {
510
+ "value": {
511
+ "name": "GeneralError",
512
+ "message": "component.error",
513
+ "properties": {
514
+ "foo": "bar"
515
+ }
516
+ }
517
+ }
518
+ }
519
+ }
520
+ }
521
+ },
522
+ "401": {
523
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
524
+ "content": {
525
+ "application/json": {
526
+ "schema": {
527
+ "$ref": "#/components/schemas/Error"
528
+ },
529
+ "examples": {
530
+ "exampleResponse": {
531
+ "value": {
532
+ "name": "UnauthorizedError",
533
+ "message": "component.error"
534
+ }
535
+ }
536
+ }
537
+ }
538
+ }
539
+ },
540
+ "404": {
541
+ "description": "The resource you tried to access does not exist, see the content for more details.",
542
+ "content": {
543
+ "application/json": {
544
+ "schema": {
545
+ "$ref": "#/components/schemas/NotFoundResponse"
546
+ },
547
+ "examples": {
548
+ "exampleResponse": {
549
+ "value": {
550
+ "name": "NotFoundError",
551
+ "message": "component.error",
552
+ "properties": {
553
+ "notFoundId": "1"
554
+ }
555
+ }
556
+ }
557
+ }
558
+ }
559
+ }
560
+ },
561
+ "500": {
562
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
563
+ "content": {
564
+ "application/json": {
565
+ "schema": {
566
+ "$ref": "#/components/schemas/Error"
567
+ },
568
+ "examples": {
569
+ "exampleResponse": {
570
+ "value": {
571
+ "name": "InternalServerError",
572
+ "message": "component.error"
573
+ }
574
+ }
575
+ }
576
+ }
577
+ }
578
+ }
579
+ }
580
+ },
581
+ "put": {
582
+ "operationId": "blobStorageUpdate",
583
+ "summary": "Update the metadata for an item in blob storage",
584
+ "tags": [
585
+ "Blob Storage"
586
+ ],
587
+ "parameters": [
588
+ {
589
+ "name": "id",
590
+ "description": "The id of the blob to get in urn format.",
591
+ "in": "path",
592
+ "required": true,
593
+ "schema": {
594
+ "type": "string"
595
+ },
596
+ "style": "simple",
597
+ "example": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70"
598
+ }
599
+ ],
600
+ "security": [
601
+ {
602
+ "jwtBearerAuthScheme": []
603
+ }
604
+ ],
605
+ "requestBody": {
606
+ "description": "Request to update a blob entry.",
607
+ "required": true,
608
+ "content": {
609
+ "application/json": {
610
+ "schema": {
611
+ "$ref": "#/components/schemas/BlobStorageUpdateRequest"
612
+ },
613
+ "examples": {
614
+ "blobStorageUpdateRequestExample": {
615
+ "value": {
616
+ "metadata": {
617
+ "@context": "https://schema.org",
618
+ "@type": "DigitalDocument",
619
+ "name": "myfile.pdf"
620
+ }
621
+ }
622
+ }
623
+ }
624
+ }
625
+ }
626
+ },
627
+ "responses": {
628
+ "204": {
629
+ "description": "The rest request ended in success with no data."
630
+ },
631
+ "400": {
632
+ "description": "The server cannot process the request, see the content for more details.",
633
+ "content": {
634
+ "application/json": {
635
+ "schema": {
636
+ "$ref": "#/components/schemas/Error"
637
+ },
638
+ "examples": {
639
+ "exampleResponse": {
640
+ "value": {
641
+ "name": "GeneralError",
642
+ "message": "component.error",
643
+ "properties": {
644
+ "foo": "bar"
645
+ }
646
+ }
647
+ }
648
+ }
649
+ }
650
+ }
651
+ },
652
+ "401": {
653
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
654
+ "content": {
655
+ "application/json": {
656
+ "schema": {
657
+ "$ref": "#/components/schemas/Error"
658
+ },
659
+ "examples": {
660
+ "exampleResponse": {
661
+ "value": {
662
+ "name": "UnauthorizedError",
663
+ "message": "component.error"
664
+ }
665
+ }
666
+ }
667
+ }
668
+ }
669
+ },
670
+ "500": {
671
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
672
+ "content": {
673
+ "application/json": {
674
+ "schema": {
675
+ "$ref": "#/components/schemas/Error"
676
+ },
677
+ "examples": {
678
+ "exampleResponse": {
679
+ "value": {
680
+ "name": "InternalServerError",
681
+ "message": "component.error"
682
+ }
683
+ }
684
+ }
685
+ }
686
+ }
687
+ }
688
+ }
689
+ },
690
+ "delete": {
691
+ "operationId": "blobStorageRemove",
692
+ "summary": "Remove an item from blob storage",
693
+ "tags": [
694
+ "Blob Storage"
695
+ ],
696
+ "parameters": [
697
+ {
698
+ "name": "id",
699
+ "description": "The id of the blob to remove in urn format.",
700
+ "in": "path",
701
+ "required": true,
702
+ "schema": {
703
+ "type": "string"
704
+ },
705
+ "style": "simple",
706
+ "example": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70"
707
+ }
708
+ ],
709
+ "security": [
710
+ {
711
+ "jwtBearerAuthScheme": []
712
+ }
713
+ ],
714
+ "responses": {
715
+ "204": {
716
+ "description": "The rest request ended in success with no data."
717
+ },
718
+ "400": {
719
+ "description": "The server cannot process the request, see the content for more details.",
720
+ "content": {
721
+ "application/json": {
722
+ "schema": {
723
+ "$ref": "#/components/schemas/Error"
724
+ },
725
+ "examples": {
726
+ "exampleResponse": {
727
+ "value": {
728
+ "name": "GeneralError",
729
+ "message": "component.error",
730
+ "properties": {
731
+ "foo": "bar"
732
+ }
733
+ }
734
+ }
735
+ }
736
+ }
737
+ }
738
+ },
739
+ "401": {
740
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
741
+ "content": {
742
+ "application/json": {
743
+ "schema": {
744
+ "$ref": "#/components/schemas/Error"
745
+ },
746
+ "examples": {
747
+ "exampleResponse": {
748
+ "value": {
749
+ "name": "UnauthorizedError",
750
+ "message": "component.error"
751
+ }
752
+ }
753
+ }
754
+ }
755
+ }
756
+ },
757
+ "404": {
758
+ "description": "The resource you tried to access does not exist, see the content for more details.",
759
+ "content": {
760
+ "application/json": {
761
+ "schema": {
762
+ "$ref": "#/components/schemas/NotFoundResponse"
763
+ },
764
+ "examples": {
765
+ "exampleResponse": {
766
+ "value": {
767
+ "name": "NotFoundError",
768
+ "message": "component.error",
769
+ "properties": {
770
+ "notFoundId": "1"
771
+ }
772
+ }
773
+ }
774
+ }
775
+ }
776
+ }
777
+ },
778
+ "500": {
779
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
780
+ "content": {
781
+ "application/json": {
782
+ "schema": {
783
+ "$ref": "#/components/schemas/Error"
784
+ },
785
+ "examples": {
786
+ "exampleResponse": {
787
+ "value": {
788
+ "name": "InternalServerError",
789
+ "message": "component.error"
790
+ }
791
+ }
792
+ }
793
+ }
794
+ }
795
+ }
796
+ }
797
+ }
798
+ },
799
+ "/blob-storage/{id}/content": {
800
+ "get": {
801
+ "operationId": "blobStorageGetContent",
802
+ "summary": "Get the content for an item in blob storage",
803
+ "tags": [
804
+ "Blob Storage"
805
+ ],
806
+ "parameters": [
807
+ {
808
+ "name": "id",
809
+ "description": "",
810
+ "in": "path",
811
+ "required": true,
812
+ "schema": {
813
+ "type": "string"
814
+ },
815
+ "style": "simple",
816
+ "example": "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70"
817
+ }
818
+ ],
819
+ "security": [
820
+ {
821
+ "jwtBearerAuthScheme": []
822
+ }
823
+ ],
824
+ "responses": {
825
+ "200": {
826
+ "description": "The content of the blob, which will be a specific mime type if one can be detected from the content (or set as encodingFormat in the entry), or defaults to application/octet-stream.",
827
+ "content": {
828
+ "application/octet-stream": {
829
+ "schema": {
830
+ "type": "string",
831
+ "format": "binary"
832
+ },
833
+ "examples": {
834
+ "blobStorageGetContentResponseExample": {
835
+ "summary": "Binary Data",
836
+ "value": ""
837
+ }
838
+ }
839
+ }
840
+ }
841
+ },
842
+ "400": {
843
+ "description": "The server cannot process the request, see the content for more details.",
844
+ "content": {
845
+ "application/json": {
846
+ "schema": {
847
+ "$ref": "#/components/schemas/Error"
848
+ },
849
+ "examples": {
850
+ "exampleResponse": {
851
+ "value": {
852
+ "name": "GeneralError",
853
+ "message": "component.error",
854
+ "properties": {
855
+ "foo": "bar"
856
+ }
857
+ }
858
+ }
859
+ }
860
+ }
861
+ }
862
+ },
863
+ "401": {
864
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
865
+ "content": {
866
+ "application/json": {
867
+ "schema": {
868
+ "$ref": "#/components/schemas/Error"
869
+ },
870
+ "examples": {
871
+ "exampleResponse": {
872
+ "value": {
873
+ "name": "UnauthorizedError",
874
+ "message": "component.error"
875
+ }
876
+ }
877
+ }
878
+ }
879
+ }
880
+ },
881
+ "404": {
882
+ "description": "The resource you tried to access does not exist, see the content for more details.",
883
+ "content": {
884
+ "application/json": {
885
+ "schema": {
886
+ "$ref": "#/components/schemas/NotFoundResponse"
887
+ },
888
+ "examples": {
889
+ "exampleResponse": {
890
+ "value": {
891
+ "name": "NotFoundError",
892
+ "message": "component.error",
893
+ "properties": {
894
+ "notFoundId": "1"
895
+ }
896
+ }
897
+ }
898
+ }
899
+ }
900
+ }
901
+ },
902
+ "500": {
903
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
904
+ "content": {
905
+ "application/json": {
906
+ "schema": {
907
+ "$ref": "#/components/schemas/Error"
908
+ },
909
+ "examples": {
910
+ "exampleResponse": {
911
+ "value": {
912
+ "name": "InternalServerError",
913
+ "message": "component.error"
914
+ }
915
+ }
916
+ }
917
+ }
918
+ }
919
+ }
920
+ }
921
+ }
922
+ }
923
+ },
924
+ "components": {
925
+ "schemas": {
926
+ "BlobStorageCompressionType": {
927
+ "anyOf": [
928
+ {
929
+ "type": "string",
930
+ "const": "gzip",
931
+ "description": "Gzip."
932
+ },
933
+ {
934
+ "type": "string",
935
+ "const": "deflate",
936
+ "description": "Deflate."
937
+ }
938
+ ],
939
+ "description": "The types of compression for blob storage data."
940
+ },
941
+ "BlobStorageCreateRequest": {
942
+ "type": "object",
943
+ "properties": {
944
+ "blob": {
945
+ "type": "string",
946
+ "description": "The data to store in base64 encoding."
947
+ },
948
+ "encodingFormat": {
949
+ "type": "string",
950
+ "description": "The mime type of the blob, will be detected if left undefined."
951
+ },
952
+ "fileExtension": {
953
+ "type": "string",
954
+ "description": "The extension of the blob, will be detected if left undefined."
955
+ },
956
+ "metadata": {
957
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
958
+ },
959
+ "disableEncryption": {
960
+ "type": "boolean",
961
+ "description": "Disables encryption if enabled by default.",
962
+ "default": false
963
+ },
964
+ "compress": {
965
+ "$ref": "#/components/schemas/BlobStorageCompressionType"
966
+ },
967
+ "overrideVaultKeyId": {
968
+ "type": "string",
969
+ "description": "Use a different vault key id for encryption, if not provided the default vault key id will be used.",
970
+ "default": "undefined"
971
+ },
972
+ "namespace": {
973
+ "type": "string",
974
+ "description": "The namespace to store the data in, defaults to component configured namespace."
975
+ }
976
+ },
977
+ "required": [
978
+ "blob"
979
+ ],
980
+ "additionalProperties": false,
981
+ "description": "The body parameters."
982
+ },
983
+ "BlobStorageEntry": {
984
+ "type": "object",
985
+ "properties": {
986
+ "@context": {
987
+ "type": "array",
988
+ "minItems": 2,
989
+ "description": "JSON-LD Context.",
990
+ "prefixItems": [
991
+ {
992
+ "type": "string",
993
+ "const": "https://schema.twindev.org/blob-storage/"
994
+ },
995
+ {
996
+ "type": "string",
997
+ "const": "https://schema.twindev.org/common/"
998
+ }
999
+ ],
1000
+ "items": {
1001
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
1002
+ }
1003
+ },
1004
+ "type": {
1005
+ "type": "string",
1006
+ "const": "BlobStorageEntry",
1007
+ "description": "JSON-LD Type."
1008
+ },
1009
+ "id": {
1010
+ "type": "string",
1011
+ "description": "The id for the blob."
1012
+ },
1013
+ "dateCreated": {
1014
+ "type": "string",
1015
+ "description": "The date/time when the entry was created."
1016
+ },
1017
+ "dateModified": {
1018
+ "type": "string",
1019
+ "description": "The date/time when the entry was modified."
1020
+ },
1021
+ "blobSize": {
1022
+ "type": "number",
1023
+ "description": "The size of the data in the blob."
1024
+ },
1025
+ "blobHash": {
1026
+ "type": "string",
1027
+ "description": "The hash of the data in the blob."
1028
+ },
1029
+ "encodingFormat": {
1030
+ "type": "string",
1031
+ "description": "The mime type for the blob."
1032
+ },
1033
+ "isEncrypted": {
1034
+ "type": "boolean",
1035
+ "description": "Indicates if the blob is encrypted."
1036
+ },
1037
+ "compression": {
1038
+ "$ref": "#/components/schemas/BlobStorageCompressionType"
1039
+ },
1040
+ "fileExtension": {
1041
+ "type": "string",
1042
+ "description": "The extension."
1043
+ },
1044
+ "metadata": {
1045
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1046
+ },
1047
+ "blob": {
1048
+ "type": "string",
1049
+ "description": "The blob in base64 format, included if the includeContent flag was set in the request."
1050
+ }
1051
+ },
1052
+ "required": [
1053
+ "@context",
1054
+ "type",
1055
+ "id",
1056
+ "dateCreated",
1057
+ "blobSize",
1058
+ "blobHash"
1059
+ ],
1060
+ "additionalProperties": false,
1061
+ "description": "Interface describing a blob storage entry."
1062
+ },
1063
+ "BlobStorageEntryList": {
1064
+ "type": "object",
1065
+ "properties": {
1066
+ "@context": {
1067
+ "type": "array",
1068
+ "minItems": 3,
1069
+ "description": "JSON-LD Context.",
1070
+ "prefixItems": [
1071
+ {
1072
+ "type": "string",
1073
+ "const": "https://schema.org"
1074
+ },
1075
+ {
1076
+ "type": "string",
1077
+ "const": "https://schema.twindev.org/blob-storage/"
1078
+ },
1079
+ {
1080
+ "type": "string",
1081
+ "const": "https://schema.twindev.org/common/"
1082
+ }
1083
+ ],
1084
+ "items": {
1085
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
1086
+ }
1087
+ },
1088
+ "type": {
1089
+ "type": "string",
1090
+ "const": "ItemList",
1091
+ "description": "JSON-LD Type."
1092
+ },
1093
+ "itemListElement": {
1094
+ "type": "array",
1095
+ "description": "The list of entries.",
1096
+ "prefixItems": [
1097
+ {
1098
+ "$ref": "#/components/schemas/BlobStorageEntry"
1099
+ }
1100
+ ]
1101
+ },
1102
+ "nextItem": {
1103
+ "type": "string",
1104
+ "description": "The cursor to get the next chunk of entries."
1105
+ }
1106
+ },
1107
+ "required": [
1108
+ "@context",
1109
+ "type",
1110
+ "itemListElement"
1111
+ ],
1112
+ "additionalProperties": false,
1113
+ "description": "Interface describing an blob storage entry list."
1114
+ },
1115
+ "BlobStorageUpdateRequest": {
1116
+ "type": "object",
1117
+ "properties": {
1118
+ "encodingFormat": {
1119
+ "type": "string",
1120
+ "description": "The mime type of the blob, will be detected if left undefined."
1121
+ },
1122
+ "fileExtension": {
1123
+ "type": "string",
1124
+ "description": "The extension of the blob, will be detected if left undefined."
1125
+ },
1126
+ "metadata": {
1127
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1128
+ }
1129
+ },
1130
+ "additionalProperties": false,
1131
+ "description": "The body parameters."
1132
+ },
1133
+ "Error": {
1134
+ "type": "object",
1135
+ "properties": {
1136
+ "name": {
1137
+ "type": "string",
1138
+ "description": "The name for the error."
1139
+ },
1140
+ "message": {
1141
+ "type": "string",
1142
+ "description": "The message for the error."
1143
+ },
1144
+ "source": {
1145
+ "type": "string",
1146
+ "description": "The source of the error."
1147
+ },
1148
+ "properties": {
1149
+ "type": "object",
1150
+ "additionalProperties": {},
1151
+ "description": "Any additional information for the error."
1152
+ },
1153
+ "stack": {
1154
+ "type": "string",
1155
+ "description": "The stack trace for the error."
1156
+ },
1157
+ "inner": {
1158
+ "$ref": "#/components/schemas/Error"
1159
+ }
1160
+ },
1161
+ "required": [
1162
+ "name",
1163
+ "message"
1164
+ ],
1165
+ "additionalProperties": false,
1166
+ "description": "Model to describe serialized error."
1167
+ },
1168
+ "NotFoundResponse": {
1169
+ "type": "object",
1170
+ "additionalProperties": false,
1171
+ "properties": {
1172
+ "notFoundId": {
1173
+ "type": "string",
1174
+ "description": "The id if the item that was not found."
1175
+ },
1176
+ "name": {
1177
+ "type": "string",
1178
+ "description": "The name for the error."
1179
+ },
1180
+ "message": {
1181
+ "type": "string",
1182
+ "description": "The message for the error."
1183
+ },
1184
+ "source": {
1185
+ "type": "string",
1186
+ "description": "The source of the error."
1187
+ },
1188
+ "properties": {
1189
+ "type": "object",
1190
+ "additionalProperties": {},
1191
+ "description": "Any additional information for the error."
1192
+ },
1193
+ "stack": {
1194
+ "type": "string",
1195
+ "description": "The stack trace for the error."
1196
+ },
1197
+ "inner": {
1198
+ "$ref": "#/components/schemas/Error"
1199
+ }
1200
+ },
1201
+ "required": [
1202
+ "message",
1203
+ "name"
1204
+ ],
1205
+ "description": "The body which contains the error."
1206
+ },
1207
+ "SortDirection": {
1208
+ "anyOf": [
1209
+ {
1210
+ "type": "string",
1211
+ "const": "asc",
1212
+ "description": "Ascending."
1213
+ },
1214
+ {
1215
+ "type": "string",
1216
+ "const": "desc",
1217
+ "description": "Descending."
1218
+ }
1219
+ ],
1220
+ "description": "The sort directions."
1221
+ }
1222
+ },
1223
+ "securitySchemes": {
1224
+ "jwtBearerAuthScheme": {
1225
+ "type": "http",
1226
+ "scheme": "bearer",
1227
+ "bearerFormat": "JWT"
1228
+ }
1229
+ }
1230
+ }
1231
+ }