-
Notifications
You must be signed in to change notification settings - Fork 12
/
codex.raml
50 lines (45 loc) · 1.44 KB
/
codex.raml
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
#%RAML 1.0
title: Codex
baseUri: https://github.com/folio-org/mod-codex-ekb
version: v1
documentation:
- title: Codex API
content: This documents the FOLIO codex API
types:
instance: !include ../../schemas/codex/instance.json
instanceCollection: !include ../../schemas/codex/instanceCollection.json
errors: !include ../../schemas/errors.schema
traits:
validate: !include ../../traits/validation.raml
pageable: !include ../../traits/pageable.raml
searchable: !include ../../traits/searchable.raml
resourceTypes:
get-only: !include ../../rtypes/get-only.raml
collection-item-get: !include ../../rtypes/item-collection-get.raml
/codex-instances:
displayName: Codex instances
description: Codex instance collection
type:
get-only:
schema: instanceCollection
exampleCollection: !include ../../examples/codex/instanceCollection.sample
get:
is: [
searchable: {description: "with valid searchable fields: for example title = earth", example: "title=earth"},
pageable,
validate
]
responses:
401:
description: "Not authorized to perform requested action"
body:
text/plain:
example: |
"unable to list instances -- unauthorized"
/{id}:
displayName: Codex instance
description: Get a specific codex instance
type:
collection-item-get:
schema: instance
exampleItem: !include ../../examples/codex/instance.sample