-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
openapiv2.pb.go
2896 lines (2628 loc) · 124 KB
/
openapiv2.pb.go
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc (unknown)
// source: protoc-gen-openapiv2/options/openapiv2.proto
package options
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
structpb "google.golang.org/protobuf/types/known/structpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Scheme describes the schemes supported by the OpenAPI Swagger
// and Operation objects.
type Scheme int32
const (
Scheme_UNKNOWN Scheme = 0
Scheme_HTTP Scheme = 1
Scheme_HTTPS Scheme = 2
Scheme_WS Scheme = 3
Scheme_WSS Scheme = 4
)
// Enum value maps for Scheme.
var (
Scheme_name = map[int32]string{
0: "UNKNOWN",
1: "HTTP",
2: "HTTPS",
3: "WS",
4: "WSS",
}
Scheme_value = map[string]int32{
"UNKNOWN": 0,
"HTTP": 1,
"HTTPS": 2,
"WS": 3,
"WSS": 4,
}
)
func (x Scheme) Enum() *Scheme {
p := new(Scheme)
*p = x
return p
}
func (x Scheme) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Scheme) Descriptor() protoreflect.EnumDescriptor {
return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0].Descriptor()
}
func (Scheme) Type() protoreflect.EnumType {
return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0]
}
func (x Scheme) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Scheme.Descriptor instead.
func (Scheme) EnumDescriptor() ([]byte, []int) {
return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{0}
}
type JSONSchema_JSONSchemaSimpleTypes int32
const (
JSONSchema_UNKNOWN JSONSchema_JSONSchemaSimpleTypes = 0
JSONSchema_ARRAY JSONSchema_JSONSchemaSimpleTypes = 1
JSONSchema_BOOLEAN JSONSchema_JSONSchemaSimpleTypes = 2
JSONSchema_INTEGER JSONSchema_JSONSchemaSimpleTypes = 3
JSONSchema_NULL JSONSchema_JSONSchemaSimpleTypes = 4
JSONSchema_NUMBER JSONSchema_JSONSchemaSimpleTypes = 5
JSONSchema_OBJECT JSONSchema_JSONSchemaSimpleTypes = 6
JSONSchema_STRING JSONSchema_JSONSchemaSimpleTypes = 7
)
// Enum value maps for JSONSchema_JSONSchemaSimpleTypes.
var (
JSONSchema_JSONSchemaSimpleTypes_name = map[int32]string{
0: "UNKNOWN",
1: "ARRAY",
2: "BOOLEAN",
3: "INTEGER",
4: "NULL",
5: "NUMBER",
6: "OBJECT",
7: "STRING",
}
JSONSchema_JSONSchemaSimpleTypes_value = map[string]int32{
"UNKNOWN": 0,
"ARRAY": 1,
"BOOLEAN": 2,
"INTEGER": 3,
"NULL": 4,
"NUMBER": 5,
"OBJECT": 6,
"STRING": 7,
}
)
func (x JSONSchema_JSONSchemaSimpleTypes) Enum() *JSONSchema_JSONSchemaSimpleTypes {
p := new(JSONSchema_JSONSchemaSimpleTypes)
*p = x
return p
}
func (x JSONSchema_JSONSchemaSimpleTypes) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (JSONSchema_JSONSchemaSimpleTypes) Descriptor() protoreflect.EnumDescriptor {
return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1].Descriptor()
}
func (JSONSchema_JSONSchemaSimpleTypes) Type() protoreflect.EnumType {
return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1]
}
func (x JSONSchema_JSONSchemaSimpleTypes) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use JSONSchema_JSONSchemaSimpleTypes.Descriptor instead.
func (JSONSchema_JSONSchemaSimpleTypes) EnumDescriptor() ([]byte, []int) {
return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{9, 0}
}
// The type of the security scheme. Valid values are "basic",
// "apiKey" or "oauth2".
type SecurityScheme_Type int32
const (
SecurityScheme_TYPE_INVALID SecurityScheme_Type = 0
SecurityScheme_TYPE_BASIC SecurityScheme_Type = 1
SecurityScheme_TYPE_API_KEY SecurityScheme_Type = 2
SecurityScheme_TYPE_OAUTH2 SecurityScheme_Type = 3
)
// Enum value maps for SecurityScheme_Type.
var (
SecurityScheme_Type_name = map[int32]string{
0: "TYPE_INVALID",
1: "TYPE_BASIC",
2: "TYPE_API_KEY",
3: "TYPE_OAUTH2",
}
SecurityScheme_Type_value = map[string]int32{
"TYPE_INVALID": 0,
"TYPE_BASIC": 1,
"TYPE_API_KEY": 2,
"TYPE_OAUTH2": 3,
}
)
func (x SecurityScheme_Type) Enum() *SecurityScheme_Type {
p := new(SecurityScheme_Type)
*p = x
return p
}
func (x SecurityScheme_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SecurityScheme_Type) Descriptor() protoreflect.EnumDescriptor {
return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2].Descriptor()
}
func (SecurityScheme_Type) Type() protoreflect.EnumType {
return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2]
}
func (x SecurityScheme_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SecurityScheme_Type.Descriptor instead.
func (SecurityScheme_Type) EnumDescriptor() ([]byte, []int) {
return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 0}
}
// The location of the API key. Valid values are "query" or "header".
type SecurityScheme_In int32
const (
SecurityScheme_IN_INVALID SecurityScheme_In = 0
SecurityScheme_IN_QUERY SecurityScheme_In = 1
SecurityScheme_IN_HEADER SecurityScheme_In = 2
)
// Enum value maps for SecurityScheme_In.
var (
SecurityScheme_In_name = map[int32]string{
0: "IN_INVALID",
1: "IN_QUERY",
2: "IN_HEADER",
}
SecurityScheme_In_value = map[string]int32{
"IN_INVALID": 0,
"IN_QUERY": 1,
"IN_HEADER": 2,
}
)
func (x SecurityScheme_In) Enum() *SecurityScheme_In {
p := new(SecurityScheme_In)
*p = x
return p
}
func (x SecurityScheme_In) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SecurityScheme_In) Descriptor() protoreflect.EnumDescriptor {
return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3].Descriptor()
}
func (SecurityScheme_In) Type() protoreflect.EnumType {
return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3]
}
func (x SecurityScheme_In) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SecurityScheme_In.Descriptor instead.
func (SecurityScheme_In) EnumDescriptor() ([]byte, []int) {
return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 1}
}
// The flow used by the OAuth2 security scheme. Valid values are
// "implicit", "password", "application" or "accessCode".
type SecurityScheme_Flow int32
const (
SecurityScheme_FLOW_INVALID SecurityScheme_Flow = 0
SecurityScheme_FLOW_IMPLICIT SecurityScheme_Flow = 1
SecurityScheme_FLOW_PASSWORD SecurityScheme_Flow = 2
SecurityScheme_FLOW_APPLICATION SecurityScheme_Flow = 3
SecurityScheme_FLOW_ACCESS_CODE SecurityScheme_Flow = 4
)
// Enum value maps for SecurityScheme_Flow.
var (
SecurityScheme_Flow_name = map[int32]string{
0: "FLOW_INVALID",
1: "FLOW_IMPLICIT",
2: "FLOW_PASSWORD",
3: "FLOW_APPLICATION",
4: "FLOW_ACCESS_CODE",
}
SecurityScheme_Flow_value = map[string]int32{
"FLOW_INVALID": 0,
"FLOW_IMPLICIT": 1,
"FLOW_PASSWORD": 2,
"FLOW_APPLICATION": 3,
"FLOW_ACCESS_CODE": 4,
}
)
func (x SecurityScheme_Flow) Enum() *SecurityScheme_Flow {
p := new(SecurityScheme_Flow)
*p = x
return p
}
func (x SecurityScheme_Flow) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SecurityScheme_Flow) Descriptor() protoreflect.EnumDescriptor {
return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4].Descriptor()
}
func (SecurityScheme_Flow) Type() protoreflect.EnumType {
return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4]
}
func (x SecurityScheme_Flow) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SecurityScheme_Flow.Descriptor instead.
func (SecurityScheme_Flow) EnumDescriptor() ([]byte, []int) {
return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 2}
}
// `Swagger` is a representation of OpenAPI v2 specification's Swagger object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
//
// Example:
//
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
// info: {
// title: "Echo API";
// version: "1.0";
// description: "";
// contact: {
// name: "gRPC-Gateway project";
// url: "https://github.com/grpc-ecosystem/grpc-gateway";
// email: "none@example.com";
// };
// license: {
// name: "BSD 3-Clause License";
// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
// };
// };
// schemes: HTTPS;
// consumes: "application/json";
// produces: "application/json";
// };
//
type Swagger struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Specifies the OpenAPI Specification version being used. It can be
// used by the OpenAPI UI and other clients to interpret the API listing. The
// value MUST be "2.0".
Swagger string `protobuf:"bytes,1,opt,name=swagger,proto3" json:"swagger,omitempty"`
// Provides metadata about the API. The metadata can be used by the
// clients if needed.
Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"`
// The host (name or ip) serving the API. This MUST be the host only and does
// not include the scheme nor sub-paths. It MAY include a port. If the host is
// not included, the host serving the documentation is to be used (including
// the port). The host does not support path templating.
Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"`
// The base path on which the API is served, which is relative to the host. If
// it is not included, the API is served directly under the host. The value
// MUST start with a leading slash (/). The basePath does not support path
// templating.
// Note that using `base_path` does not change the endpoint paths that are
// generated in the resulting OpenAPI file. If you wish to use `base_path`
// with relatively generated OpenAPI paths, the `base_path` prefix must be
// manually removed from your `google.api.http` paths and your code changed to
// serve the API from the `base_path`.
BasePath string `protobuf:"bytes,4,opt,name=base_path,json=basePath,proto3" json:"base_path,omitempty"`
// The transfer protocol of the API. Values MUST be from the list: "http",
// "https", "ws", "wss". If the schemes is not included, the default scheme to
// be used is the one used to access the OpenAPI definition itself.
Schemes []Scheme `protobuf:"varint,5,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"`
// A list of MIME types the APIs can consume. This is global to all APIs but
// can be overridden on specific API calls. Value MUST be as described under
// Mime Types.
Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"`
// A list of MIME types the APIs can produce. This is global to all APIs but
// can be overridden on specific API calls. Value MUST be as described under
// Mime Types.
Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"`
// An object to hold responses that can be used across operations. This
// property does not define global responses for all operations.
Responses map[string]*Response `protobuf:"bytes,10,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Security scheme definitions that can be used across the specification.
SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,11,opt,name=security_definitions,json=securityDefinitions,proto3" json:"security_definitions,omitempty"`
// A declaration of which security schemes are applied for the API as a whole.
// The list of values describes alternative security schemes that can be used
// (that is, there is a logical OR between the security requirements).
// Individual operations can override this definition.
Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"`
// Additional external documentation.
ExternalDocs *ExternalDocumentation `protobuf:"bytes,14,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
Extensions map[string]*structpb.Value `protobuf:"bytes,15,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *Swagger) Reset() {
*x = Swagger{}
if protoimpl.UnsafeEnabled {
mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Swagger) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Swagger) ProtoMessage() {}
func (x *Swagger) ProtoReflect() protoreflect.Message {
mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Swagger.ProtoReflect.Descriptor instead.
func (*Swagger) Descriptor() ([]byte, []int) {
return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{0}
}
func (x *Swagger) GetSwagger() string {
if x != nil {
return x.Swagger
}
return ""
}
func (x *Swagger) GetInfo() *Info {
if x != nil {
return x.Info
}
return nil
}
func (x *Swagger) GetHost() string {
if x != nil {
return x.Host
}
return ""
}
func (x *Swagger) GetBasePath() string {
if x != nil {
return x.BasePath
}
return ""
}
func (x *Swagger) GetSchemes() []Scheme {
if x != nil {
return x.Schemes
}
return nil
}
func (x *Swagger) GetConsumes() []string {
if x != nil {
return x.Consumes
}
return nil
}
func (x *Swagger) GetProduces() []string {
if x != nil {
return x.Produces
}
return nil
}
func (x *Swagger) GetResponses() map[string]*Response {
if x != nil {
return x.Responses
}
return nil
}
func (x *Swagger) GetSecurityDefinitions() *SecurityDefinitions {
if x != nil {
return x.SecurityDefinitions
}
return nil
}
func (x *Swagger) GetSecurity() []*SecurityRequirement {
if x != nil {
return x.Security
}
return nil
}
func (x *Swagger) GetExternalDocs() *ExternalDocumentation {
if x != nil {
return x.ExternalDocs
}
return nil
}
func (x *Swagger) GetExtensions() map[string]*structpb.Value {
if x != nil {
return x.Extensions
}
return nil
}
// `Operation` is a representation of OpenAPI v2 specification's Operation object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject
//
// Example:
//
// service EchoService {
// rpc Echo(SimpleMessage) returns (SimpleMessage) {
// option (google.api.http) = {
// get: "/v1/example/echo/{id}"
// };
//
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
// summary: "Get a message.";
// operation_id: "getMessage";
// tags: "echo";
// responses: {
// key: "200"
// value: {
// description: "OK";
// }
// }
// };
// }
// }
type Operation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A list of tags for API documentation control. Tags can be used for logical
// grouping of operations by resources or any other qualifier.
Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
// A short summary of what the operation does. For maximum readability in the
// swagger-ui, this field SHOULD be less than 120 characters.
Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
// A verbose explanation of the operation behavior. GFM syntax can be used for
// rich text representation.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// Additional external documentation for this operation.
ExternalDocs *ExternalDocumentation `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
// Unique string used to identify the operation. The id MUST be unique among
// all operations described in the API. Tools and libraries MAY use the
// operationId to uniquely identify an operation, therefore, it is recommended
// to follow common programming naming conventions.
OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
// A list of MIME types the operation can consume. This overrides the consumes
// definition at the OpenAPI Object. An empty value MAY be used to clear the
// global definition. Value MUST be as described under Mime Types.
Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"`
// A list of MIME types the operation can produce. This overrides the produces
// definition at the OpenAPI Object. An empty value MAY be used to clear the
// global definition. Value MUST be as described under Mime Types.
Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"`
// The list of possible responses as they are returned from executing this
// operation.
Responses map[string]*Response `protobuf:"bytes,9,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// The transfer protocol for the operation. Values MUST be from the list:
// "http", "https", "ws", "wss". The value overrides the OpenAPI Object
// schemes definition.
Schemes []Scheme `protobuf:"varint,10,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"`
// Declares this operation to be deprecated. Usage of the declared operation
// should be refrained. Default value is false.
Deprecated bool `protobuf:"varint,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
// A declaration of which security schemes are applied for this operation. The
// list of values describes alternative security schemes that can be used
// (that is, there is a logical OR between the security requirements). This
// definition overrides any declared top-level security. To remove a top-level
// security declaration, an empty array can be used.
Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"`
Extensions map[string]*structpb.Value `protobuf:"bytes,13,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *Operation) Reset() {
*x = Operation{}
if protoimpl.UnsafeEnabled {
mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Operation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Operation) ProtoMessage() {}
func (x *Operation) ProtoReflect() protoreflect.Message {
mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Operation.ProtoReflect.Descriptor instead.
func (*Operation) Descriptor() ([]byte, []int) {
return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{1}
}
func (x *Operation) GetTags() []string {
if x != nil {
return x.Tags
}
return nil
}
func (x *Operation) GetSummary() string {
if x != nil {
return x.Summary
}
return ""
}
func (x *Operation) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Operation) GetExternalDocs() *ExternalDocumentation {
if x != nil {
return x.ExternalDocs
}
return nil
}
func (x *Operation) GetOperationId() string {
if x != nil {
return x.OperationId
}
return ""
}
func (x *Operation) GetConsumes() []string {
if x != nil {
return x.Consumes
}
return nil
}
func (x *Operation) GetProduces() []string {
if x != nil {
return x.Produces
}
return nil
}
func (x *Operation) GetResponses() map[string]*Response {
if x != nil {
return x.Responses
}
return nil
}
func (x *Operation) GetSchemes() []Scheme {
if x != nil {
return x.Schemes
}
return nil
}
func (x *Operation) GetDeprecated() bool {
if x != nil {
return x.Deprecated
}
return false
}
func (x *Operation) GetSecurity() []*SecurityRequirement {
if x != nil {
return x.Security
}
return nil
}
func (x *Operation) GetExtensions() map[string]*structpb.Value {
if x != nil {
return x.Extensions
}
return nil
}
// `Header` is a representation of OpenAPI v2 specification's Header object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
//
type Header struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// `Description` is a short description of the header.
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
// The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
// `Format` The extending format for the previously mentioned type.
Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"`
// `Default` Declares the value of the header that the server will use if none is provided.
// See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
// Unlike JSON Schema this value MUST conform to the defined type for the header.
Default string `protobuf:"bytes,6,opt,name=default,proto3" json:"default,omitempty"`
// 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
Pattern string `protobuf:"bytes,13,opt,name=pattern,proto3" json:"pattern,omitempty"`
}
func (x *Header) Reset() {
*x = Header{}
if protoimpl.UnsafeEnabled {
mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Header) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Header) ProtoMessage() {}
func (x *Header) ProtoReflect() protoreflect.Message {
mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Header.ProtoReflect.Descriptor instead.
func (*Header) Descriptor() ([]byte, []int) {
return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{2}
}
func (x *Header) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Header) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Header) GetFormat() string {
if x != nil {
return x.Format
}
return ""
}
func (x *Header) GetDefault() string {
if x != nil {
return x.Default
}
return ""
}
func (x *Header) GetPattern() string {
if x != nil {
return x.Pattern
}
return ""
}
// `Response` is a representation of OpenAPI v2 specification's Response object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject
//
type Response struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// `Description` is a short description of the response.
// GFM syntax can be used for rich text representation.
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
// `Schema` optionally defines the structure of the response.
// If `Schema` is not provided, it means there is no content to the response.
Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`
// `Headers` A list of headers that are sent with the response.
// `Header` name is expected to be a string in the canonical format of the MIME header key
// See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
Headers map[string]*Header `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// `Examples` gives per-mimetype response examples.
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
Examples map[string]string `protobuf:"bytes,4,rep,name=examples,proto3" json:"examples,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Extensions map[string]*structpb.Value `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *Response) Reset() {
*x = Response{}
if protoimpl.UnsafeEnabled {
mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Response) ProtoMessage() {}
func (x *Response) ProtoReflect() protoreflect.Message {
mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Response.ProtoReflect.Descriptor instead.
func (*Response) Descriptor() ([]byte, []int) {
return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{3}
}
func (x *Response) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Response) GetSchema() *Schema {
if x != nil {
return x.Schema
}
return nil
}
func (x *Response) GetHeaders() map[string]*Header {
if x != nil {
return x.Headers
}
return nil
}
func (x *Response) GetExamples() map[string]string {
if x != nil {
return x.Examples
}
return nil
}
func (x *Response) GetExtensions() map[string]*structpb.Value {
if x != nil {
return x.Extensions
}
return nil
}
// `Info` is a representation of OpenAPI v2 specification's Info object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject
//
// Example:
//
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
// info: {
// title: "Echo API";
// version: "1.0";
// description: "";
// contact: {
// name: "gRPC-Gateway project";
// url: "https://github.com/grpc-ecosystem/grpc-gateway";
// email: "none@example.com";
// };
// license: {
// name: "BSD 3-Clause License";
// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
// };
// };
// ...
// };
//
type Info struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The title of the application.
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
// A short description of the application. GFM syntax can be used for rich
// text representation.
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
// The Terms of Service for the API.
TermsOfService string `protobuf:"bytes,3,opt,name=terms_of_service,json=termsOfService,proto3" json:"terms_of_service,omitempty"`
// The contact information for the exposed API.
Contact *Contact `protobuf:"bytes,4,opt,name=contact,proto3" json:"contact,omitempty"`
// The license information for the exposed API.
License *License `protobuf:"bytes,5,opt,name=license,proto3" json:"license,omitempty"`
// Provides the version of the application API (not to be confused
// with the specification version).
Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
Extensions map[string]*structpb.Value `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *Info) Reset() {
*x = Info{}
if protoimpl.UnsafeEnabled {
mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Info) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Info) ProtoMessage() {}
func (x *Info) ProtoReflect() protoreflect.Message {
mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Info.ProtoReflect.Descriptor instead.
func (*Info) Descriptor() ([]byte, []int) {
return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{4}
}
func (x *Info) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Info) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Info) GetTermsOfService() string {
if x != nil {
return x.TermsOfService
}
return ""
}
func (x *Info) GetContact() *Contact {
if x != nil {
return x.Contact
}
return nil
}
func (x *Info) GetLicense() *License {
if x != nil {
return x.License
}
return nil
}
func (x *Info) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *Info) GetExtensions() map[string]*structpb.Value {
if x != nil {
return x.Extensions
}
return nil
}
// `Contact` is a representation of OpenAPI v2 specification's Contact object.