-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathschema.json
77 lines (77 loc) · 1.64 KB
/
schema.json
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
{
"name": "todo",
"version": "1.0.0",
"description": "A to-do list example.",
"methods": [
{
"name": "add_item",
"description": "adds an item to the list.",
"inputs": [
{
"name": "item",
"description": "the item to add.",
"required": true,
"type": "string"
}
]
},
{
"name": "get_items",
"description": "returns all items in the list.",
"outputs": [
{
"name": "items",
"description": "the list of to-do items.",
"type": "array",
"items": {
"$ref": "#/types/item"
}
}
]
},
{
"name": "remove_item",
"description": "removes an item from the to-do list.",
"inputs": [
{
"name": "id",
"description": "the id of the item to remove.",
"type": "integer"
}
],
"outputs": [
{
"name": "item",
"description": "the item removed.",
"type": {
"$ref": "#/types/item"
}
}
]
}
],
"types": {
"item": {
"description": "is a to-do item.",
"properties": [
{
"name": "id",
"description": "the id of the item.",
"type": "integer",
"readonly": true
},
{
"name": "text",
"description": "the to-do item text.",
"required": true,
"type": "string"
},
{
"name": "created_at",
"description": "the time the to-do item was created.",
"type": "timestamp"
}
]
}
}
}