forked from sudorandom/protoc-gen-connect-openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbasic.openapi.yaml
164 lines (164 loc) · 4.88 KB
/
basic.openapi.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
openapi: 3.1.0
info:
title: helloworld
paths:
/helloworld.Greeter/SayHello:
get:
tags:
- helloworld.Greeter
description: Sends a greeting
parameters:
- name: message
in: query
content:
application/json:
schema:
$ref: '#/components/schemas/helloworld.HelloRequest'
application/proto:
schema:
$ref: '#/components/schemas/helloworld.HelloRequest'
- schema:
$ref: '#/components/parameters/encoding'
- schema:
$ref: '#/components/parameters/base64'
- schema:
$ref: '#/components/parameters/compression'
- schema:
$ref: '#/components/parameters/connect'
responses:
default:
content:
application/json:
schema:
$ref: '#/components/schemas/connect.error'
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/helloworld.HelloReply'
/helloworld.Greeter/WriteHello:
post:
tags:
- helloworld.Greeter
description: Writes a greeting (has side effects)
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/helloworld.HelloRequest'
required: true
responses:
default:
content:
application/json:
schema:
$ref: '#/components/schemas/connect.error'
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/helloworld.HelloReply'
components:
schemas:
helloworld.HelloReply:
type: object
properties:
message:
type: string
title: message
additionalProperties: false
title: HelloReply
additionalProperties: false
description: The response message containing the greetings
helloworld.HelloRequest:
type: object
properties:
name:
type: string
title: name
additionalProperties: false
example: Ein
title: HelloRequest
additionalProperties: false
description: The request message containing the user's name.
encoding:
title: encoding
description: Define which encoding or 'Message-Codec' to use
base64:
type: boolean
title: base64
description: Specifies if the message query param is base64 encoded, which may be required for binary data
compression:
title: compression
description: Which compression algorithm to use for this request
connect:
title: connect
description: Which version of connect to use.
connect.error:
type: object
properties:
code:
type: string
description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
message:
type: string
description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
detail:
$ref: '#/components/schemas/google.protobuf.Any'
title: Connect Error
additionalProperties: true
description: 'Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation'
google.protobuf.Any:
type: object
properties:
'@type':
type: string
additionalProperties: true
additionalProperties: true
description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
parameters:
encoding:
name: encoding
in: query
content:
application/json:
schema:
$ref: '#/components/schemas/encoding'
application/proto:
schema:
$ref: '#/components/schemas/encoding'
base64:
name: base64
in: query
content:
application/json:
schema:
$ref: '#/components/schemas/base64'
application/proto:
schema:
$ref: '#/components/schemas/base64'
compression:
name: compression
in: query
content:
application/json:
schema:
$ref: '#/components/schemas/compression'
application/proto:
schema:
$ref: '#/components/schemas/compression'
connect:
name: connect
in: query
content:
application/json:
schema:
$ref: '#/components/schemas/connect'
application/proto:
schema:
$ref: '#/components/schemas/connect'
security: []
tags:
- name: helloworld.Greeter
description: The greeting service definition.
externalDocs: {}