/
category.raml
53 lines (47 loc) · 1.72 KB
/
category.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
51
52
53
#%RAML 1.0
title: "Organizations"
baseUri: https://github.com/folio-org/mod-organizations-storage
version: v1.1
documentation:
- title: Categories
content: <b>CRUD APIs used to manage cateogries.</b>
types:
category: !include acq-models/mod-orgs/schemas/category.json
category_collection: !include acq-models/mod-orgs/schemas/category_collection.json
errors: !include raml-util/schemas/errors.schema
UUID:
type: string
pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
traits:
orderable: !include raml-util/traits/orderable.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
language: !include raml-util/traits/language.raml
validate: !include raml-util/traits/validation.raml
resourceTypes:
collection: !include raml-util/rtypes/collection.raml
collection-item: !include raml-util/rtypes/item-collection.raml
/organizations-storage/categories:
type:
collection:
exampleCollection: !include acq-models/mod-orgs/examples/category_collection.sample
exampleItem: !include acq-models/mod-orgs/examples/category_post.sample
schemaCollection: category_collection
schemaItem: category
is: [validate]
get:
description: Get list of categories
is: [
searchable: {description: "with valid searchable fields: for example code", example: "[\"code\", \"MEDGRANT\", \"=\"]"},
pageable
]
/{id}:
uriParameters:
id:
description: The UUID of a Category
type: UUID
type:
collection-item:
exampleItem: !include acq-models/mod-orgs/examples/category_get.sample
schema: category
is: [validate]