-
Notifications
You must be signed in to change notification settings - Fork 611
Expand file tree
/
Copy pathschema.jsonc
More file actions
44 lines (35 loc) · 1.45 KB
/
Copy pathschema.jsonc
File metadata and controls
44 lines (35 loc) · 1.45 KB
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
// echo.schema.jsonc — the entire echo service, human-authored.
{
"service": "Echo",
// Named byte aliases (nominal 32-byte types). Only bin32 today.
"aliases": {
"Fr": "bin32"
},
// Shared struct types, referenced by name from commands.
"types": {
"EchoInner": {
"values": "bytes[]",
"flag": "bool?"
}
},
// Error variant shared by every command.
"error": { "message": "string" },
// command -> { request, response }. Names are unprefixed; generated type
// names get the service prefix (EchoBytes), method names do not (bytes).
"commands": {
"Bytes": { "request": { "data": "bytes" },
"response": { "data": "bytes" } },
"Fields": { "request": { "a": "u32", "b": "u64", "name": "string" },
"response": { "a": "u32", "b": "u64", "name": "string" } },
"Nested": { "request": { "inner": "EchoInner" },
"response": { "inner": "EchoInner" } },
"Aliases": { "request": { "treeId": "u32", "hash": "Fr",
"maybeHash": "Fr?", "hashes": "Fr[]" },
"response": { "treeId": "u32", "hash": "Fr",
"maybeHash": "Fr?", "hashes": "Fr[]" } },
"Blobs": { "request": { "maybeData": "bytes?", "parts": "bytes[2]" },
"response": { "maybeData": "bytes?", "parts": "bytes[2]" } },
"Fail": { "request": { "message": "string" },
"response": {} }
}
}