forked from Bokbasen/bblrm-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bblrm-specification.yaml
113 lines (96 loc) · 2.28 KB
/
bblrm-specification.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
openapi: 3.1.0
info:
title: Bokbasen LRM API
description: Bokbasen LRM API
version: 0.1.0
paths:
/lorem/work/{id}:
description: Work by id
get:
description: Get Work by id
tags:
- work
operationId: getWork
parameters:
- in: path
description: The work to retrieve by id
name: id
schema:
type: string
required: true
example: "89QPPRK1EDJPW835E8G64SBKEG"
- in: header
description: Etag, the revision of the resource in the client cache
name: If-None-Match
schema:
type: integer
example: 3
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Work'
'304':
description: Not Modified
'400':
description: Bad request. Resource ID must be valid.
'404':
description: Not Found. A resource with the specified ID was not found.
'5XX':
description: Unexpected error.
components:
schemas:
Work:
type: object
properties:
type:
type: string
enum:
- work
urn:
type: string
nullable: false
languages:
description: The language(s) of this work ISO 639-2/B
example: ["nob", "nno"]
type: array
nullable: false
items:
type: string
title:
$ref: '#/components/schemas/WorkTitle'
relations:
type: array
items:
anyOf:
- $ref: "#/components/schemas/ContributorReference"
- $ref: "#/components/schemas/SeriesReference"
WorkTitle:
type: object
properties:
main:
type: string
part:
type: string
number:
type: string
variants:
type: array
items:
type: string
ContributorReference:
type: object
properties:
role:
type: string
urn:
type: string
SeriesReference:
type: object
properties:
role:
type: string
urn:
type: string