-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapiv2.pb.go
1100 lines (977 loc) · 41.2 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.
// source: protoc-gen-swagger/options/openapiv2.proto
/*
Package options is a generated protocol buffer package.
It is generated from these files:
protoc-gen-swagger/options/openapiv2.proto
protoc-gen-swagger/options/annotations.proto
It has these top-level messages:
Swagger
Operation
Info
Contact
ExternalDocumentation
Schema
JSONSchema
Tag
SecurityDefinitions
SecurityScheme
SecurityRequirement
Scopes
*/
package options
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import google_protobuf "github.com/golang/protobuf/ptypes/any"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type Swagger_SwaggerScheme int32
const (
Swagger_UNKNOWN Swagger_SwaggerScheme = 0
Swagger_HTTP Swagger_SwaggerScheme = 1
Swagger_HTTPS Swagger_SwaggerScheme = 2
Swagger_WS Swagger_SwaggerScheme = 3
Swagger_WSS Swagger_SwaggerScheme = 4
)
var Swagger_SwaggerScheme_name = map[int32]string{
0: "UNKNOWN",
1: "HTTP",
2: "HTTPS",
3: "WS",
4: "WSS",
}
var Swagger_SwaggerScheme_value = map[string]int32{
"UNKNOWN": 0,
"HTTP": 1,
"HTTPS": 2,
"WS": 3,
"WSS": 4,
}
func (x Swagger_SwaggerScheme) String() string {
return proto.EnumName(Swagger_SwaggerScheme_name, int32(x))
}
func (Swagger_SwaggerScheme) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 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
)
var JSONSchema_JSONSchemaSimpleTypes_name = map[int32]string{
0: "UNKNOWN",
1: "ARRAY",
2: "BOOLEAN",
3: "INTEGER",
4: "NULL",
5: "NUMBER",
6: "OBJECT",
7: "STRING",
}
var 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) String() string {
return proto.EnumName(JSONSchema_JSONSchemaSimpleTypes_name, int32(x))
}
func (JSONSchema_JSONSchemaSimpleTypes) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{6, 0}
}
// Required. 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
)
var SecurityScheme_Type_name = map[int32]string{
0: "TYPE_INVALID",
1: "TYPE_BASIC",
2: "TYPE_API_KEY",
3: "TYPE_OAUTH2",
}
var SecurityScheme_Type_value = map[string]int32{
"TYPE_INVALID": 0,
"TYPE_BASIC": 1,
"TYPE_API_KEY": 2,
"TYPE_OAUTH2": 3,
}
func (x SecurityScheme_Type) String() string {
return proto.EnumName(SecurityScheme_Type_name, int32(x))
}
func (SecurityScheme_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{9, 0} }
// Required. 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
)
var SecurityScheme_In_name = map[int32]string{
0: "IN_INVALID",
1: "IN_QUERY",
2: "IN_HEADER",
}
var SecurityScheme_In_value = map[string]int32{
"IN_INVALID": 0,
"IN_QUERY": 1,
"IN_HEADER": 2,
}
func (x SecurityScheme_In) String() string {
return proto.EnumName(SecurityScheme_In_name, int32(x))
}
func (SecurityScheme_In) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{9, 1} }
// Required. 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
)
var SecurityScheme_Flow_name = map[int32]string{
0: "FLOW_INVALID",
1: "FLOW_IMPLICIT",
2: "FLOW_PASSWORD",
3: "FLOW_APPLICATION",
4: "FLOW_ACCESS_CODE",
}
var 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) String() string {
return proto.EnumName(SecurityScheme_Flow_name, int32(x))
}
func (SecurityScheme_Flow) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{9, 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
//
// TODO(ivucica): document fields
type Swagger struct {
Swagger string `protobuf:"bytes,1,opt,name=swagger" json:"swagger,omitempty"`
Info *Info `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"`
Host string `protobuf:"bytes,3,opt,name=host" json:"host,omitempty"`
BasePath string `protobuf:"bytes,4,opt,name=base_path,json=basePath" json:"base_path,omitempty"`
Schemes []Swagger_SwaggerScheme `protobuf:"varint,5,rep,packed,name=schemes,enum=grpc.gateway.protoc_gen_swagger.options.Swagger_SwaggerScheme" json:"schemes,omitempty"`
Consumes []string `protobuf:"bytes,6,rep,name=consumes" json:"consumes,omitempty"`
Produces []string `protobuf:"bytes,7,rep,name=produces" json:"produces,omitempty"`
SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,11,opt,name=security_definitions,json=securityDefinitions" json:"security_definitions,omitempty"`
Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security" json:"security,omitempty"`
ExternalDocs *ExternalDocumentation `protobuf:"bytes,14,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"`
}
func (m *Swagger) Reset() { *m = Swagger{} }
func (m *Swagger) String() string { return proto.CompactTextString(m) }
func (*Swagger) ProtoMessage() {}
func (*Swagger) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *Swagger) GetSwagger() string {
if m != nil {
return m.Swagger
}
return ""
}
func (m *Swagger) GetInfo() *Info {
if m != nil {
return m.Info
}
return nil
}
func (m *Swagger) GetHost() string {
if m != nil {
return m.Host
}
return ""
}
func (m *Swagger) GetBasePath() string {
if m != nil {
return m.BasePath
}
return ""
}
func (m *Swagger) GetSchemes() []Swagger_SwaggerScheme {
if m != nil {
return m.Schemes
}
return nil
}
func (m *Swagger) GetConsumes() []string {
if m != nil {
return m.Consumes
}
return nil
}
func (m *Swagger) GetProduces() []string {
if m != nil {
return m.Produces
}
return nil
}
func (m *Swagger) GetSecurityDefinitions() *SecurityDefinitions {
if m != nil {
return m.SecurityDefinitions
}
return nil
}
func (m *Swagger) GetSecurity() []*SecurityRequirement {
if m != nil {
return m.Security
}
return nil
}
func (m *Swagger) GetExternalDocs() *ExternalDocumentation {
if m != nil {
return m.ExternalDocs
}
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
//
// TODO(ivucica): document fields
type Operation struct {
Tags []string `protobuf:"bytes,1,rep,name=tags" json:"tags,omitempty"`
Summary string `protobuf:"bytes,2,opt,name=summary" json:"summary,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
ExternalDocs *ExternalDocumentation `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"`
OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId" json:"operation_id,omitempty"`
Consumes []string `protobuf:"bytes,6,rep,name=consumes" json:"consumes,omitempty"`
Produces []string `protobuf:"bytes,7,rep,name=produces" json:"produces,omitempty"`
Schemes []string `protobuf:"bytes,10,rep,name=schemes" json:"schemes,omitempty"`
Deprecated bool `protobuf:"varint,11,opt,name=deprecated" json:"deprecated,omitempty"`
Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security" json:"security,omitempty"`
}
func (m *Operation) Reset() { *m = Operation{} }
func (m *Operation) String() string { return proto.CompactTextString(m) }
func (*Operation) ProtoMessage() {}
func (*Operation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *Operation) GetTags() []string {
if m != nil {
return m.Tags
}
return nil
}
func (m *Operation) GetSummary() string {
if m != nil {
return m.Summary
}
return ""
}
func (m *Operation) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *Operation) GetExternalDocs() *ExternalDocumentation {
if m != nil {
return m.ExternalDocs
}
return nil
}
func (m *Operation) GetOperationId() string {
if m != nil {
return m.OperationId
}
return ""
}
func (m *Operation) GetConsumes() []string {
if m != nil {
return m.Consumes
}
return nil
}
func (m *Operation) GetProduces() []string {
if m != nil {
return m.Produces
}
return nil
}
func (m *Operation) GetSchemes() []string {
if m != nil {
return m.Schemes
}
return nil
}
func (m *Operation) GetDeprecated() bool {
if m != nil {
return m.Deprecated
}
return false
}
func (m *Operation) GetSecurity() []*SecurityRequirement {
if m != nil {
return m.Security
}
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
//
// TODO(ivucica): document fields
type Info struct {
Title string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
TermsOfService string `protobuf:"bytes,3,opt,name=terms_of_service,json=termsOfService" json:"terms_of_service,omitempty"`
Contact *Contact `protobuf:"bytes,4,opt,name=contact" json:"contact,omitempty"`
Version string `protobuf:"bytes,6,opt,name=version" json:"version,omitempty"`
}
func (m *Info) Reset() { *m = Info{} }
func (m *Info) String() string { return proto.CompactTextString(m) }
func (*Info) ProtoMessage() {}
func (*Info) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *Info) GetTitle() string {
if m != nil {
return m.Title
}
return ""
}
func (m *Info) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *Info) GetTermsOfService() string {
if m != nil {
return m.TermsOfService
}
return ""
}
func (m *Info) GetContact() *Contact {
if m != nil {
return m.Contact
}
return nil
}
func (m *Info) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
// `Contact` is a representation of OpenAPI v2 specification's Contact object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
//
// TODO(ivucica): document fields
type Contact struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
Email string `protobuf:"bytes,3,opt,name=email" json:"email,omitempty"`
}
func (m *Contact) Reset() { *m = Contact{} }
func (m *Contact) String() string { return proto.CompactTextString(m) }
func (*Contact) ProtoMessage() {}
func (*Contact) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *Contact) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Contact) GetUrl() string {
if m != nil {
return m.Url
}
return ""
}
func (m *Contact) GetEmail() string {
if m != nil {
return m.Email
}
return ""
}
// `ExternalDocumentation` is a representation of OpenAPI v2 specification's
// ExternalDocumentation object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
//
// TODO(ivucica): document fields
type ExternalDocumentation struct {
Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"`
Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
}
func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} }
func (m *ExternalDocumentation) String() string { return proto.CompactTextString(m) }
func (*ExternalDocumentation) ProtoMessage() {}
func (*ExternalDocumentation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *ExternalDocumentation) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *ExternalDocumentation) GetUrl() string {
if m != nil {
return m.Url
}
return ""
}
// `Schema` is a representation of OpenAPI v2 specification's Schema object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
//
// TODO(ivucica): document fields
type Schema struct {
JsonSchema *JSONSchema `protobuf:"bytes,1,opt,name=json_schema,json=jsonSchema" json:"json_schema,omitempty"`
Discriminator string `protobuf:"bytes,2,opt,name=discriminator" json:"discriminator,omitempty"`
ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly" json:"read_only,omitempty"`
ExternalDocs *ExternalDocumentation `protobuf:"bytes,5,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"`
Example *google_protobuf.Any `protobuf:"bytes,6,opt,name=example" json:"example,omitempty"`
}
func (m *Schema) Reset() { *m = Schema{} }
func (m *Schema) String() string { return proto.CompactTextString(m) }
func (*Schema) ProtoMessage() {}
func (*Schema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *Schema) GetJsonSchema() *JSONSchema {
if m != nil {
return m.JsonSchema
}
return nil
}
func (m *Schema) GetDiscriminator() string {
if m != nil {
return m.Discriminator
}
return ""
}
func (m *Schema) GetReadOnly() bool {
if m != nil {
return m.ReadOnly
}
return false
}
func (m *Schema) GetExternalDocs() *ExternalDocumentation {
if m != nil {
return m.ExternalDocs
}
return nil
}
func (m *Schema) GetExample() *google_protobuf.Any {
if m != nil {
return m.Example
}
return nil
}
// `JSONSchema` represents properties from JSON Schema taken, and as used, in
// the OpenAPI v2 spec.
//
// This includes changes made by OpenAPI v2.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
//
// See also: https://cswr.github.io/JsonSchema/spec/basic_types/,
// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
//
// TODO(ivucica): document fields
type JSONSchema struct {
Title string `protobuf:"bytes,5,opt,name=title" json:"title,omitempty"`
Description string `protobuf:"bytes,6,opt,name=description" json:"description,omitempty"`
Default string `protobuf:"bytes,7,opt,name=default" json:"default,omitempty"`
MultipleOf float64 `protobuf:"fixed64,10,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"`
Maximum float64 `protobuf:"fixed64,11,opt,name=maximum" json:"maximum,omitempty"`
ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"`
Minimum float64 `protobuf:"fixed64,13,opt,name=minimum" json:"minimum,omitempty"`
ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"`
MaxLength uint64 `protobuf:"varint,15,opt,name=max_length,json=maxLength" json:"max_length,omitempty"`
MinLength uint64 `protobuf:"varint,16,opt,name=min_length,json=minLength" json:"min_length,omitempty"`
Pattern string `protobuf:"bytes,17,opt,name=pattern" json:"pattern,omitempty"`
MaxItems uint64 `protobuf:"varint,20,opt,name=max_items,json=maxItems" json:"max_items,omitempty"`
MinItems uint64 `protobuf:"varint,21,opt,name=min_items,json=minItems" json:"min_items,omitempty"`
UniqueItems bool `protobuf:"varint,22,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"`
MaxProperties uint64 `protobuf:"varint,24,opt,name=max_properties,json=maxProperties" json:"max_properties,omitempty"`
MinProperties uint64 `protobuf:"varint,25,opt,name=min_properties,json=minProperties" json:"min_properties,omitempty"`
Required []string `protobuf:"bytes,26,rep,name=required" json:"required,omitempty"`
// Items in 'array' must be unique.
Array []string `protobuf:"bytes,34,rep,name=array" json:"array,omitempty"`
Type []JSONSchema_JSONSchemaSimpleTypes `protobuf:"varint,35,rep,packed,name=type,enum=grpc.gateway.protoc_gen_swagger.options.JSONSchema_JSONSchemaSimpleTypes" json:"type,omitempty"`
}
func (m *JSONSchema) Reset() { *m = JSONSchema{} }
func (m *JSONSchema) String() string { return proto.CompactTextString(m) }
func (*JSONSchema) ProtoMessage() {}
func (*JSONSchema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *JSONSchema) GetTitle() string {
if m != nil {
return m.Title
}
return ""
}
func (m *JSONSchema) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *JSONSchema) GetDefault() string {
if m != nil {
return m.Default
}
return ""
}
func (m *JSONSchema) GetMultipleOf() float64 {
if m != nil {
return m.MultipleOf
}
return 0
}
func (m *JSONSchema) GetMaximum() float64 {
if m != nil {
return m.Maximum
}
return 0
}
func (m *JSONSchema) GetExclusiveMaximum() bool {
if m != nil {
return m.ExclusiveMaximum
}
return false
}
func (m *JSONSchema) GetMinimum() float64 {
if m != nil {
return m.Minimum
}
return 0
}
func (m *JSONSchema) GetExclusiveMinimum() bool {
if m != nil {
return m.ExclusiveMinimum
}
return false
}
func (m *JSONSchema) GetMaxLength() uint64 {
if m != nil {
return m.MaxLength
}
return 0
}
func (m *JSONSchema) GetMinLength() uint64 {
if m != nil {
return m.MinLength
}
return 0
}
func (m *JSONSchema) GetPattern() string {
if m != nil {
return m.Pattern
}
return ""
}
func (m *JSONSchema) GetMaxItems() uint64 {
if m != nil {
return m.MaxItems
}
return 0
}
func (m *JSONSchema) GetMinItems() uint64 {
if m != nil {
return m.MinItems
}
return 0
}
func (m *JSONSchema) GetUniqueItems() bool {
if m != nil {
return m.UniqueItems
}
return false
}
func (m *JSONSchema) GetMaxProperties() uint64 {
if m != nil {
return m.MaxProperties
}
return 0
}
func (m *JSONSchema) GetMinProperties() uint64 {
if m != nil {
return m.MinProperties
}
return 0
}
func (m *JSONSchema) GetRequired() []string {
if m != nil {
return m.Required
}
return nil
}
func (m *JSONSchema) GetArray() []string {
if m != nil {
return m.Array
}
return nil
}
func (m *JSONSchema) GetType() []JSONSchema_JSONSchemaSimpleTypes {
if m != nil {
return m.Type
}
return nil
}
// `Tag` is a representation of OpenAPI v2 specification's Tag object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
//
// TODO(ivucica): document fields
type Tag struct {
// TODO(ivucica): Description should be extracted from comments on the proto
// service object.
Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
ExternalDocs *ExternalDocumentation `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"`
}
func (m *Tag) Reset() { *m = Tag{} }
func (m *Tag) String() string { return proto.CompactTextString(m) }
func (*Tag) ProtoMessage() {}
func (*Tag) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *Tag) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *Tag) GetExternalDocs() *ExternalDocumentation {
if m != nil {
return m.ExternalDocs
}
return nil
}
// `SecurityDefinitions` is a representation of OpenAPI v2 specification's
// Security Definitions object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
//
// A declaration of the security schemes available to be used in the
// specification. This does not enforce the security schemes on the operations
// and only serves to provide the relevant details for each scheme.
type SecurityDefinitions struct {
// A single security scheme definition, mapping a "name" to the scheme it defines.
Security map[string]*SecurityScheme `protobuf:"bytes,1,rep,name=security" json:"security,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *SecurityDefinitions) Reset() { *m = SecurityDefinitions{} }
func (m *SecurityDefinitions) String() string { return proto.CompactTextString(m) }
func (*SecurityDefinitions) ProtoMessage() {}
func (*SecurityDefinitions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *SecurityDefinitions) GetSecurity() map[string]*SecurityScheme {
if m != nil {
return m.Security
}
return nil
}
// `SecurityScheme` is a representation of OpenAPI v2 specification's
// Security Scheme object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject
//
// Allows the definition of a security scheme that can be used by the
// operations. Supported schemes are basic authentication, an API key (either as
// a header or as a query parameter) and OAuth2's common flows (implicit,
// password, application and access code).
type SecurityScheme struct {
// Required. The type of the security scheme. Valid values are "basic",
// "apiKey" or "oauth2".
Type SecurityScheme_Type `protobuf:"varint,1,opt,name=type,enum=grpc.gateway.protoc_gen_swagger.options.SecurityScheme_Type" json:"type,omitempty"`
// A short description for security scheme.
Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
// Required. The name of the header or query parameter to be used.
//
// Valid for apiKey.
Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"`
// Required. The location of the API key. Valid values are "query" or "header".
//
// Valid for apiKey.
In SecurityScheme_In `protobuf:"varint,4,opt,name=in,enum=grpc.gateway.protoc_gen_swagger.options.SecurityScheme_In" json:"in,omitempty"`
// Required. The flow used by the OAuth2 security scheme. Valid values are
// "implicit", "password", "application" or "accessCode".
//
// Valid for oauth2.
Flow SecurityScheme_Flow `protobuf:"varint,5,opt,name=flow,enum=grpc.gateway.protoc_gen_swagger.options.SecurityScheme_Flow" json:"flow,omitempty"`
// Required. The authorization URL to be used for this flow. This SHOULD be in
// the form of a URL.
//
// Valid for oauth2/implicit and oauth2/accessCode.
AuthorizationUrl string `protobuf:"bytes,6,opt,name=authorization_url,json=authorizationUrl" json:"authorization_url,omitempty"`
// Required. The token URL to be used for this flow. This SHOULD be in the
// form of a URL.
//
// Valid for oauth2/password, oauth2/application and oauth2/accessCode.
TokenUrl string `protobuf:"bytes,7,opt,name=token_url,json=tokenUrl" json:"token_url,omitempty"`
// Required. The available scopes for the OAuth2 security scheme.
//
// Valid for oauth2.
Scopes *Scopes `protobuf:"bytes,8,opt,name=scopes" json:"scopes,omitempty"`
}
func (m *SecurityScheme) Reset() { *m = SecurityScheme{} }
func (m *SecurityScheme) String() string { return proto.CompactTextString(m) }
func (*SecurityScheme) ProtoMessage() {}
func (*SecurityScheme) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *SecurityScheme) GetType() SecurityScheme_Type {
if m != nil {
return m.Type
}
return SecurityScheme_TYPE_INVALID
}
func (m *SecurityScheme) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *SecurityScheme) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *SecurityScheme) GetIn() SecurityScheme_In {
if m != nil {
return m.In
}
return SecurityScheme_IN_INVALID
}
func (m *SecurityScheme) GetFlow() SecurityScheme_Flow {
if m != nil {
return m.Flow
}
return SecurityScheme_FLOW_INVALID
}
func (m *SecurityScheme) GetAuthorizationUrl() string {
if m != nil {
return m.AuthorizationUrl
}
return ""
}
func (m *SecurityScheme) GetTokenUrl() string {
if m != nil {
return m.TokenUrl
}
return ""
}
func (m *SecurityScheme) GetScopes() *Scopes {
if m != nil {
return m.Scopes
}
return nil
}
// `SecurityRequirement` is a representation of OpenAPI v2 specification's
// Security Requirement object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject
//
// Lists the required security schemes to execute this operation. The object can
// have multiple security schemes declared in it which are all required (that
// is, there is a logical AND between the schemes).
//
// The name used for each property MUST correspond to a security scheme
// declared in the Security Definitions.
type SecurityRequirement struct {
// Each name must correspond to a security scheme which is declared in
// the Security Definitions. If the security scheme is of type "oauth2",
// then the value is a list of scope names required for the execution.
// For other security scheme types, the array MUST be empty.
SecurityRequirement map[string]*SecurityRequirement_SecurityRequirementValue `protobuf:"bytes,1,rep,name=security_requirement,json=securityRequirement" json:"security_requirement,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *SecurityRequirement) Reset() { *m = SecurityRequirement{} }
func (m *SecurityRequirement) String() string { return proto.CompactTextString(m) }
func (*SecurityRequirement) ProtoMessage() {}
func (*SecurityRequirement) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func (m *SecurityRequirement) GetSecurityRequirement() map[string]*SecurityRequirement_SecurityRequirementValue {
if m != nil {
return m.SecurityRequirement
}
return nil
}
// If the security scheme is of type "oauth2", then the value is a list of
// scope names required for the execution. For other security scheme types,
// the array MUST be empty.
type SecurityRequirement_SecurityRequirementValue struct {
Scope []string `protobuf:"bytes,1,rep,name=scope" json:"scope,omitempty"`
}
func (m *SecurityRequirement_SecurityRequirementValue) Reset() {
*m = SecurityRequirement_SecurityRequirementValue{}
}
func (m *SecurityRequirement_SecurityRequirementValue) String() string {
return proto.CompactTextString(m)
}
func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage() {}
func (*SecurityRequirement_SecurityRequirementValue) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{10, 0}
}
func (m *SecurityRequirement_SecurityRequirementValue) GetScope() []string {
if m != nil {
return m.Scope
}
return nil
}
// `Scopes` is a representation of OpenAPI v2 specification's Scopes object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject
//
// Lists the available scopes for an OAuth2 security scheme.
type Scopes struct {
// Maps between a name of a scope to a short description of it (as the value
// of the property).
Scope map[string]string `protobuf:"bytes,1,rep,name=scope" json:"scope,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *Scopes) Reset() { *m = Scopes{} }
func (m *Scopes) String() string { return proto.CompactTextString(m) }
func (*Scopes) ProtoMessage() {}
func (*Scopes) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (m *Scopes) GetScope() map[string]string {
if m != nil {
return m.Scope
}
return nil
}
func init() {
proto.RegisterType((*Swagger)(nil), "grpc.gateway.protoc_gen_swagger.options.Swagger")
proto.RegisterType((*Operation)(nil), "grpc.gateway.protoc_gen_swagger.options.Operation")
proto.RegisterType((*Info)(nil), "grpc.gateway.protoc_gen_swagger.options.Info")
proto.RegisterType((*Contact)(nil), "grpc.gateway.protoc_gen_swagger.options.Contact")
proto.RegisterType((*ExternalDocumentation)(nil), "grpc.gateway.protoc_gen_swagger.options.ExternalDocumentation")
proto.RegisterType((*Schema)(nil), "grpc.gateway.protoc_gen_swagger.options.Schema")
proto.RegisterType((*JSONSchema)(nil), "grpc.gateway.protoc_gen_swagger.options.JSONSchema")
proto.RegisterType((*Tag)(nil), "grpc.gateway.protoc_gen_swagger.options.Tag")
proto.RegisterType((*SecurityDefinitions)(nil), "grpc.gateway.protoc_gen_swagger.options.SecurityDefinitions")
proto.RegisterType((*SecurityScheme)(nil), "grpc.gateway.protoc_gen_swagger.options.SecurityScheme")
proto.RegisterType((*SecurityRequirement)(nil), "grpc.gateway.protoc_gen_swagger.options.SecurityRequirement")
proto.RegisterType((*SecurityRequirement_SecurityRequirementValue)(nil), "grpc.gateway.protoc_gen_swagger.options.SecurityRequirement.SecurityRequirementValue")
proto.RegisterType((*Scopes)(nil), "grpc.gateway.protoc_gen_swagger.options.Scopes")
proto.RegisterEnum("grpc.gateway.protoc_gen_swagger.options.Swagger_SwaggerScheme", Swagger_SwaggerScheme_name, Swagger_SwaggerScheme_value)
proto.RegisterEnum("grpc.gateway.protoc_gen_swagger.options.JSONSchema_JSONSchemaSimpleTypes", JSONSchema_JSONSchemaSimpleTypes_name, JSONSchema_JSONSchemaSimpleTypes_value)
proto.RegisterEnum("grpc.gateway.protoc_gen_swagger.options.SecurityScheme_Type", SecurityScheme_Type_name, SecurityScheme_Type_value)
proto.RegisterEnum("grpc.gateway.protoc_gen_swagger.options.SecurityScheme_In", SecurityScheme_In_name, SecurityScheme_In_value)
proto.RegisterEnum("grpc.gateway.protoc_gen_swagger.options.SecurityScheme_Flow", SecurityScheme_Flow_name, SecurityScheme_Flow_value)
}
func init() { proto.RegisterFile("protoc-gen-swagger/options/openapiv2.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 1664 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x5b, 0x73, 0xdb, 0xc6,
0x15, 0x0e, 0xc8, 0x25, 0x09, 0x1e, 0x4a, 0xcc, 0x7a, 0x2d, 0xb7, 0x88, 0x12, 0xbb, 0x0a, 0x9a,
0x4e, 0x35, 0xf6, 0x98, 0x4a, 0x95, 0x87, 0x66, 0x32, 0x9d, 0xce, 0x50, 0x12, 0x63, 0x03, 0x96,
0x49, 0x16, 0xa4, 0xa2, 0xb8, 0x33, 0x1d, 0xcc, 0x1a, 0x5c, 0x52, 0x88, 0x71, 0x61, 0x70, 0x91,
0xc4, 0xfe, 0x82, 0x3e, 0x77, 0xfa, 0xda, 0x9f, 0xd1, 0xa7, 0xf6, 0x67, 0xf4, 0x97, 0xb4, 0x6f,