scanoss 1.32.0__py3-none-any.whl → 1.34.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- protoc_gen_swagger/options/annotations_pb2.py +18 -12
- protoc_gen_swagger/options/annotations_pb2.pyi +48 -0
- protoc_gen_swagger/options/annotations_pb2_grpc.py +20 -0
- protoc_gen_swagger/options/openapiv2_pb2.py +110 -99
- protoc_gen_swagger/options/openapiv2_pb2.pyi +1317 -0
- protoc_gen_swagger/options/openapiv2_pb2_grpc.py +20 -0
- scanoss/__init__.py +1 -1
- scanoss/api/common/v2/scanoss_common_pb2.py +8 -6
- scanoss/api/common/v2/scanoss_common_pb2_grpc.py +5 -1
- scanoss/api/components/v2/scanoss_components_pb2.py +46 -32
- scanoss/api/components/v2/scanoss_components_pb2_grpc.py +6 -6
- scanoss/api/cryptography/v2/scanoss_cryptography_pb2.py +107 -29
- scanoss/api/cryptography/v2/scanoss_cryptography_pb2_grpc.py +545 -9
- scanoss/api/dependencies/v2/scanoss_dependencies_pb2.py +29 -21
- scanoss/api/dependencies/v2/scanoss_dependencies_pb2_grpc.py +1 -0
- scanoss/api/geoprovenance/v2/scanoss_geoprovenance_pb2.py +51 -19
- scanoss/api/geoprovenance/v2/scanoss_geoprovenance_pb2_grpc.py +189 -1
- scanoss/api/licenses/v2/scanoss_licenses_pb2.py +27 -27
- scanoss/api/scanning/v2/scanoss_scanning_pb2.py +18 -18
- scanoss/api/semgrep/v2/scanoss_semgrep_pb2.py +29 -13
- scanoss/api/semgrep/v2/scanoss_semgrep_pb2_grpc.py +102 -8
- scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2.py +21 -21
- scanoss/cli.py +193 -146
- scanoss/components.py +57 -46
- scanoss/cryptography.py +64 -44
- scanoss/cyclonedx.py +22 -0
- scanoss/data/build_date.txt +1 -1
- scanoss/scanossgrpc.py +433 -314
- {scanoss-1.32.0.dist-info → scanoss-1.34.0.dist-info}/METADATA +4 -3
- {scanoss-1.32.0.dist-info → scanoss-1.34.0.dist-info}/RECORD +34 -32
- {scanoss-1.32.0.dist-info → scanoss-1.34.0.dist-info}/WHEEL +0 -0
- {scanoss-1.32.0.dist-info → scanoss-1.34.0.dist-info}/entry_points.txt +0 -0
- {scanoss-1.32.0.dist-info → scanoss-1.34.0.dist-info}/licenses/LICENSE +0 -0
- {scanoss-1.32.0.dist-info → scanoss-1.34.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,1317 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import builtins
|
|
7
|
+
import collections.abc
|
|
8
|
+
import google.protobuf.any_pb2
|
|
9
|
+
import google.protobuf.descriptor
|
|
10
|
+
import google.protobuf.internal.containers
|
|
11
|
+
import google.protobuf.internal.enum_type_wrapper
|
|
12
|
+
import google.protobuf.message
|
|
13
|
+
import google.protobuf.struct_pb2
|
|
14
|
+
import sys
|
|
15
|
+
import typing
|
|
16
|
+
|
|
17
|
+
if sys.version_info >= (3, 10):
|
|
18
|
+
import typing as typing_extensions
|
|
19
|
+
else:
|
|
20
|
+
import typing_extensions
|
|
21
|
+
|
|
22
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
23
|
+
|
|
24
|
+
@typing.final
|
|
25
|
+
class Swagger(google.protobuf.message.Message):
|
|
26
|
+
"""`Swagger` is a representation of OpenAPI v2 specification's Swagger object.
|
|
27
|
+
|
|
28
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
|
|
29
|
+
|
|
30
|
+
Example:
|
|
31
|
+
|
|
32
|
+
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
|
|
33
|
+
info: {
|
|
34
|
+
title: "Echo API";
|
|
35
|
+
version: "1.0";
|
|
36
|
+
description: ";
|
|
37
|
+
contact: {
|
|
38
|
+
name: "gRPC-Gateway project";
|
|
39
|
+
url: "https://github.com/grpc-ecosystem/grpc-gateway";
|
|
40
|
+
email: "none@example.com";
|
|
41
|
+
};
|
|
42
|
+
license: {
|
|
43
|
+
name: "BSD 3-Clause License";
|
|
44
|
+
url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
schemes: HTTPS;
|
|
48
|
+
consumes: "application/json";
|
|
49
|
+
produces: "application/json";
|
|
50
|
+
};
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
54
|
+
|
|
55
|
+
class _SwaggerScheme:
|
|
56
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
57
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
58
|
+
|
|
59
|
+
class _SwaggerSchemeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Swagger._SwaggerScheme.ValueType], builtins.type):
|
|
60
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
61
|
+
UNKNOWN: Swagger._SwaggerScheme.ValueType # 0
|
|
62
|
+
HTTP: Swagger._SwaggerScheme.ValueType # 1
|
|
63
|
+
HTTPS: Swagger._SwaggerScheme.ValueType # 2
|
|
64
|
+
WS: Swagger._SwaggerScheme.ValueType # 3
|
|
65
|
+
WSS: Swagger._SwaggerScheme.ValueType # 4
|
|
66
|
+
|
|
67
|
+
class SwaggerScheme(_SwaggerScheme, metaclass=_SwaggerSchemeEnumTypeWrapper): ...
|
|
68
|
+
UNKNOWN: Swagger.SwaggerScheme.ValueType # 0
|
|
69
|
+
HTTP: Swagger.SwaggerScheme.ValueType # 1
|
|
70
|
+
HTTPS: Swagger.SwaggerScheme.ValueType # 2
|
|
71
|
+
WS: Swagger.SwaggerScheme.ValueType # 3
|
|
72
|
+
WSS: Swagger.SwaggerScheme.ValueType # 4
|
|
73
|
+
|
|
74
|
+
@typing.final
|
|
75
|
+
class ResponsesEntry(google.protobuf.message.Message):
|
|
76
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
77
|
+
|
|
78
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
79
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
80
|
+
key: builtins.str
|
|
81
|
+
@property
|
|
82
|
+
def value(self) -> global___Response: ...
|
|
83
|
+
def __init__(
|
|
84
|
+
self,
|
|
85
|
+
*,
|
|
86
|
+
key: builtins.str = ...,
|
|
87
|
+
value: global___Response | None = ...,
|
|
88
|
+
) -> None: ...
|
|
89
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
90
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
91
|
+
|
|
92
|
+
@typing.final
|
|
93
|
+
class ExtensionsEntry(google.protobuf.message.Message):
|
|
94
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
95
|
+
|
|
96
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
97
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
98
|
+
key: builtins.str
|
|
99
|
+
@property
|
|
100
|
+
def value(self) -> google.protobuf.struct_pb2.Value: ...
|
|
101
|
+
def __init__(
|
|
102
|
+
self,
|
|
103
|
+
*,
|
|
104
|
+
key: builtins.str = ...,
|
|
105
|
+
value: google.protobuf.struct_pb2.Value | None = ...,
|
|
106
|
+
) -> None: ...
|
|
107
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
108
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
109
|
+
|
|
110
|
+
SWAGGER_FIELD_NUMBER: builtins.int
|
|
111
|
+
INFO_FIELD_NUMBER: builtins.int
|
|
112
|
+
HOST_FIELD_NUMBER: builtins.int
|
|
113
|
+
BASE_PATH_FIELD_NUMBER: builtins.int
|
|
114
|
+
SCHEMES_FIELD_NUMBER: builtins.int
|
|
115
|
+
CONSUMES_FIELD_NUMBER: builtins.int
|
|
116
|
+
PRODUCES_FIELD_NUMBER: builtins.int
|
|
117
|
+
RESPONSES_FIELD_NUMBER: builtins.int
|
|
118
|
+
SECURITY_DEFINITIONS_FIELD_NUMBER: builtins.int
|
|
119
|
+
SECURITY_FIELD_NUMBER: builtins.int
|
|
120
|
+
EXTERNAL_DOCS_FIELD_NUMBER: builtins.int
|
|
121
|
+
EXTENSIONS_FIELD_NUMBER: builtins.int
|
|
122
|
+
swagger: builtins.str
|
|
123
|
+
"""Specifies the Swagger Specification version being used. It can be
|
|
124
|
+
used by the Swagger UI and other clients to interpret the API listing. The
|
|
125
|
+
value MUST be "2.0".
|
|
126
|
+
"""
|
|
127
|
+
host: builtins.str
|
|
128
|
+
"""The host (name or ip) serving the API. This MUST be the host only and does
|
|
129
|
+
not include the scheme nor sub-paths. It MAY include a port. If the host is
|
|
130
|
+
not included, the host serving the documentation is to be used (including
|
|
131
|
+
the port). The host does not support path templating.
|
|
132
|
+
"""
|
|
133
|
+
base_path: builtins.str
|
|
134
|
+
"""The base path on which the API is served, which is relative to the host. If
|
|
135
|
+
it is not included, the API is served directly under the host. The value
|
|
136
|
+
MUST start with a leading slash (/). The basePath does not support path
|
|
137
|
+
templating.
|
|
138
|
+
Note that using `base_path` does not change the endpoint paths that are
|
|
139
|
+
generated in the resulting Swagger file. If you wish to use `base_path`
|
|
140
|
+
with relatively generated Swagger paths, the `base_path` prefix must be
|
|
141
|
+
manually removed from your `google.api.http` paths and your code changed to
|
|
142
|
+
serve the API from the `base_path`.
|
|
143
|
+
"""
|
|
144
|
+
@property
|
|
145
|
+
def info(self) -> global___Info:
|
|
146
|
+
"""Provides metadata about the API. The metadata can be used by the
|
|
147
|
+
clients if needed.
|
|
148
|
+
"""
|
|
149
|
+
|
|
150
|
+
@property
|
|
151
|
+
def schemes(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___Swagger.SwaggerScheme.ValueType]:
|
|
152
|
+
"""The transfer protocol of the API. Values MUST be from the list: "http",
|
|
153
|
+
"https", "ws", "wss". If the schemes is not included, the default scheme to
|
|
154
|
+
be used is the one used to access the Swagger definition itself.
|
|
155
|
+
"""
|
|
156
|
+
|
|
157
|
+
@property
|
|
158
|
+
def consumes(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
159
|
+
"""A list of MIME types the APIs can consume. This is global to all APIs but
|
|
160
|
+
can be overridden on specific API calls. Value MUST be as described under
|
|
161
|
+
Mime Types.
|
|
162
|
+
"""
|
|
163
|
+
|
|
164
|
+
@property
|
|
165
|
+
def produces(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
166
|
+
"""A list of MIME types the APIs can produce. This is global to all APIs but
|
|
167
|
+
can be overridden on specific API calls. Value MUST be as described under
|
|
168
|
+
Mime Types.
|
|
169
|
+
"""
|
|
170
|
+
|
|
171
|
+
@property
|
|
172
|
+
def responses(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___Response]:
|
|
173
|
+
"""An object to hold responses that can be used across operations. This
|
|
174
|
+
property does not define global responses for all operations.
|
|
175
|
+
"""
|
|
176
|
+
|
|
177
|
+
@property
|
|
178
|
+
def security_definitions(self) -> global___SecurityDefinitions:
|
|
179
|
+
"""Security scheme definitions that can be used across the specification."""
|
|
180
|
+
|
|
181
|
+
@property
|
|
182
|
+
def security(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SecurityRequirement]:
|
|
183
|
+
"""A declaration of which security schemes are applied for the API as a whole.
|
|
184
|
+
The list of values describes alternative security schemes that can be used
|
|
185
|
+
(that is, there is a logical OR between the security requirements).
|
|
186
|
+
Individual operations can override this definition.
|
|
187
|
+
"""
|
|
188
|
+
|
|
189
|
+
@property
|
|
190
|
+
def external_docs(self) -> global___ExternalDocumentation:
|
|
191
|
+
"""Additional external documentation."""
|
|
192
|
+
|
|
193
|
+
@property
|
|
194
|
+
def extensions(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.struct_pb2.Value]: ...
|
|
195
|
+
def __init__(
|
|
196
|
+
self,
|
|
197
|
+
*,
|
|
198
|
+
swagger: builtins.str = ...,
|
|
199
|
+
info: global___Info | None = ...,
|
|
200
|
+
host: builtins.str = ...,
|
|
201
|
+
base_path: builtins.str = ...,
|
|
202
|
+
schemes: collections.abc.Iterable[global___Swagger.SwaggerScheme.ValueType] | None = ...,
|
|
203
|
+
consumes: collections.abc.Iterable[builtins.str] | None = ...,
|
|
204
|
+
produces: collections.abc.Iterable[builtins.str] | None = ...,
|
|
205
|
+
responses: collections.abc.Mapping[builtins.str, global___Response] | None = ...,
|
|
206
|
+
security_definitions: global___SecurityDefinitions | None = ...,
|
|
207
|
+
security: collections.abc.Iterable[global___SecurityRequirement] | None = ...,
|
|
208
|
+
external_docs: global___ExternalDocumentation | None = ...,
|
|
209
|
+
extensions: collections.abc.Mapping[builtins.str, google.protobuf.struct_pb2.Value] | None = ...,
|
|
210
|
+
) -> None: ...
|
|
211
|
+
def HasField(self, field_name: typing.Literal["external_docs", b"external_docs", "info", b"info", "security_definitions", b"security_definitions"]) -> builtins.bool: ...
|
|
212
|
+
def ClearField(self, field_name: typing.Literal["base_path", b"base_path", "consumes", b"consumes", "extensions", b"extensions", "external_docs", b"external_docs", "host", b"host", "info", b"info", "produces", b"produces", "responses", b"responses", "schemes", b"schemes", "security", b"security", "security_definitions", b"security_definitions", "swagger", b"swagger"]) -> None: ...
|
|
213
|
+
|
|
214
|
+
global___Swagger = Swagger
|
|
215
|
+
|
|
216
|
+
@typing.final
|
|
217
|
+
class Operation(google.protobuf.message.Message):
|
|
218
|
+
"""`Operation` is a representation of OpenAPI v2 specification's Operation object.
|
|
219
|
+
|
|
220
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject
|
|
221
|
+
|
|
222
|
+
Example:
|
|
223
|
+
|
|
224
|
+
service EchoService {
|
|
225
|
+
rpc Echo(SimpleMessage) returns (SimpleMessage) {
|
|
226
|
+
option (google.api.http) = {
|
|
227
|
+
get: "/v1/example/echo/{id}"
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
|
231
|
+
summary: "Get a message.";
|
|
232
|
+
operation_id: "getMessage";
|
|
233
|
+
tags: "echo";
|
|
234
|
+
responses: {
|
|
235
|
+
key: "200"
|
|
236
|
+
value: {
|
|
237
|
+
description: "OK";
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
"""
|
|
244
|
+
|
|
245
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
246
|
+
|
|
247
|
+
@typing.final
|
|
248
|
+
class ResponsesEntry(google.protobuf.message.Message):
|
|
249
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
250
|
+
|
|
251
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
252
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
253
|
+
key: builtins.str
|
|
254
|
+
@property
|
|
255
|
+
def value(self) -> global___Response: ...
|
|
256
|
+
def __init__(
|
|
257
|
+
self,
|
|
258
|
+
*,
|
|
259
|
+
key: builtins.str = ...,
|
|
260
|
+
value: global___Response | None = ...,
|
|
261
|
+
) -> None: ...
|
|
262
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
263
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
264
|
+
|
|
265
|
+
@typing.final
|
|
266
|
+
class ExtensionsEntry(google.protobuf.message.Message):
|
|
267
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
268
|
+
|
|
269
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
270
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
271
|
+
key: builtins.str
|
|
272
|
+
@property
|
|
273
|
+
def value(self) -> google.protobuf.struct_pb2.Value: ...
|
|
274
|
+
def __init__(
|
|
275
|
+
self,
|
|
276
|
+
*,
|
|
277
|
+
key: builtins.str = ...,
|
|
278
|
+
value: google.protobuf.struct_pb2.Value | None = ...,
|
|
279
|
+
) -> None: ...
|
|
280
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
281
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
282
|
+
|
|
283
|
+
TAGS_FIELD_NUMBER: builtins.int
|
|
284
|
+
SUMMARY_FIELD_NUMBER: builtins.int
|
|
285
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
286
|
+
EXTERNAL_DOCS_FIELD_NUMBER: builtins.int
|
|
287
|
+
OPERATION_ID_FIELD_NUMBER: builtins.int
|
|
288
|
+
CONSUMES_FIELD_NUMBER: builtins.int
|
|
289
|
+
PRODUCES_FIELD_NUMBER: builtins.int
|
|
290
|
+
RESPONSES_FIELD_NUMBER: builtins.int
|
|
291
|
+
SCHEMES_FIELD_NUMBER: builtins.int
|
|
292
|
+
DEPRECATED_FIELD_NUMBER: builtins.int
|
|
293
|
+
SECURITY_FIELD_NUMBER: builtins.int
|
|
294
|
+
EXTENSIONS_FIELD_NUMBER: builtins.int
|
|
295
|
+
summary: builtins.str
|
|
296
|
+
"""A short summary of what the operation does. For maximum readability in the
|
|
297
|
+
swagger-ui, this field SHOULD be less than 120 characters.
|
|
298
|
+
"""
|
|
299
|
+
description: builtins.str
|
|
300
|
+
"""A verbose explanation of the operation behavior. GFM syntax can be used for
|
|
301
|
+
rich text representation.
|
|
302
|
+
"""
|
|
303
|
+
operation_id: builtins.str
|
|
304
|
+
"""Unique string used to identify the operation. The id MUST be unique among
|
|
305
|
+
all operations described in the API. Tools and libraries MAY use the
|
|
306
|
+
operationId to uniquely identify an operation, therefore, it is recommended
|
|
307
|
+
to follow common programming naming conventions.
|
|
308
|
+
"""
|
|
309
|
+
deprecated: builtins.bool
|
|
310
|
+
"""Declares this operation to be deprecated. Usage of the declared operation
|
|
311
|
+
should be refrained. Default value is false.
|
|
312
|
+
"""
|
|
313
|
+
@property
|
|
314
|
+
def tags(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
315
|
+
"""A list of tags for API documentation control. Tags can be used for logical
|
|
316
|
+
grouping of operations by resources or any other qualifier.
|
|
317
|
+
"""
|
|
318
|
+
|
|
319
|
+
@property
|
|
320
|
+
def external_docs(self) -> global___ExternalDocumentation:
|
|
321
|
+
"""Additional external documentation for this operation."""
|
|
322
|
+
|
|
323
|
+
@property
|
|
324
|
+
def consumes(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
325
|
+
"""A list of MIME types the operation can consume. This overrides the consumes
|
|
326
|
+
definition at the Swagger Object. An empty value MAY be used to clear the
|
|
327
|
+
global definition. Value MUST be as described under Mime Types.
|
|
328
|
+
"""
|
|
329
|
+
|
|
330
|
+
@property
|
|
331
|
+
def produces(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
332
|
+
"""A list of MIME types the operation can produce. This overrides the produces
|
|
333
|
+
definition at the Swagger Object. An empty value MAY be used to clear the
|
|
334
|
+
global definition. Value MUST be as described under Mime Types.
|
|
335
|
+
"""
|
|
336
|
+
|
|
337
|
+
@property
|
|
338
|
+
def responses(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___Response]:
|
|
339
|
+
"""The list of possible responses as they are returned from executing this
|
|
340
|
+
operation.
|
|
341
|
+
"""
|
|
342
|
+
|
|
343
|
+
@property
|
|
344
|
+
def schemes(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
345
|
+
"""The transfer protocol for the operation. Values MUST be from the list:
|
|
346
|
+
"http", "https", "ws", "wss". The value overrides the Swagger Object
|
|
347
|
+
schemes definition.
|
|
348
|
+
"""
|
|
349
|
+
|
|
350
|
+
@property
|
|
351
|
+
def security(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SecurityRequirement]:
|
|
352
|
+
"""A declaration of which security schemes are applied for this operation. The
|
|
353
|
+
list of values describes alternative security schemes that can be used
|
|
354
|
+
(that is, there is a logical OR between the security requirements). This
|
|
355
|
+
definition overrides any declared top-level security. To remove a top-level
|
|
356
|
+
security declaration, an empty array can be used.
|
|
357
|
+
"""
|
|
358
|
+
|
|
359
|
+
@property
|
|
360
|
+
def extensions(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.struct_pb2.Value]: ...
|
|
361
|
+
def __init__(
|
|
362
|
+
self,
|
|
363
|
+
*,
|
|
364
|
+
tags: collections.abc.Iterable[builtins.str] | None = ...,
|
|
365
|
+
summary: builtins.str = ...,
|
|
366
|
+
description: builtins.str = ...,
|
|
367
|
+
external_docs: global___ExternalDocumentation | None = ...,
|
|
368
|
+
operation_id: builtins.str = ...,
|
|
369
|
+
consumes: collections.abc.Iterable[builtins.str] | None = ...,
|
|
370
|
+
produces: collections.abc.Iterable[builtins.str] | None = ...,
|
|
371
|
+
responses: collections.abc.Mapping[builtins.str, global___Response] | None = ...,
|
|
372
|
+
schemes: collections.abc.Iterable[builtins.str] | None = ...,
|
|
373
|
+
deprecated: builtins.bool = ...,
|
|
374
|
+
security: collections.abc.Iterable[global___SecurityRequirement] | None = ...,
|
|
375
|
+
extensions: collections.abc.Mapping[builtins.str, google.protobuf.struct_pb2.Value] | None = ...,
|
|
376
|
+
) -> None: ...
|
|
377
|
+
def HasField(self, field_name: typing.Literal["external_docs", b"external_docs"]) -> builtins.bool: ...
|
|
378
|
+
def ClearField(self, field_name: typing.Literal["consumes", b"consumes", "deprecated", b"deprecated", "description", b"description", "extensions", b"extensions", "external_docs", b"external_docs", "operation_id", b"operation_id", "produces", b"produces", "responses", b"responses", "schemes", b"schemes", "security", b"security", "summary", b"summary", "tags", b"tags"]) -> None: ...
|
|
379
|
+
|
|
380
|
+
global___Operation = Operation
|
|
381
|
+
|
|
382
|
+
@typing.final
|
|
383
|
+
class Header(google.protobuf.message.Message):
|
|
384
|
+
"""`Header` is a representation of OpenAPI v2 specification's Header object.
|
|
385
|
+
|
|
386
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
|
|
387
|
+
"""
|
|
388
|
+
|
|
389
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
390
|
+
|
|
391
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
392
|
+
TYPE_FIELD_NUMBER: builtins.int
|
|
393
|
+
FORMAT_FIELD_NUMBER: builtins.int
|
|
394
|
+
DEFAULT_FIELD_NUMBER: builtins.int
|
|
395
|
+
PATTERN_FIELD_NUMBER: builtins.int
|
|
396
|
+
description: builtins.str
|
|
397
|
+
"""`Description` is a short description of the header."""
|
|
398
|
+
type: builtins.str
|
|
399
|
+
"""The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported."""
|
|
400
|
+
format: builtins.str
|
|
401
|
+
"""`Format` The extending format for the previously mentioned type."""
|
|
402
|
+
default: builtins.str
|
|
403
|
+
"""`Default` Declares the value of the header that the server will use if none is provided.
|
|
404
|
+
See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
|
|
405
|
+
Unlike JSON Schema this value MUST conform to the defined type for the header.
|
|
406
|
+
"""
|
|
407
|
+
pattern: builtins.str
|
|
408
|
+
"""'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3."""
|
|
409
|
+
def __init__(
|
|
410
|
+
self,
|
|
411
|
+
*,
|
|
412
|
+
description: builtins.str = ...,
|
|
413
|
+
type: builtins.str = ...,
|
|
414
|
+
format: builtins.str = ...,
|
|
415
|
+
default: builtins.str = ...,
|
|
416
|
+
pattern: builtins.str = ...,
|
|
417
|
+
) -> None: ...
|
|
418
|
+
def ClearField(self, field_name: typing.Literal["default", b"default", "description", b"description", "format", b"format", "pattern", b"pattern", "type", b"type"]) -> None: ...
|
|
419
|
+
|
|
420
|
+
global___Header = Header
|
|
421
|
+
|
|
422
|
+
@typing.final
|
|
423
|
+
class Response(google.protobuf.message.Message):
|
|
424
|
+
"""`Response` is a representation of OpenAPI v2 specification's Response object.
|
|
425
|
+
|
|
426
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject
|
|
427
|
+
"""
|
|
428
|
+
|
|
429
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
430
|
+
|
|
431
|
+
@typing.final
|
|
432
|
+
class HeadersEntry(google.protobuf.message.Message):
|
|
433
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
434
|
+
|
|
435
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
436
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
437
|
+
key: builtins.str
|
|
438
|
+
@property
|
|
439
|
+
def value(self) -> global___Header: ...
|
|
440
|
+
def __init__(
|
|
441
|
+
self,
|
|
442
|
+
*,
|
|
443
|
+
key: builtins.str = ...,
|
|
444
|
+
value: global___Header | None = ...,
|
|
445
|
+
) -> None: ...
|
|
446
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
447
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
448
|
+
|
|
449
|
+
@typing.final
|
|
450
|
+
class ExamplesEntry(google.protobuf.message.Message):
|
|
451
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
452
|
+
|
|
453
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
454
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
455
|
+
key: builtins.str
|
|
456
|
+
value: builtins.str
|
|
457
|
+
def __init__(
|
|
458
|
+
self,
|
|
459
|
+
*,
|
|
460
|
+
key: builtins.str = ...,
|
|
461
|
+
value: builtins.str = ...,
|
|
462
|
+
) -> None: ...
|
|
463
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
464
|
+
|
|
465
|
+
@typing.final
|
|
466
|
+
class ExtensionsEntry(google.protobuf.message.Message):
|
|
467
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
468
|
+
|
|
469
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
470
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
471
|
+
key: builtins.str
|
|
472
|
+
@property
|
|
473
|
+
def value(self) -> google.protobuf.struct_pb2.Value: ...
|
|
474
|
+
def __init__(
|
|
475
|
+
self,
|
|
476
|
+
*,
|
|
477
|
+
key: builtins.str = ...,
|
|
478
|
+
value: google.protobuf.struct_pb2.Value | None = ...,
|
|
479
|
+
) -> None: ...
|
|
480
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
481
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
482
|
+
|
|
483
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
484
|
+
SCHEMA_FIELD_NUMBER: builtins.int
|
|
485
|
+
HEADERS_FIELD_NUMBER: builtins.int
|
|
486
|
+
EXAMPLES_FIELD_NUMBER: builtins.int
|
|
487
|
+
EXTENSIONS_FIELD_NUMBER: builtins.int
|
|
488
|
+
description: builtins.str
|
|
489
|
+
"""`Description` is a short description of the response.
|
|
490
|
+
GFM syntax can be used for rich text representation.
|
|
491
|
+
"""
|
|
492
|
+
@property
|
|
493
|
+
def schema(self) -> global___Schema:
|
|
494
|
+
"""`Schema` optionally defines the structure of the response.
|
|
495
|
+
If `Schema` is not provided, it means there is no content to the response.
|
|
496
|
+
"""
|
|
497
|
+
|
|
498
|
+
@property
|
|
499
|
+
def headers(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___Header]:
|
|
500
|
+
"""`Headers` A list of headers that are sent with the response.
|
|
501
|
+
`Header` name is expected to be a string in the canonical format of the MIME header key
|
|
502
|
+
See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
|
|
503
|
+
"""
|
|
504
|
+
|
|
505
|
+
@property
|
|
506
|
+
def examples(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]:
|
|
507
|
+
"""`Examples` gives per-mimetype response examples.
|
|
508
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
|
|
509
|
+
"""
|
|
510
|
+
|
|
511
|
+
@property
|
|
512
|
+
def extensions(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.struct_pb2.Value]: ...
|
|
513
|
+
def __init__(
|
|
514
|
+
self,
|
|
515
|
+
*,
|
|
516
|
+
description: builtins.str = ...,
|
|
517
|
+
schema: global___Schema | None = ...,
|
|
518
|
+
headers: collections.abc.Mapping[builtins.str, global___Header] | None = ...,
|
|
519
|
+
examples: collections.abc.Mapping[builtins.str, builtins.str] | None = ...,
|
|
520
|
+
extensions: collections.abc.Mapping[builtins.str, google.protobuf.struct_pb2.Value] | None = ...,
|
|
521
|
+
) -> None: ...
|
|
522
|
+
def HasField(self, field_name: typing.Literal["schema", b"schema"]) -> builtins.bool: ...
|
|
523
|
+
def ClearField(self, field_name: typing.Literal["description", b"description", "examples", b"examples", "extensions", b"extensions", "headers", b"headers", "schema", b"schema"]) -> None: ...
|
|
524
|
+
|
|
525
|
+
global___Response = Response
|
|
526
|
+
|
|
527
|
+
@typing.final
|
|
528
|
+
class Info(google.protobuf.message.Message):
|
|
529
|
+
"""`Info` is a representation of OpenAPI v2 specification's Info object.
|
|
530
|
+
|
|
531
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject
|
|
532
|
+
|
|
533
|
+
Example:
|
|
534
|
+
|
|
535
|
+
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
|
|
536
|
+
info: {
|
|
537
|
+
title: "Echo API";
|
|
538
|
+
version: "1.0";
|
|
539
|
+
description: ";
|
|
540
|
+
contact: {
|
|
541
|
+
name: "gRPC-Gateway project";
|
|
542
|
+
url: "https://github.com/grpc-ecosystem/grpc-gateway";
|
|
543
|
+
email: "none@example.com";
|
|
544
|
+
};
|
|
545
|
+
license: {
|
|
546
|
+
name: "BSD 3-Clause License";
|
|
547
|
+
url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
...
|
|
551
|
+
};
|
|
552
|
+
"""
|
|
553
|
+
|
|
554
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
555
|
+
|
|
556
|
+
@typing.final
|
|
557
|
+
class ExtensionsEntry(google.protobuf.message.Message):
|
|
558
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
559
|
+
|
|
560
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
561
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
562
|
+
key: builtins.str
|
|
563
|
+
@property
|
|
564
|
+
def value(self) -> google.protobuf.struct_pb2.Value: ...
|
|
565
|
+
def __init__(
|
|
566
|
+
self,
|
|
567
|
+
*,
|
|
568
|
+
key: builtins.str = ...,
|
|
569
|
+
value: google.protobuf.struct_pb2.Value | None = ...,
|
|
570
|
+
) -> None: ...
|
|
571
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
572
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
573
|
+
|
|
574
|
+
TITLE_FIELD_NUMBER: builtins.int
|
|
575
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
576
|
+
TERMS_OF_SERVICE_FIELD_NUMBER: builtins.int
|
|
577
|
+
CONTACT_FIELD_NUMBER: builtins.int
|
|
578
|
+
LICENSE_FIELD_NUMBER: builtins.int
|
|
579
|
+
VERSION_FIELD_NUMBER: builtins.int
|
|
580
|
+
EXTENSIONS_FIELD_NUMBER: builtins.int
|
|
581
|
+
title: builtins.str
|
|
582
|
+
"""The title of the application."""
|
|
583
|
+
description: builtins.str
|
|
584
|
+
"""A short description of the application. GFM syntax can be used for rich
|
|
585
|
+
text representation.
|
|
586
|
+
"""
|
|
587
|
+
terms_of_service: builtins.str
|
|
588
|
+
"""The Terms of Service for the API."""
|
|
589
|
+
version: builtins.str
|
|
590
|
+
"""Provides the version of the application API (not to be confused
|
|
591
|
+
with the specification version).
|
|
592
|
+
"""
|
|
593
|
+
@property
|
|
594
|
+
def contact(self) -> global___Contact:
|
|
595
|
+
"""The contact information for the exposed API."""
|
|
596
|
+
|
|
597
|
+
@property
|
|
598
|
+
def license(self) -> global___License:
|
|
599
|
+
"""The license information for the exposed API."""
|
|
600
|
+
|
|
601
|
+
@property
|
|
602
|
+
def extensions(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.struct_pb2.Value]: ...
|
|
603
|
+
def __init__(
|
|
604
|
+
self,
|
|
605
|
+
*,
|
|
606
|
+
title: builtins.str = ...,
|
|
607
|
+
description: builtins.str = ...,
|
|
608
|
+
terms_of_service: builtins.str = ...,
|
|
609
|
+
contact: global___Contact | None = ...,
|
|
610
|
+
license: global___License | None = ...,
|
|
611
|
+
version: builtins.str = ...,
|
|
612
|
+
extensions: collections.abc.Mapping[builtins.str, google.protobuf.struct_pb2.Value] | None = ...,
|
|
613
|
+
) -> None: ...
|
|
614
|
+
def HasField(self, field_name: typing.Literal["contact", b"contact", "license", b"license"]) -> builtins.bool: ...
|
|
615
|
+
def ClearField(self, field_name: typing.Literal["contact", b"contact", "description", b"description", "extensions", b"extensions", "license", b"license", "terms_of_service", b"terms_of_service", "title", b"title", "version", b"version"]) -> None: ...
|
|
616
|
+
|
|
617
|
+
global___Info = Info
|
|
618
|
+
|
|
619
|
+
@typing.final
|
|
620
|
+
class Contact(google.protobuf.message.Message):
|
|
621
|
+
"""`Contact` is a representation of OpenAPI v2 specification's Contact object.
|
|
622
|
+
|
|
623
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
|
|
624
|
+
|
|
625
|
+
Example:
|
|
626
|
+
|
|
627
|
+
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
|
|
628
|
+
info: {
|
|
629
|
+
...
|
|
630
|
+
contact: {
|
|
631
|
+
name: "gRPC-Gateway project";
|
|
632
|
+
url: "https://github.com/grpc-ecosystem/grpc-gateway";
|
|
633
|
+
email: "none@example.com";
|
|
634
|
+
};
|
|
635
|
+
...
|
|
636
|
+
};
|
|
637
|
+
...
|
|
638
|
+
};
|
|
639
|
+
"""
|
|
640
|
+
|
|
641
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
642
|
+
|
|
643
|
+
NAME_FIELD_NUMBER: builtins.int
|
|
644
|
+
URL_FIELD_NUMBER: builtins.int
|
|
645
|
+
EMAIL_FIELD_NUMBER: builtins.int
|
|
646
|
+
name: builtins.str
|
|
647
|
+
"""The identifying name of the contact person/organization."""
|
|
648
|
+
url: builtins.str
|
|
649
|
+
"""The URL pointing to the contact information. MUST be in the format of a
|
|
650
|
+
URL.
|
|
651
|
+
"""
|
|
652
|
+
email: builtins.str
|
|
653
|
+
"""The email address of the contact person/organization. MUST be in the format
|
|
654
|
+
of an email address.
|
|
655
|
+
"""
|
|
656
|
+
def __init__(
|
|
657
|
+
self,
|
|
658
|
+
*,
|
|
659
|
+
name: builtins.str = ...,
|
|
660
|
+
url: builtins.str = ...,
|
|
661
|
+
email: builtins.str = ...,
|
|
662
|
+
) -> None: ...
|
|
663
|
+
def ClearField(self, field_name: typing.Literal["email", b"email", "name", b"name", "url", b"url"]) -> None: ...
|
|
664
|
+
|
|
665
|
+
global___Contact = Contact
|
|
666
|
+
|
|
667
|
+
@typing.final
|
|
668
|
+
class License(google.protobuf.message.Message):
|
|
669
|
+
"""`License` is a representation of OpenAPI v2 specification's License object.
|
|
670
|
+
|
|
671
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
|
|
672
|
+
|
|
673
|
+
Example:
|
|
674
|
+
|
|
675
|
+
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
|
|
676
|
+
info: {
|
|
677
|
+
...
|
|
678
|
+
license: {
|
|
679
|
+
name: "BSD 3-Clause License";
|
|
680
|
+
url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
|
|
681
|
+
};
|
|
682
|
+
...
|
|
683
|
+
};
|
|
684
|
+
...
|
|
685
|
+
};
|
|
686
|
+
"""
|
|
687
|
+
|
|
688
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
689
|
+
|
|
690
|
+
NAME_FIELD_NUMBER: builtins.int
|
|
691
|
+
URL_FIELD_NUMBER: builtins.int
|
|
692
|
+
name: builtins.str
|
|
693
|
+
"""The license name used for the API."""
|
|
694
|
+
url: builtins.str
|
|
695
|
+
"""A URL to the license used for the API. MUST be in the format of a URL."""
|
|
696
|
+
def __init__(
|
|
697
|
+
self,
|
|
698
|
+
*,
|
|
699
|
+
name: builtins.str = ...,
|
|
700
|
+
url: builtins.str = ...,
|
|
701
|
+
) -> None: ...
|
|
702
|
+
def ClearField(self, field_name: typing.Literal["name", b"name", "url", b"url"]) -> None: ...
|
|
703
|
+
|
|
704
|
+
global___License = License
|
|
705
|
+
|
|
706
|
+
@typing.final
|
|
707
|
+
class ExternalDocumentation(google.protobuf.message.Message):
|
|
708
|
+
"""`ExternalDocumentation` is a representation of OpenAPI v2 specification's
|
|
709
|
+
ExternalDocumentation object.
|
|
710
|
+
|
|
711
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
|
|
712
|
+
|
|
713
|
+
Example:
|
|
714
|
+
|
|
715
|
+
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
|
|
716
|
+
...
|
|
717
|
+
external_docs: {
|
|
718
|
+
description: "More about gRPC-Gateway";
|
|
719
|
+
url: "https://github.com/grpc-ecosystem/grpc-gateway";
|
|
720
|
+
}
|
|
721
|
+
...
|
|
722
|
+
};
|
|
723
|
+
"""
|
|
724
|
+
|
|
725
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
726
|
+
|
|
727
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
728
|
+
URL_FIELD_NUMBER: builtins.int
|
|
729
|
+
description: builtins.str
|
|
730
|
+
"""A short description of the target documentation. GFM syntax can be used for
|
|
731
|
+
rich text representation.
|
|
732
|
+
"""
|
|
733
|
+
url: builtins.str
|
|
734
|
+
"""The URL for the target documentation. Value MUST be in the format
|
|
735
|
+
of a URL.
|
|
736
|
+
"""
|
|
737
|
+
def __init__(
|
|
738
|
+
self,
|
|
739
|
+
*,
|
|
740
|
+
description: builtins.str = ...,
|
|
741
|
+
url: builtins.str = ...,
|
|
742
|
+
) -> None: ...
|
|
743
|
+
def ClearField(self, field_name: typing.Literal["description", b"description", "url", b"url"]) -> None: ...
|
|
744
|
+
|
|
745
|
+
global___ExternalDocumentation = ExternalDocumentation
|
|
746
|
+
|
|
747
|
+
@typing.final
|
|
748
|
+
class Schema(google.protobuf.message.Message):
|
|
749
|
+
"""`Schema` is a representation of OpenAPI v2 specification's Schema object.
|
|
750
|
+
|
|
751
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
|
|
752
|
+
"""
|
|
753
|
+
|
|
754
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
755
|
+
|
|
756
|
+
JSON_SCHEMA_FIELD_NUMBER: builtins.int
|
|
757
|
+
DISCRIMINATOR_FIELD_NUMBER: builtins.int
|
|
758
|
+
READ_ONLY_FIELD_NUMBER: builtins.int
|
|
759
|
+
EXTERNAL_DOCS_FIELD_NUMBER: builtins.int
|
|
760
|
+
EXAMPLE_FIELD_NUMBER: builtins.int
|
|
761
|
+
EXAMPLE_STRING_FIELD_NUMBER: builtins.int
|
|
762
|
+
discriminator: builtins.str
|
|
763
|
+
"""Adds support for polymorphism. The discriminator is the schema property
|
|
764
|
+
name that is used to differentiate between other schema that inherit this
|
|
765
|
+
schema. The property name used MUST be defined at this schema and it MUST
|
|
766
|
+
be in the required property list. When used, the value MUST be the name of
|
|
767
|
+
this schema or any schema that inherits it.
|
|
768
|
+
"""
|
|
769
|
+
read_only: builtins.bool
|
|
770
|
+
"""Relevant only for Schema "properties" definitions. Declares the property as
|
|
771
|
+
"read only". This means that it MAY be sent as part of a response but MUST
|
|
772
|
+
NOT be sent as part of the request. Properties marked as readOnly being
|
|
773
|
+
true SHOULD NOT be in the required list of the defined schema. Default
|
|
774
|
+
value is false.
|
|
775
|
+
"""
|
|
776
|
+
example_string: builtins.str
|
|
777
|
+
"""A free-form property to include a JSON example of this field. This is copied
|
|
778
|
+
verbatim to the output swagger.json. Quotes must be escaped.
|
|
779
|
+
"""
|
|
780
|
+
@property
|
|
781
|
+
def json_schema(self) -> global___JSONSchema: ...
|
|
782
|
+
@property
|
|
783
|
+
def external_docs(self) -> global___ExternalDocumentation:
|
|
784
|
+
"""Additional external documentation for this schema."""
|
|
785
|
+
|
|
786
|
+
@property
|
|
787
|
+
def example(self) -> google.protobuf.any_pb2.Any:
|
|
788
|
+
"""A free-form property to include an example of an instance for this schema.
|
|
789
|
+
Deprecated, please use example_string instead.
|
|
790
|
+
"""
|
|
791
|
+
|
|
792
|
+
def __init__(
|
|
793
|
+
self,
|
|
794
|
+
*,
|
|
795
|
+
json_schema: global___JSONSchema | None = ...,
|
|
796
|
+
discriminator: builtins.str = ...,
|
|
797
|
+
read_only: builtins.bool = ...,
|
|
798
|
+
external_docs: global___ExternalDocumentation | None = ...,
|
|
799
|
+
example: google.protobuf.any_pb2.Any | None = ...,
|
|
800
|
+
example_string: builtins.str = ...,
|
|
801
|
+
) -> None: ...
|
|
802
|
+
def HasField(self, field_name: typing.Literal["example", b"example", "external_docs", b"external_docs", "json_schema", b"json_schema"]) -> builtins.bool: ...
|
|
803
|
+
def ClearField(self, field_name: typing.Literal["discriminator", b"discriminator", "example", b"example", "example_string", b"example_string", "external_docs", b"external_docs", "json_schema", b"json_schema", "read_only", b"read_only"]) -> None: ...
|
|
804
|
+
|
|
805
|
+
global___Schema = Schema
|
|
806
|
+
|
|
807
|
+
@typing.final
|
|
808
|
+
class JSONSchema(google.protobuf.message.Message):
|
|
809
|
+
"""`JSONSchema` represents properties from JSON Schema taken, and as used, in
|
|
810
|
+
the OpenAPI v2 spec.
|
|
811
|
+
|
|
812
|
+
This includes changes made by OpenAPI v2.
|
|
813
|
+
|
|
814
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
|
|
815
|
+
|
|
816
|
+
See also: https://cswr.github.io/JsonSchema/spec/basic_types/,
|
|
817
|
+
https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
|
|
818
|
+
|
|
819
|
+
Example:
|
|
820
|
+
|
|
821
|
+
message SimpleMessage {
|
|
822
|
+
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_schema) = {
|
|
823
|
+
json_schema: {
|
|
824
|
+
title: "SimpleMessage"
|
|
825
|
+
description: "A simple message."
|
|
826
|
+
required: ["id"]
|
|
827
|
+
}
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
// Id represents the message identifier.
|
|
831
|
+
string id = 1; [
|
|
832
|
+
(grpc.gateway.protoc_gen_swagger.options.openapiv2_field) = {
|
|
833
|
+
{description: "The unique identifier of the simple message."
|
|
834
|
+
}];
|
|
835
|
+
}
|
|
836
|
+
"""
|
|
837
|
+
|
|
838
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
839
|
+
|
|
840
|
+
class _JSONSchemaSimpleTypes:
|
|
841
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
842
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
843
|
+
|
|
844
|
+
class _JSONSchemaSimpleTypesEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[JSONSchema._JSONSchemaSimpleTypes.ValueType], builtins.type):
|
|
845
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
846
|
+
UNKNOWN: JSONSchema._JSONSchemaSimpleTypes.ValueType # 0
|
|
847
|
+
ARRAY: JSONSchema._JSONSchemaSimpleTypes.ValueType # 1
|
|
848
|
+
BOOLEAN: JSONSchema._JSONSchemaSimpleTypes.ValueType # 2
|
|
849
|
+
INTEGER: JSONSchema._JSONSchemaSimpleTypes.ValueType # 3
|
|
850
|
+
NULL: JSONSchema._JSONSchemaSimpleTypes.ValueType # 4
|
|
851
|
+
NUMBER: JSONSchema._JSONSchemaSimpleTypes.ValueType # 5
|
|
852
|
+
OBJECT: JSONSchema._JSONSchemaSimpleTypes.ValueType # 6
|
|
853
|
+
STRING: JSONSchema._JSONSchemaSimpleTypes.ValueType # 7
|
|
854
|
+
|
|
855
|
+
class JSONSchemaSimpleTypes(_JSONSchemaSimpleTypes, metaclass=_JSONSchemaSimpleTypesEnumTypeWrapper): ...
|
|
856
|
+
UNKNOWN: JSONSchema.JSONSchemaSimpleTypes.ValueType # 0
|
|
857
|
+
ARRAY: JSONSchema.JSONSchemaSimpleTypes.ValueType # 1
|
|
858
|
+
BOOLEAN: JSONSchema.JSONSchemaSimpleTypes.ValueType # 2
|
|
859
|
+
INTEGER: JSONSchema.JSONSchemaSimpleTypes.ValueType # 3
|
|
860
|
+
NULL: JSONSchema.JSONSchemaSimpleTypes.ValueType # 4
|
|
861
|
+
NUMBER: JSONSchema.JSONSchemaSimpleTypes.ValueType # 5
|
|
862
|
+
OBJECT: JSONSchema.JSONSchemaSimpleTypes.ValueType # 6
|
|
863
|
+
STRING: JSONSchema.JSONSchemaSimpleTypes.ValueType # 7
|
|
864
|
+
|
|
865
|
+
REF_FIELD_NUMBER: builtins.int
|
|
866
|
+
TITLE_FIELD_NUMBER: builtins.int
|
|
867
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
868
|
+
DEFAULT_FIELD_NUMBER: builtins.int
|
|
869
|
+
READ_ONLY_FIELD_NUMBER: builtins.int
|
|
870
|
+
EXAMPLE_FIELD_NUMBER: builtins.int
|
|
871
|
+
MULTIPLE_OF_FIELD_NUMBER: builtins.int
|
|
872
|
+
MAXIMUM_FIELD_NUMBER: builtins.int
|
|
873
|
+
EXCLUSIVE_MAXIMUM_FIELD_NUMBER: builtins.int
|
|
874
|
+
MINIMUM_FIELD_NUMBER: builtins.int
|
|
875
|
+
EXCLUSIVE_MINIMUM_FIELD_NUMBER: builtins.int
|
|
876
|
+
MAX_LENGTH_FIELD_NUMBER: builtins.int
|
|
877
|
+
MIN_LENGTH_FIELD_NUMBER: builtins.int
|
|
878
|
+
PATTERN_FIELD_NUMBER: builtins.int
|
|
879
|
+
MAX_ITEMS_FIELD_NUMBER: builtins.int
|
|
880
|
+
MIN_ITEMS_FIELD_NUMBER: builtins.int
|
|
881
|
+
UNIQUE_ITEMS_FIELD_NUMBER: builtins.int
|
|
882
|
+
MAX_PROPERTIES_FIELD_NUMBER: builtins.int
|
|
883
|
+
MIN_PROPERTIES_FIELD_NUMBER: builtins.int
|
|
884
|
+
REQUIRED_FIELD_NUMBER: builtins.int
|
|
885
|
+
ARRAY_FIELD_NUMBER: builtins.int
|
|
886
|
+
TYPE_FIELD_NUMBER: builtins.int
|
|
887
|
+
FORMAT_FIELD_NUMBER: builtins.int
|
|
888
|
+
ENUM_FIELD_NUMBER: builtins.int
|
|
889
|
+
ref: builtins.str
|
|
890
|
+
"""Ref is used to define an external reference to include in the message.
|
|
891
|
+
This could be a fully qualified proto message reference, and that type must
|
|
892
|
+
be imported into the protofile. If no message is identified, the Ref will
|
|
893
|
+
be used verbatim in the output.
|
|
894
|
+
For example:
|
|
895
|
+
`ref: ".google.protobuf.Timestamp"`.
|
|
896
|
+
"""
|
|
897
|
+
title: builtins.str
|
|
898
|
+
"""The title of the schema."""
|
|
899
|
+
description: builtins.str
|
|
900
|
+
"""A short description of the schema."""
|
|
901
|
+
default: builtins.str
|
|
902
|
+
read_only: builtins.bool
|
|
903
|
+
example: builtins.str
|
|
904
|
+
"""A free-form property to include a JSON example of this field. This is copied
|
|
905
|
+
verbatim to the output swagger.json. Quotes must be escaped.
|
|
906
|
+
This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
|
|
907
|
+
"""
|
|
908
|
+
multiple_of: builtins.float
|
|
909
|
+
maximum: builtins.float
|
|
910
|
+
"""Maximum represents an inclusive upper limit for a numeric instance. The
|
|
911
|
+
value of MUST be a number,
|
|
912
|
+
"""
|
|
913
|
+
exclusive_maximum: builtins.bool
|
|
914
|
+
minimum: builtins.float
|
|
915
|
+
"""minimum represents an inclusive lower limit for a numeric instance. The
|
|
916
|
+
value of MUST be a number,
|
|
917
|
+
"""
|
|
918
|
+
exclusive_minimum: builtins.bool
|
|
919
|
+
max_length: builtins.int
|
|
920
|
+
min_length: builtins.int
|
|
921
|
+
pattern: builtins.str
|
|
922
|
+
max_items: builtins.int
|
|
923
|
+
min_items: builtins.int
|
|
924
|
+
unique_items: builtins.bool
|
|
925
|
+
max_properties: builtins.int
|
|
926
|
+
min_properties: builtins.int
|
|
927
|
+
format: builtins.str
|
|
928
|
+
"""`Format`"""
|
|
929
|
+
@property
|
|
930
|
+
def required(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
|
|
931
|
+
@property
|
|
932
|
+
def array(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
933
|
+
"""Items in 'array' must be unique."""
|
|
934
|
+
|
|
935
|
+
@property
|
|
936
|
+
def type(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___JSONSchema.JSONSchemaSimpleTypes.ValueType]: ...
|
|
937
|
+
@property
|
|
938
|
+
def enum(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
939
|
+
"""Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1"""
|
|
940
|
+
|
|
941
|
+
def __init__(
|
|
942
|
+
self,
|
|
943
|
+
*,
|
|
944
|
+
ref: builtins.str = ...,
|
|
945
|
+
title: builtins.str = ...,
|
|
946
|
+
description: builtins.str = ...,
|
|
947
|
+
default: builtins.str = ...,
|
|
948
|
+
read_only: builtins.bool = ...,
|
|
949
|
+
example: builtins.str = ...,
|
|
950
|
+
multiple_of: builtins.float = ...,
|
|
951
|
+
maximum: builtins.float = ...,
|
|
952
|
+
exclusive_maximum: builtins.bool = ...,
|
|
953
|
+
minimum: builtins.float = ...,
|
|
954
|
+
exclusive_minimum: builtins.bool = ...,
|
|
955
|
+
max_length: builtins.int = ...,
|
|
956
|
+
min_length: builtins.int = ...,
|
|
957
|
+
pattern: builtins.str = ...,
|
|
958
|
+
max_items: builtins.int = ...,
|
|
959
|
+
min_items: builtins.int = ...,
|
|
960
|
+
unique_items: builtins.bool = ...,
|
|
961
|
+
max_properties: builtins.int = ...,
|
|
962
|
+
min_properties: builtins.int = ...,
|
|
963
|
+
required: collections.abc.Iterable[builtins.str] | None = ...,
|
|
964
|
+
array: collections.abc.Iterable[builtins.str] | None = ...,
|
|
965
|
+
type: collections.abc.Iterable[global___JSONSchema.JSONSchemaSimpleTypes.ValueType] | None = ...,
|
|
966
|
+
format: builtins.str = ...,
|
|
967
|
+
enum: collections.abc.Iterable[builtins.str] | None = ...,
|
|
968
|
+
) -> None: ...
|
|
969
|
+
def ClearField(self, field_name: typing.Literal["array", b"array", "default", b"default", "description", b"description", "enum", b"enum", "example", b"example", "exclusive_maximum", b"exclusive_maximum", "exclusive_minimum", b"exclusive_minimum", "format", b"format", "max_items", b"max_items", "max_length", b"max_length", "max_properties", b"max_properties", "maximum", b"maximum", "min_items", b"min_items", "min_length", b"min_length", "min_properties", b"min_properties", "minimum", b"minimum", "multiple_of", b"multiple_of", "pattern", b"pattern", "read_only", b"read_only", "ref", b"ref", "required", b"required", "title", b"title", "type", b"type", "unique_items", b"unique_items"]) -> None: ...
|
|
970
|
+
|
|
971
|
+
global___JSONSchema = JSONSchema
|
|
972
|
+
|
|
973
|
+
@typing.final
|
|
974
|
+
class Tag(google.protobuf.message.Message):
|
|
975
|
+
"""`Tag` is a representation of OpenAPI v2 specification's Tag object.
|
|
976
|
+
|
|
977
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
|
|
978
|
+
"""
|
|
979
|
+
|
|
980
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
981
|
+
|
|
982
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
983
|
+
EXTERNAL_DOCS_FIELD_NUMBER: builtins.int
|
|
984
|
+
description: builtins.str
|
|
985
|
+
"""A short description for the tag. GFM syntax can be used for rich text
|
|
986
|
+
representation.
|
|
987
|
+
"""
|
|
988
|
+
@property
|
|
989
|
+
def external_docs(self) -> global___ExternalDocumentation:
|
|
990
|
+
"""Additional external documentation for this tag."""
|
|
991
|
+
|
|
992
|
+
def __init__(
|
|
993
|
+
self,
|
|
994
|
+
*,
|
|
995
|
+
description: builtins.str = ...,
|
|
996
|
+
external_docs: global___ExternalDocumentation | None = ...,
|
|
997
|
+
) -> None: ...
|
|
998
|
+
def HasField(self, field_name: typing.Literal["external_docs", b"external_docs"]) -> builtins.bool: ...
|
|
999
|
+
def ClearField(self, field_name: typing.Literal["description", b"description", "external_docs", b"external_docs"]) -> None: ...
|
|
1000
|
+
|
|
1001
|
+
global___Tag = Tag
|
|
1002
|
+
|
|
1003
|
+
@typing.final
|
|
1004
|
+
class SecurityDefinitions(google.protobuf.message.Message):
|
|
1005
|
+
"""`SecurityDefinitions` is a representation of OpenAPI v2 specification's
|
|
1006
|
+
Security Definitions object.
|
|
1007
|
+
|
|
1008
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
|
|
1009
|
+
|
|
1010
|
+
A declaration of the security schemes available to be used in the
|
|
1011
|
+
specification. This does not enforce the security schemes on the operations
|
|
1012
|
+
and only serves to provide the relevant details for each scheme.
|
|
1013
|
+
"""
|
|
1014
|
+
|
|
1015
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1016
|
+
|
|
1017
|
+
@typing.final
|
|
1018
|
+
class SecurityEntry(google.protobuf.message.Message):
|
|
1019
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1020
|
+
|
|
1021
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
1022
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
1023
|
+
key: builtins.str
|
|
1024
|
+
@property
|
|
1025
|
+
def value(self) -> global___SecurityScheme: ...
|
|
1026
|
+
def __init__(
|
|
1027
|
+
self,
|
|
1028
|
+
*,
|
|
1029
|
+
key: builtins.str = ...,
|
|
1030
|
+
value: global___SecurityScheme | None = ...,
|
|
1031
|
+
) -> None: ...
|
|
1032
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
1033
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
1034
|
+
|
|
1035
|
+
SECURITY_FIELD_NUMBER: builtins.int
|
|
1036
|
+
@property
|
|
1037
|
+
def security(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___SecurityScheme]:
|
|
1038
|
+
"""A single security scheme definition, mapping a "name" to the scheme it
|
|
1039
|
+
defines.
|
|
1040
|
+
"""
|
|
1041
|
+
|
|
1042
|
+
def __init__(
|
|
1043
|
+
self,
|
|
1044
|
+
*,
|
|
1045
|
+
security: collections.abc.Mapping[builtins.str, global___SecurityScheme] | None = ...,
|
|
1046
|
+
) -> None: ...
|
|
1047
|
+
def ClearField(self, field_name: typing.Literal["security", b"security"]) -> None: ...
|
|
1048
|
+
|
|
1049
|
+
global___SecurityDefinitions = SecurityDefinitions
|
|
1050
|
+
|
|
1051
|
+
@typing.final
|
|
1052
|
+
class SecurityScheme(google.protobuf.message.Message):
|
|
1053
|
+
"""`SecurityScheme` is a representation of OpenAPI v2 specification's
|
|
1054
|
+
Security Scheme object.
|
|
1055
|
+
|
|
1056
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject
|
|
1057
|
+
|
|
1058
|
+
Allows the definition of a security scheme that can be used by the
|
|
1059
|
+
operations. Supported schemes are basic authentication, an API key (either as
|
|
1060
|
+
a header or as a query parameter) and OAuth2's common flows (implicit,
|
|
1061
|
+
password, application and access code).
|
|
1062
|
+
"""
|
|
1063
|
+
|
|
1064
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1065
|
+
|
|
1066
|
+
class _Type:
|
|
1067
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
1068
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
1069
|
+
|
|
1070
|
+
class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[SecurityScheme._Type.ValueType], builtins.type):
|
|
1071
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
1072
|
+
TYPE_INVALID: SecurityScheme._Type.ValueType # 0
|
|
1073
|
+
TYPE_BASIC: SecurityScheme._Type.ValueType # 1
|
|
1074
|
+
TYPE_API_KEY: SecurityScheme._Type.ValueType # 2
|
|
1075
|
+
TYPE_OAUTH2: SecurityScheme._Type.ValueType # 3
|
|
1076
|
+
|
|
1077
|
+
class Type(_Type, metaclass=_TypeEnumTypeWrapper):
|
|
1078
|
+
"""The type of the security scheme. Valid values are "basic",
|
|
1079
|
+
"apiKey" or "oauth2".
|
|
1080
|
+
"""
|
|
1081
|
+
|
|
1082
|
+
TYPE_INVALID: SecurityScheme.Type.ValueType # 0
|
|
1083
|
+
TYPE_BASIC: SecurityScheme.Type.ValueType # 1
|
|
1084
|
+
TYPE_API_KEY: SecurityScheme.Type.ValueType # 2
|
|
1085
|
+
TYPE_OAUTH2: SecurityScheme.Type.ValueType # 3
|
|
1086
|
+
|
|
1087
|
+
class _In:
|
|
1088
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
1089
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
1090
|
+
|
|
1091
|
+
class _InEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[SecurityScheme._In.ValueType], builtins.type):
|
|
1092
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
1093
|
+
IN_INVALID: SecurityScheme._In.ValueType # 0
|
|
1094
|
+
IN_QUERY: SecurityScheme._In.ValueType # 1
|
|
1095
|
+
IN_HEADER: SecurityScheme._In.ValueType # 2
|
|
1096
|
+
|
|
1097
|
+
class In(_In, metaclass=_InEnumTypeWrapper):
|
|
1098
|
+
"""The location of the API key. Valid values are "query" or "header"."""
|
|
1099
|
+
|
|
1100
|
+
IN_INVALID: SecurityScheme.In.ValueType # 0
|
|
1101
|
+
IN_QUERY: SecurityScheme.In.ValueType # 1
|
|
1102
|
+
IN_HEADER: SecurityScheme.In.ValueType # 2
|
|
1103
|
+
|
|
1104
|
+
class _Flow:
|
|
1105
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
1106
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
1107
|
+
|
|
1108
|
+
class _FlowEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[SecurityScheme._Flow.ValueType], builtins.type):
|
|
1109
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
1110
|
+
FLOW_INVALID: SecurityScheme._Flow.ValueType # 0
|
|
1111
|
+
FLOW_IMPLICIT: SecurityScheme._Flow.ValueType # 1
|
|
1112
|
+
FLOW_PASSWORD: SecurityScheme._Flow.ValueType # 2
|
|
1113
|
+
FLOW_APPLICATION: SecurityScheme._Flow.ValueType # 3
|
|
1114
|
+
FLOW_ACCESS_CODE: SecurityScheme._Flow.ValueType # 4
|
|
1115
|
+
|
|
1116
|
+
class Flow(_Flow, metaclass=_FlowEnumTypeWrapper):
|
|
1117
|
+
"""The flow used by the OAuth2 security scheme. Valid values are
|
|
1118
|
+
"implicit", "password", "application" or "accessCode".
|
|
1119
|
+
"""
|
|
1120
|
+
|
|
1121
|
+
FLOW_INVALID: SecurityScheme.Flow.ValueType # 0
|
|
1122
|
+
FLOW_IMPLICIT: SecurityScheme.Flow.ValueType # 1
|
|
1123
|
+
FLOW_PASSWORD: SecurityScheme.Flow.ValueType # 2
|
|
1124
|
+
FLOW_APPLICATION: SecurityScheme.Flow.ValueType # 3
|
|
1125
|
+
FLOW_ACCESS_CODE: SecurityScheme.Flow.ValueType # 4
|
|
1126
|
+
|
|
1127
|
+
@typing.final
|
|
1128
|
+
class ExtensionsEntry(google.protobuf.message.Message):
|
|
1129
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1130
|
+
|
|
1131
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
1132
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
1133
|
+
key: builtins.str
|
|
1134
|
+
@property
|
|
1135
|
+
def value(self) -> google.protobuf.struct_pb2.Value: ...
|
|
1136
|
+
def __init__(
|
|
1137
|
+
self,
|
|
1138
|
+
*,
|
|
1139
|
+
key: builtins.str = ...,
|
|
1140
|
+
value: google.protobuf.struct_pb2.Value | None = ...,
|
|
1141
|
+
) -> None: ...
|
|
1142
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
1143
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
1144
|
+
|
|
1145
|
+
TYPE_FIELD_NUMBER: builtins.int
|
|
1146
|
+
DESCRIPTION_FIELD_NUMBER: builtins.int
|
|
1147
|
+
NAME_FIELD_NUMBER: builtins.int
|
|
1148
|
+
IN_FIELD_NUMBER: builtins.int
|
|
1149
|
+
FLOW_FIELD_NUMBER: builtins.int
|
|
1150
|
+
AUTHORIZATION_URL_FIELD_NUMBER: builtins.int
|
|
1151
|
+
TOKEN_URL_FIELD_NUMBER: builtins.int
|
|
1152
|
+
SCOPES_FIELD_NUMBER: builtins.int
|
|
1153
|
+
EXTENSIONS_FIELD_NUMBER: builtins.int
|
|
1154
|
+
type: global___SecurityScheme.Type.ValueType
|
|
1155
|
+
"""The type of the security scheme. Valid values are "basic",
|
|
1156
|
+
"apiKey" or "oauth2".
|
|
1157
|
+
"""
|
|
1158
|
+
description: builtins.str
|
|
1159
|
+
"""A short description for security scheme."""
|
|
1160
|
+
name: builtins.str
|
|
1161
|
+
"""The name of the header or query parameter to be used.
|
|
1162
|
+
Valid for apiKey.
|
|
1163
|
+
"""
|
|
1164
|
+
flow: global___SecurityScheme.Flow.ValueType
|
|
1165
|
+
"""The flow used by the OAuth2 security scheme. Valid values are
|
|
1166
|
+
"implicit", "password", "application" or "accessCode".
|
|
1167
|
+
Valid for oauth2.
|
|
1168
|
+
"""
|
|
1169
|
+
authorization_url: builtins.str
|
|
1170
|
+
"""The authorization URL to be used for this flow. This SHOULD be in
|
|
1171
|
+
the form of a URL.
|
|
1172
|
+
Valid for oauth2/implicit and oauth2/accessCode.
|
|
1173
|
+
"""
|
|
1174
|
+
token_url: builtins.str
|
|
1175
|
+
"""The token URL to be used for this flow. This SHOULD be in the
|
|
1176
|
+
form of a URL.
|
|
1177
|
+
Valid for oauth2/password, oauth2/application and oauth2/accessCode.
|
|
1178
|
+
"""
|
|
1179
|
+
@property
|
|
1180
|
+
def scopes(self) -> global___Scopes:
|
|
1181
|
+
"""The available scopes for the OAuth2 security scheme.
|
|
1182
|
+
Valid for oauth2.
|
|
1183
|
+
"""
|
|
1184
|
+
|
|
1185
|
+
@property
|
|
1186
|
+
def extensions(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, google.protobuf.struct_pb2.Value]: ...
|
|
1187
|
+
def __init__(
|
|
1188
|
+
self,
|
|
1189
|
+
*,
|
|
1190
|
+
type: global___SecurityScheme.Type.ValueType = ...,
|
|
1191
|
+
description: builtins.str = ...,
|
|
1192
|
+
name: builtins.str = ...,
|
|
1193
|
+
flow: global___SecurityScheme.Flow.ValueType = ...,
|
|
1194
|
+
authorization_url: builtins.str = ...,
|
|
1195
|
+
token_url: builtins.str = ...,
|
|
1196
|
+
scopes: global___Scopes | None = ...,
|
|
1197
|
+
extensions: collections.abc.Mapping[builtins.str, google.protobuf.struct_pb2.Value] | None = ...,
|
|
1198
|
+
) -> None: ...
|
|
1199
|
+
def HasField(self, field_name: typing.Literal["scopes", b"scopes"]) -> builtins.bool: ...
|
|
1200
|
+
def ClearField(self, field_name: typing.Literal["authorization_url", b"authorization_url", "description", b"description", "extensions", b"extensions", "flow", b"flow", "in", b"in", "name", b"name", "scopes", b"scopes", "token_url", b"token_url", "type", b"type"]) -> None: ...
|
|
1201
|
+
|
|
1202
|
+
global___SecurityScheme = SecurityScheme
|
|
1203
|
+
|
|
1204
|
+
@typing.final
|
|
1205
|
+
class SecurityRequirement(google.protobuf.message.Message):
|
|
1206
|
+
"""`SecurityRequirement` is a representation of OpenAPI v2 specification's
|
|
1207
|
+
Security Requirement object.
|
|
1208
|
+
|
|
1209
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject
|
|
1210
|
+
|
|
1211
|
+
Lists the required security schemes to execute this operation. The object can
|
|
1212
|
+
have multiple security schemes declared in it which are all required (that
|
|
1213
|
+
is, there is a logical AND between the schemes).
|
|
1214
|
+
|
|
1215
|
+
The name used for each property MUST correspond to a security scheme
|
|
1216
|
+
declared in the Security Definitions.
|
|
1217
|
+
"""
|
|
1218
|
+
|
|
1219
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1220
|
+
|
|
1221
|
+
@typing.final
|
|
1222
|
+
class SecurityRequirementValue(google.protobuf.message.Message):
|
|
1223
|
+
"""If the security scheme is of type "oauth2", then the value is a list of
|
|
1224
|
+
scope names required for the execution. For other security scheme types,
|
|
1225
|
+
the array MUST be empty.
|
|
1226
|
+
"""
|
|
1227
|
+
|
|
1228
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1229
|
+
|
|
1230
|
+
SCOPE_FIELD_NUMBER: builtins.int
|
|
1231
|
+
@property
|
|
1232
|
+
def scope(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
|
|
1233
|
+
def __init__(
|
|
1234
|
+
self,
|
|
1235
|
+
*,
|
|
1236
|
+
scope: collections.abc.Iterable[builtins.str] | None = ...,
|
|
1237
|
+
) -> None: ...
|
|
1238
|
+
def ClearField(self, field_name: typing.Literal["scope", b"scope"]) -> None: ...
|
|
1239
|
+
|
|
1240
|
+
@typing.final
|
|
1241
|
+
class SecurityRequirementEntry(google.protobuf.message.Message):
|
|
1242
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1243
|
+
|
|
1244
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
1245
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
1246
|
+
key: builtins.str
|
|
1247
|
+
@property
|
|
1248
|
+
def value(self) -> global___SecurityRequirement.SecurityRequirementValue: ...
|
|
1249
|
+
def __init__(
|
|
1250
|
+
self,
|
|
1251
|
+
*,
|
|
1252
|
+
key: builtins.str = ...,
|
|
1253
|
+
value: global___SecurityRequirement.SecurityRequirementValue | None = ...,
|
|
1254
|
+
) -> None: ...
|
|
1255
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
1256
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
1257
|
+
|
|
1258
|
+
SECURITY_REQUIREMENT_FIELD_NUMBER: builtins.int
|
|
1259
|
+
@property
|
|
1260
|
+
def security_requirement(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___SecurityRequirement.SecurityRequirementValue]:
|
|
1261
|
+
"""Each name must correspond to a security scheme which is declared in
|
|
1262
|
+
the Security Definitions. If the security scheme is of type "oauth2",
|
|
1263
|
+
then the value is a list of scope names required for the execution.
|
|
1264
|
+
For other security scheme types, the array MUST be empty.
|
|
1265
|
+
"""
|
|
1266
|
+
|
|
1267
|
+
def __init__(
|
|
1268
|
+
self,
|
|
1269
|
+
*,
|
|
1270
|
+
security_requirement: collections.abc.Mapping[builtins.str, global___SecurityRequirement.SecurityRequirementValue] | None = ...,
|
|
1271
|
+
) -> None: ...
|
|
1272
|
+
def ClearField(self, field_name: typing.Literal["security_requirement", b"security_requirement"]) -> None: ...
|
|
1273
|
+
|
|
1274
|
+
global___SecurityRequirement = SecurityRequirement
|
|
1275
|
+
|
|
1276
|
+
@typing.final
|
|
1277
|
+
class Scopes(google.protobuf.message.Message):
|
|
1278
|
+
"""`Scopes` is a representation of OpenAPI v2 specification's Scopes object.
|
|
1279
|
+
|
|
1280
|
+
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject
|
|
1281
|
+
|
|
1282
|
+
Lists the available scopes for an OAuth2 security scheme.
|
|
1283
|
+
"""
|
|
1284
|
+
|
|
1285
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1286
|
+
|
|
1287
|
+
@typing.final
|
|
1288
|
+
class ScopeEntry(google.protobuf.message.Message):
|
|
1289
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1290
|
+
|
|
1291
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
1292
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
1293
|
+
key: builtins.str
|
|
1294
|
+
value: builtins.str
|
|
1295
|
+
def __init__(
|
|
1296
|
+
self,
|
|
1297
|
+
*,
|
|
1298
|
+
key: builtins.str = ...,
|
|
1299
|
+
value: builtins.str = ...,
|
|
1300
|
+
) -> None: ...
|
|
1301
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
1302
|
+
|
|
1303
|
+
SCOPE_FIELD_NUMBER: builtins.int
|
|
1304
|
+
@property
|
|
1305
|
+
def scope(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]:
|
|
1306
|
+
"""Maps between a name of a scope to a short description of it (as the value
|
|
1307
|
+
of the property).
|
|
1308
|
+
"""
|
|
1309
|
+
|
|
1310
|
+
def __init__(
|
|
1311
|
+
self,
|
|
1312
|
+
*,
|
|
1313
|
+
scope: collections.abc.Mapping[builtins.str, builtins.str] | None = ...,
|
|
1314
|
+
) -> None: ...
|
|
1315
|
+
def ClearField(self, field_name: typing.Literal["scope", b"scope"]) -> None: ...
|
|
1316
|
+
|
|
1317
|
+
global___Scopes = Scopes
|