forked from OAI/sig-moonwalk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rpc.yaml
110 lines (109 loc) · 2.99 KB
/
rpc.yaml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
openapi: 4.0.0
info:
title: RPC API
version: 1.0.0
paths:
"/service":
requests:
createFoo:
method: post
parameterSchema:
type: object
properties:
header: ## We can either use this specially named property or create a first class headerSchema property on the Request Object
type: object
properties:
path:
const: service.createFoo ## path Header field used to convey the RPC method
contentType: application/json
contentSchema:
$ref: "#/components/schemas/foo"
responses:
ok:
status: 201
contentType: application/json
contentSchema:
$ref: "#/components/schemas/foo"
updateFoo:
method: post
parameterSchema:
type: object
properties:
header:
type: object
properties:
path:
const: service.updateFoo ## path Header field used to convey the RPC method
contentType: application/json
contentSchema:
$ref: "#/components/schemas/foo"
responses:
ok:
status: 200
contentType: application/json
contentSchema:
$ref: "#/components/schemas/foo"
getFoo:
method: get
parameterSchema:
type: object
properties:
header:
type: object
properties:
path:
const: service.getFoo ## path Header field used to convey the RPC method
responses:
ok:
status: 200
contentType: application/json
contentSchema:
$ref: "#/components/schemas/foo"
deleteFoo:
method: post
parameterSchema:
type: object
properties:
header:
type: object
properties:
path:
const: service.deleteFoo
responses:
ok:
status: 200
contentType: application/json
contentSchema:
$ref: "#/components/schemas/foo"
"/jsonrpc":
requests:
getFoo:
method: post
parameterSchema:
type: object
properties:
body:
type: object
properties:
jsonrpc:
const: 2.0
method:
const: getFoo
params:
type: object
properties:
id:
type: string
responses:
ok:
status: 200
contentType: application/json
contentSchema:
type: object
properties:
jsonrpc:
const: 2.0
result:
$ref: "#/components/schemas/foo"
id:
type: string