-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathopenrpc.json
78 lines (78 loc) · 1.68 KB
/
openrpc.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
78
{
"openrpc": "1.0.0",
"info": {
"version": "1.0.10",
"title": "Example JSON-RPC",
"description": "This is a basic template to get you started",
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"methods": [
{
"name": "ping",
"summary": "Returns a pong.",
"params": [],
"result": {
"name": "pong",
"description": "the string `pong`",
"schema": {
"title": "pong",
"type": "string",
"enum": [
"pong"
]
}
}
},
{
"name": "sum",
"summary": "Returns the sum of two numbers",
"params": [
{
"name": "a",
"required": true,
"description": "The first number",
"schema": {
"$ref": "#/components/schemas/Number"
}
},
{
"name": "b",
"required": true,
"description": "The second number",
"schema": {
"$ref": "#/components/schemas/Number"
}
}
],
"result": {
"name": "sumResult",
"schema": {
"$ref": "#/components/schemas/Number"
}
}
}
],
"components": {
"schemas": {
"Number": {
"type": "string",
"pattern": "^0x[a-fA-F\\d]+$",
"description": "The hex representation of a number"
}
},
"contentDescriptors": {
"Null": {
"name": "Null",
"description": "JSON Null value",
"summary": "Null value",
"schema": {
"type": "null",
"description": "Null value"
}
}
}
}
}