cerbos 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -2
- data/README.md +1 -1
- data/cerbos.gemspec +1 -1
- data/lib/cerbos/output/check_resources.rb +38 -3
- data/lib/cerbos/protobuf/cerbos/effect/v1/effect_pb.rb +24 -7
- data/lib/cerbos/protobuf/cerbos/engine/v1/engine_pb.rb +26 -171
- data/lib/cerbos/protobuf/cerbos/request/v1/request_pb.rb +26 -146
- data/lib/cerbos/protobuf/cerbos/response/v1/response_pb.rb +26 -171
- data/lib/cerbos/protobuf/cerbos/schema/v1/schema_pb.rb +23 -19
- data/lib/cerbos/protobuf/cerbos/svc/v1/svc_pb.rb +27 -2
- data/lib/cerbos/protobuf/cerbos/svc/v1/svc_services_pb.rb +1 -40
- data/lib/cerbos/protobuf/google/api/annotations_pb.rb +26 -2
- data/lib/cerbos/protobuf/google/api/field_behavior_pb.rb +24 -11
- data/lib/cerbos/protobuf/google/api/http_pb.rb +24 -24
- data/lib/cerbos/protobuf/protoc-gen-openapiv2/options/annotations_pb.rb +26 -2
- data/lib/cerbos/protobuf/protoc-gen-openapiv2/options/openapiv2_pb.rb +29 -160
- data/lib/cerbos/protobuf/validate/validate_pb.rb +26 -254
- data/lib/cerbos/version.rb +1 -1
- metadata +5 -10
- data/lib/cerbos/protobuf/cerbos/audit/v1/audit_pb.rb +0 -64
- data/lib/cerbos/protobuf/cerbos/policy/v1/policy_pb.rb +0 -247
- data/lib/cerbos/protobuf/cerbos/telemetry/v1/telemetry_pb.rb +0 -123
- data/lib/cerbos/protobuf/google/api/expr/v1alpha1/checked_pb.rb +0 -117
- data/lib/cerbos/protobuf/google/api/expr/v1alpha1/syntax_pb.rb +0 -113
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/api/annotations.proto
|
3
4
|
|
@@ -6,9 +7,32 @@ require 'google/protobuf'
|
|
6
7
|
require 'cerbos/protobuf/google/api/http_pb'
|
7
8
|
require 'google/protobuf/descriptor_pb'
|
8
9
|
|
9
|
-
|
10
|
-
|
10
|
+
|
11
|
+
descriptor_data = "\n\x1cgoogle/api/annotations.proto\x12\ngoogle.api\x1a\x15google/api/http.proto\x1a google/protobuf/descriptor.proto:K\n\x04http\x12\x1e.google.protobuf.MethodOptions\x18\xb0\xca\xbc\" \x01(\x0b\x32\x14.google.api.HttpRuleR\x04httpBn\n\x0e\x63om.google.apiB\x10\x41nnotationsProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3"
|
12
|
+
|
13
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
|
+
|
15
|
+
begin
|
16
|
+
pool.add_serialized_file(descriptor_data)
|
17
|
+
rescue TypeError => e
|
18
|
+
# Compatibility code: will be removed in the next major version.
|
19
|
+
require 'google/protobuf/descriptor_pb'
|
20
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
21
|
+
parsed.clear_dependency
|
22
|
+
serialized = parsed.class.encode(parsed)
|
23
|
+
file = pool.add_serialized_file(serialized)
|
24
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
25
|
+
imports = [
|
26
|
+
["google.api.HttpRule", "google/api/http.proto"],
|
27
|
+
]
|
28
|
+
imports.each do |type_name, expected_filename|
|
29
|
+
import_file = pool.lookup(type_name).file_descriptor
|
30
|
+
if import_file.name != expected_filename
|
31
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
32
|
+
end
|
11
33
|
end
|
34
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
35
|
+
warn "This will become an error in the next major version."
|
12
36
|
end
|
13
37
|
|
14
38
|
module Cerbos::Protobuf::Google
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/api/field_behavior.proto
|
3
4
|
|
@@ -5,19 +6,31 @@ require 'google/protobuf'
|
|
5
6
|
|
6
7
|
require 'google/protobuf/descriptor_pb'
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
9
|
+
|
10
|
+
descriptor_data = "\n\x1fgoogle/api/field_behavior.proto\x12\ngoogle.api\x1a google/protobuf/descriptor.proto*\xa6\x01\n\rFieldBehavior\x12\x1e\n\x1a\x46IELD_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08OPTIONAL\x10\x01\x12\x0c\n\x08REQUIRED\x10\x02\x12\x0f\n\x0bOUTPUT_ONLY\x10\x03\x12\x0e\n\nINPUT_ONLY\x10\x04\x12\r\n\tIMMUTABLE\x10\x05\x12\x12\n\x0eUNORDERED_LIST\x10\x06\x12\x15\n\x11NON_EMPTY_DEFAULT\x10\x07:`\n\x0e\x66ield_behavior\x12\x1d.google.protobuf.FieldOptions\x18\x9c\x08 \x03(\x0e\x32\x19.google.api.FieldBehaviorR\rfieldBehaviorBp\n\x0e\x63om.google.apiB\x12\x46ieldBehaviorProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3"
|
11
|
+
|
12
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
|
+
|
14
|
+
begin
|
15
|
+
pool.add_serialized_file(descriptor_data)
|
16
|
+
rescue TypeError => e
|
17
|
+
# Compatibility code: will be removed in the next major version.
|
18
|
+
require 'google/protobuf/descriptor_pb'
|
19
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
20
|
+
parsed.clear_dependency
|
21
|
+
serialized = parsed.class.encode(parsed)
|
22
|
+
file = pool.add_serialized_file(serialized)
|
23
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
24
|
+
imports = [
|
25
|
+
]
|
26
|
+
imports.each do |type_name, expected_filename|
|
27
|
+
import_file = pool.lookup(type_name).file_descriptor
|
28
|
+
if import_file.name != expected_filename
|
29
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
19
30
|
end
|
20
31
|
end
|
32
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
33
|
+
warn "This will become an error in the next major version."
|
21
34
|
end
|
22
35
|
|
23
36
|
module Cerbos::Protobuf::Google
|
@@ -1,38 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/api/http.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
optional :kind, :string, 1, json_name: "kind"
|
28
|
-
optional :path, :string, 2, json_name: "path"
|
7
|
+
|
8
|
+
descriptor_data = "\n\x15google/api/http.proto\x12\ngoogle.api\"\xda\x02\n\x08HttpRule\x12\x1a\n\x08selector\x18\x01 \x01(\tR\x08selector\x12\x12\n\x03get\x18\x02 \x01(\tH\x00R\x03get\x12\x12\n\x03put\x18\x03 \x01(\tH\x00R\x03put\x12\x14\n\x04post\x18\x04 \x01(\tH\x00R\x04post\x12\x18\n\x06\x64\x65lete\x18\x05 \x01(\tH\x00R\x06\x64\x65lete\x12\x16\n\x05patch\x18\x06 \x01(\tH\x00R\x05patch\x12\x37\n\x06\x63ustom\x18\x08 \x01(\x0b\x32\x1d.google.api.CustomHttpPatternH\x00R\x06\x63ustom\x12\x12\n\x04\x62ody\x18\x07 \x01(\tR\x04\x62ody\x12#\n\rresponse_body\x18\x0c \x01(\tR\x0cresponseBody\x12\x45\n\x13\x61\x64\x64itional_bindings\x18\x0b \x03(\x0b\x32\x14.google.api.HttpRuleR\x12\x61\x64\x64itionalBindingsB\t\n\x07pattern\";\n\x11\x43ustomHttpPattern\x12\x12\n\x04kind\x18\x01 \x01(\tR\x04kind\x12\x12\n\x04path\x18\x02 \x01(\tR\x04pathBj\n\x0e\x63om.google.apiB\tHttpProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3"
|
9
|
+
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
+
|
12
|
+
begin
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
14
|
+
rescue TypeError => e
|
15
|
+
# Compatibility code: will be removed in the next major version.
|
16
|
+
require 'google/protobuf/descriptor_pb'
|
17
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
18
|
+
parsed.clear_dependency
|
19
|
+
serialized = parsed.class.encode(parsed)
|
20
|
+
file = pool.add_serialized_file(serialized)
|
21
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
22
|
+
imports = [
|
23
|
+
]
|
24
|
+
imports.each do |type_name, expected_filename|
|
25
|
+
import_file = pool.lookup(type_name).file_descriptor
|
26
|
+
if import_file.name != expected_filename
|
27
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
29
28
|
end
|
30
29
|
end
|
30
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
31
|
+
warn "This will become an error in the next major version."
|
31
32
|
end
|
32
33
|
|
33
34
|
module Cerbos::Protobuf::Google
|
34
35
|
module Api
|
35
|
-
Http = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.Http").msgclass
|
36
36
|
HttpRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.HttpRule").msgclass
|
37
37
|
CustomHttpPattern = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.CustomHttpPattern").msgclass
|
38
38
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: protoc-gen-openapiv2/options/annotations.proto
|
3
4
|
|
@@ -6,9 +7,32 @@ require 'google/protobuf'
|
|
6
7
|
require 'google/protobuf/descriptor_pb'
|
7
8
|
require 'cerbos/protobuf/protoc-gen-openapiv2/options/openapiv2_pb'
|
8
9
|
|
9
|
-
|
10
|
-
|
10
|
+
|
11
|
+
descriptor_data = "\n.protoc-gen-openapiv2/options/annotations.proto\x12)grpc.gateway.protoc_gen_openapiv2.options\x1a google/protobuf/descriptor.proto\x1a,protoc-gen-openapiv2/options/openapiv2.proto:~\n\x11openapiv2_swagger\x12\x1c.google.protobuf.FileOptions\x18\x92\x08 \x01(\x0b\x32\x32.grpc.gateway.protoc_gen_openapiv2.options.SwaggerR\x10openapiv2Swagger:\x86\x01\n\x13openapiv2_operation\x12\x1e.google.protobuf.MethodOptions\x18\x92\x08 \x01(\x0b\x32\x34.grpc.gateway.protoc_gen_openapiv2.options.OperationR\x12openapiv2Operation:~\n\x10openapiv2_schema\x12\x1f.google.protobuf.MessageOptions\x18\x92\x08 \x01(\x0b\x32\x31.grpc.gateway.protoc_gen_openapiv2.options.SchemaR\x0fopenapiv2Schema:u\n\ropenapiv2_tag\x12\x1f.google.protobuf.ServiceOptions\x18\x92\x08 \x01(\x0b\x32..grpc.gateway.protoc_gen_openapiv2.options.TagR\x0copenapiv2Tag:~\n\x0fopenapiv2_field\x12\x1d.google.protobuf.FieldOptions\x18\x92\x08 \x01(\x0b\x32\x35.grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaR\x0eopenapiv2FieldBHZFgithub.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/optionsb\x06proto3"
|
12
|
+
|
13
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
|
+
|
15
|
+
begin
|
16
|
+
pool.add_serialized_file(descriptor_data)
|
17
|
+
rescue TypeError => e
|
18
|
+
# Compatibility code: will be removed in the next major version.
|
19
|
+
require 'google/protobuf/descriptor_pb'
|
20
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
21
|
+
parsed.clear_dependency
|
22
|
+
serialized = parsed.class.encode(parsed)
|
23
|
+
file = pool.add_serialized_file(serialized)
|
24
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
25
|
+
imports = [
|
26
|
+
["grpc.gateway.protoc_gen_openapiv2.options.Swagger", "protoc-gen-openapiv2/options/openapiv2.proto"],
|
27
|
+
]
|
28
|
+
imports.each do |type_name, expected_filename|
|
29
|
+
import_file = pool.lookup(type_name).file_descriptor
|
30
|
+
if import_file.name != expected_filename
|
31
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
32
|
+
end
|
11
33
|
end
|
34
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
35
|
+
warn "This will become an error in the next major version."
|
12
36
|
end
|
13
37
|
|
14
38
|
module Cerbos::Protobuf::Grpc
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: protoc-gen-openapiv2/options/openapiv2.proto
|
3
4
|
|
@@ -5,168 +6,32 @@ require 'google/protobuf'
|
|
5
6
|
|
6
7
|
require 'google/protobuf/struct_pb'
|
7
8
|
|
8
|
-
|
9
|
-
add_file("protoc-gen-openapiv2/options/openapiv2.proto", :syntax => :proto3) do
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
repeated :consumes, :string, 6, json_name: "consumes"
|
31
|
-
repeated :produces, :string, 7, json_name: "produces"
|
32
|
-
map :responses, :string, :message, 9, "grpc.gateway.protoc_gen_openapiv2.options.Response"
|
33
|
-
repeated :schemes, :enum, 10, "grpc.gateway.protoc_gen_openapiv2.options.Scheme", json_name: "schemes"
|
34
|
-
optional :deprecated, :bool, 11, json_name: "deprecated"
|
35
|
-
repeated :security, :message, 12, "grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement", json_name: "security"
|
36
|
-
map :extensions, :string, :message, 13, "google.protobuf.Value"
|
37
|
-
end
|
38
|
-
add_message "grpc.gateway.protoc_gen_openapiv2.options.Header" do
|
39
|
-
optional :description, :string, 1, json_name: "description"
|
40
|
-
optional :type, :string, 2, json_name: "type"
|
41
|
-
optional :format, :string, 3, json_name: "format"
|
42
|
-
optional :default, :string, 6, json_name: "default"
|
43
|
-
optional :pattern, :string, 13, json_name: "pattern"
|
44
|
-
end
|
45
|
-
add_message "grpc.gateway.protoc_gen_openapiv2.options.Response" do
|
46
|
-
optional :description, :string, 1, json_name: "description"
|
47
|
-
optional :schema, :message, 2, "grpc.gateway.protoc_gen_openapiv2.options.Schema", json_name: "schema"
|
48
|
-
map :headers, :string, :message, 3, "grpc.gateway.protoc_gen_openapiv2.options.Header"
|
49
|
-
map :examples, :string, :string, 4
|
50
|
-
map :extensions, :string, :message, 5, "google.protobuf.Value"
|
51
|
-
end
|
52
|
-
add_message "grpc.gateway.protoc_gen_openapiv2.options.Info" do
|
53
|
-
optional :title, :string, 1, json_name: "title"
|
54
|
-
optional :description, :string, 2, json_name: "description"
|
55
|
-
optional :terms_of_service, :string, 3, json_name: "termsOfService"
|
56
|
-
optional :contact, :message, 4, "grpc.gateway.protoc_gen_openapiv2.options.Contact", json_name: "contact"
|
57
|
-
optional :license, :message, 5, "grpc.gateway.protoc_gen_openapiv2.options.License", json_name: "license"
|
58
|
-
optional :version, :string, 6, json_name: "version"
|
59
|
-
map :extensions, :string, :message, 7, "google.protobuf.Value"
|
60
|
-
end
|
61
|
-
add_message "grpc.gateway.protoc_gen_openapiv2.options.Contact" do
|
62
|
-
optional :name, :string, 1, json_name: "name"
|
63
|
-
optional :url, :string, 2, json_name: "url"
|
64
|
-
optional :email, :string, 3, json_name: "email"
|
65
|
-
end
|
66
|
-
add_message "grpc.gateway.protoc_gen_openapiv2.options.License" do
|
67
|
-
optional :name, :string, 1, json_name: "name"
|
68
|
-
optional :url, :string, 2, json_name: "url"
|
69
|
-
end
|
70
|
-
add_message "grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation" do
|
71
|
-
optional :description, :string, 1, json_name: "description"
|
72
|
-
optional :url, :string, 2, json_name: "url"
|
73
|
-
end
|
74
|
-
add_message "grpc.gateway.protoc_gen_openapiv2.options.Schema" do
|
75
|
-
optional :json_schema, :message, 1, "grpc.gateway.protoc_gen_openapiv2.options.JSONSchema", json_name: "jsonSchema"
|
76
|
-
optional :discriminator, :string, 2, json_name: "discriminator"
|
77
|
-
optional :read_only, :bool, 3, json_name: "readOnly"
|
78
|
-
optional :external_docs, :message, 5, "grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation", json_name: "externalDocs"
|
79
|
-
optional :example, :string, 6, json_name: "example"
|
80
|
-
end
|
81
|
-
add_message "grpc.gateway.protoc_gen_openapiv2.options.JSONSchema" do
|
82
|
-
optional :ref, :string, 3, json_name: "ref"
|
83
|
-
optional :title, :string, 5, json_name: "title"
|
84
|
-
optional :description, :string, 6, json_name: "description"
|
85
|
-
optional :default, :string, 7, json_name: "default"
|
86
|
-
optional :read_only, :bool, 8, json_name: "readOnly"
|
87
|
-
optional :example, :string, 9, json_name: "example"
|
88
|
-
optional :multiple_of, :double, 10, json_name: "multipleOf"
|
89
|
-
optional :maximum, :double, 11, json_name: "maximum"
|
90
|
-
optional :exclusive_maximum, :bool, 12, json_name: "exclusiveMaximum"
|
91
|
-
optional :minimum, :double, 13, json_name: "minimum"
|
92
|
-
optional :exclusive_minimum, :bool, 14, json_name: "exclusiveMinimum"
|
93
|
-
optional :max_length, :uint64, 15, json_name: "maxLength"
|
94
|
-
optional :min_length, :uint64, 16, json_name: "minLength"
|
95
|
-
optional :pattern, :string, 17, json_name: "pattern"
|
96
|
-
optional :max_items, :uint64, 20, json_name: "maxItems"
|
97
|
-
optional :min_items, :uint64, 21, json_name: "minItems"
|
98
|
-
optional :unique_items, :bool, 22, json_name: "uniqueItems"
|
99
|
-
optional :max_properties, :uint64, 24, json_name: "maxProperties"
|
100
|
-
optional :min_properties, :uint64, 25, json_name: "minProperties"
|
101
|
-
repeated :required, :string, 26, json_name: "required"
|
102
|
-
repeated :array, :string, 34, json_name: "array"
|
103
|
-
repeated :type, :enum, 35, "grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes", json_name: "type"
|
104
|
-
optional :format, :string, 36, json_name: "format"
|
105
|
-
repeated :enum, :string, 46, json_name: "enum"
|
106
|
-
end
|
107
|
-
add_enum "grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes" do
|
108
|
-
value :UNKNOWN, 0
|
109
|
-
value :ARRAY, 1
|
110
|
-
value :BOOLEAN, 2
|
111
|
-
value :INTEGER, 3
|
112
|
-
value :NULL, 4
|
113
|
-
value :NUMBER, 5
|
114
|
-
value :OBJECT, 6
|
115
|
-
value :STRING, 7
|
116
|
-
end
|
117
|
-
add_message "grpc.gateway.protoc_gen_openapiv2.options.Tag" do
|
118
|
-
optional :description, :string, 2, json_name: "description"
|
119
|
-
optional :external_docs, :message, 3, "grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation", json_name: "externalDocs"
|
120
|
-
end
|
121
|
-
add_message "grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions" do
|
122
|
-
map :security, :string, :message, 1, "grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme"
|
123
|
-
end
|
124
|
-
add_message "grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme" do
|
125
|
-
optional :type, :enum, 1, "grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type", json_name: "type"
|
126
|
-
optional :description, :string, 2, json_name: "description"
|
127
|
-
optional :name, :string, 3, json_name: "name"
|
128
|
-
optional :in, :enum, 4, "grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In", json_name: "in"
|
129
|
-
optional :flow, :enum, 5, "grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow", json_name: "flow"
|
130
|
-
optional :authorization_url, :string, 6, json_name: "authorizationUrl"
|
131
|
-
optional :token_url, :string, 7, json_name: "tokenUrl"
|
132
|
-
optional :scopes, :message, 8, "grpc.gateway.protoc_gen_openapiv2.options.Scopes", json_name: "scopes"
|
133
|
-
map :extensions, :string, :message, 9, "google.protobuf.Value"
|
134
|
-
end
|
135
|
-
add_enum "grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type" do
|
136
|
-
value :TYPE_INVALID, 0
|
137
|
-
value :TYPE_BASIC, 1
|
138
|
-
value :TYPE_API_KEY, 2
|
139
|
-
value :TYPE_OAUTH2, 3
|
140
|
-
end
|
141
|
-
add_enum "grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In" do
|
142
|
-
value :IN_INVALID, 0
|
143
|
-
value :IN_QUERY, 1
|
144
|
-
value :IN_HEADER, 2
|
145
|
-
end
|
146
|
-
add_enum "grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow" do
|
147
|
-
value :FLOW_INVALID, 0
|
148
|
-
value :FLOW_IMPLICIT, 1
|
149
|
-
value :FLOW_PASSWORD, 2
|
150
|
-
value :FLOW_APPLICATION, 3
|
151
|
-
value :FLOW_ACCESS_CODE, 4
|
152
|
-
end
|
153
|
-
add_message "grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement" do
|
154
|
-
map :security_requirement, :string, :message, 1, "grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue"
|
155
|
-
end
|
156
|
-
add_message "grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue" do
|
157
|
-
repeated :scope, :string, 1, json_name: "scope"
|
158
|
-
end
|
159
|
-
add_message "grpc.gateway.protoc_gen_openapiv2.options.Scopes" do
|
160
|
-
map :scope, :string, :string, 1
|
161
|
-
end
|
162
|
-
add_enum "grpc.gateway.protoc_gen_openapiv2.options.Scheme" do
|
163
|
-
value :UNKNOWN, 0
|
164
|
-
value :HTTP, 1
|
165
|
-
value :HTTPS, 2
|
166
|
-
value :WS, 3
|
167
|
-
value :WSS, 4
|
9
|
+
|
10
|
+
descriptor_data = "\n,protoc-gen-openapiv2/options/openapiv2.proto\x12)grpc.gateway.protoc_gen_openapiv2.options\x1a\x1cgoogle/protobuf/struct.proto\"\xb3\x08\n\x07Swagger\x12\x18\n\x07swagger\x18\x01 \x01(\tR\x07swagger\x12\x43\n\x04info\x18\x02 \x01(\x0b\x32/.grpc.gateway.protoc_gen_openapiv2.options.InfoR\x04info\x12\x12\n\x04host\x18\x03 \x01(\tR\x04host\x12\x1b\n\tbase_path\x18\x04 \x01(\tR\x08\x62\x61sePath\x12K\n\x07schemes\x18\x05 \x03(\x0e\x32\x31.grpc.gateway.protoc_gen_openapiv2.options.SchemeR\x07schemes\x12\x1a\n\x08\x63onsumes\x18\x06 \x03(\tR\x08\x63onsumes\x12\x1a\n\x08produces\x18\x07 \x03(\tR\x08produces\x12_\n\tresponses\x18\n \x03(\x0b\x32\x41.grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntryR\tresponses\x12q\n\x14security_definitions\x18\x0b \x01(\x0b\x32>.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsR\x13securityDefinitions\x12Z\n\x08security\x18\x0c \x03(\x0b\x32>.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementR\x08security\x12\x42\n\x04tags\x18\r \x03(\x0b\x32..grpc.gateway.protoc_gen_openapiv2.options.TagR\x04tags\x12\x65\n\rexternal_docs\x18\x0e \x01(\x0b\x32@.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationR\x0c\x65xternalDocs\x12\x62\n\nextensions\x18\x0f \x03(\x0b\x32\x42.grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntryR\nextensions\x1aq\n\x0eResponsesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12I\n\x05value\x18\x02 \x01(\x0b\x32\x33.grpc.gateway.protoc_gen_openapiv2.options.ResponseR\x05value:\x02\x38\x01\x1aU\n\x0f\x45xtensionsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.ValueR\x05value:\x02\x38\x01J\x04\x08\x08\x10\tJ\x04\x08\t\x10\n\"\xd6\x07\n\tOperation\x12\x12\n\x04tags\x18\x01 \x03(\tR\x04tags\x12\x18\n\x07summary\x18\x02 \x01(\tR\x07summary\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12\x65\n\rexternal_docs\x18\x04 \x01(\x0b\x32@.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationR\x0c\x65xternalDocs\x12!\n\x0coperation_id\x18\x05 \x01(\tR\x0boperationId\x12\x1a\n\x08\x63onsumes\x18\x06 \x03(\tR\x08\x63onsumes\x12\x1a\n\x08produces\x18\x07 \x03(\tR\x08produces\x12\x61\n\tresponses\x18\t \x03(\x0b\x32\x43.grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntryR\tresponses\x12K\n\x07schemes\x18\n \x03(\x0e\x32\x31.grpc.gateway.protoc_gen_openapiv2.options.SchemeR\x07schemes\x12\x1e\n\ndeprecated\x18\x0b \x01(\x08R\ndeprecated\x12Z\n\x08security\x18\x0c \x03(\x0b\x32>.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementR\x08security\x12\x64\n\nextensions\x18\r \x03(\x0b\x32\x44.grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntryR\nextensions\x12U\n\nparameters\x18\x0e \x01(\x0b\x32\x35.grpc.gateway.protoc_gen_openapiv2.options.ParametersR\nparameters\x1aq\n\x0eResponsesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12I\n\x05value\x18\x02 \x01(\x0b\x32\x33.grpc.gateway.protoc_gen_openapiv2.options.ResponseR\x05value:\x02\x38\x01\x1aU\n\x0f\x45xtensionsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.ValueR\x05value:\x02\x38\x01J\x04\x08\x08\x10\t\"b\n\nParameters\x12T\n\x07headers\x18\x01 \x03(\x0b\x32:.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterR\x07headers\"\xa3\x02\n\x0fHeaderParameter\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x02 \x01(\tR\x0b\x64\x65scription\x12S\n\x04type\x18\x03 \x01(\x0e\x32?.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.TypeR\x04type\x12\x16\n\x06\x66ormat\x18\x04 \x01(\tR\x06\x66ormat\x12\x1a\n\x08required\x18\x05 \x01(\x08R\x08required\"E\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06STRING\x10\x01\x12\n\n\x06NUMBER\x10\x02\x12\x0b\n\x07INTEGER\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04J\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08\"\xd8\x01\n\x06Header\x12 \n\x0b\x64\x65scription\x18\x01 \x01(\tR\x0b\x64\x65scription\x12\x12\n\x04type\x18\x02 \x01(\tR\x04type\x12\x16\n\x06\x66ormat\x18\x03 \x01(\tR\x06\x66ormat\x12\x18\n\x07\x64\x65\x66\x61ult\x18\x06 \x01(\tR\x07\x64\x65\x66\x61ult\x12\x18\n\x07pattern\x18\r \x01(\tR\x07patternJ\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06J\x04\x08\x07\x10\x08J\x04\x08\x08\x10\tJ\x04\x08\t\x10\nJ\x04\x08\n\x10\x0bJ\x04\x08\x0b\x10\x0cJ\x04\x08\x0c\x10\rJ\x04\x08\x0e\x10\x0fJ\x04\x08\x0f\x10\x10J\x04\x08\x10\x10\x11J\x04\x08\x11\x10\x12J\x04\x08\x12\x10\x13\"\x9a\x05\n\x08Response\x12 \n\x0b\x64\x65scription\x18\x01 \x01(\tR\x0b\x64\x65scription\x12I\n\x06schema\x18\x02 \x01(\x0b\x32\x31.grpc.gateway.protoc_gen_openapiv2.options.SchemaR\x06schema\x12Z\n\x07headers\x18\x03 \x03(\x0b\x32@.grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntryR\x07headers\x12]\n\x08\x65xamples\x18\x04 \x03(\x0b\x32\x41.grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntryR\x08\x65xamples\x12\x63\n\nextensions\x18\x05 \x03(\x0b\x32\x43.grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntryR\nextensions\x1am\n\x0cHeadersEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x31.grpc.gateway.protoc_gen_openapiv2.options.HeaderR\x05value:\x02\x38\x01\x1a;\n\rExamplesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1aU\n\x0f\x45xtensionsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.ValueR\x05value:\x02\x38\x01\"\xd6\x03\n\x04Info\x12\x14\n\x05title\x18\x01 \x01(\tR\x05title\x12 \n\x0b\x64\x65scription\x18\x02 \x01(\tR\x0b\x64\x65scription\x12(\n\x10terms_of_service\x18\x03 \x01(\tR\x0etermsOfService\x12L\n\x07\x63ontact\x18\x04 \x01(\x0b\x32\x32.grpc.gateway.protoc_gen_openapiv2.options.ContactR\x07\x63ontact\x12L\n\x07license\x18\x05 \x01(\x0b\x32\x32.grpc.gateway.protoc_gen_openapiv2.options.LicenseR\x07license\x12\x18\n\x07version\x18\x06 \x01(\tR\x07version\x12_\n\nextensions\x18\x07 \x03(\x0b\x32?.grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntryR\nextensions\x1aU\n\x0f\x45xtensionsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.ValueR\x05value:\x02\x38\x01\"E\n\x07\x43ontact\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x10\n\x03url\x18\x02 \x01(\tR\x03url\x12\x14\n\x05\x65mail\x18\x03 \x01(\tR\x05\x65mail\"/\n\x07License\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x10\n\x03url\x18\x02 \x01(\tR\x03url\"K\n\x15\x45xternalDocumentation\x12 \n\x0b\x64\x65scription\x18\x01 \x01(\tR\x0b\x64\x65scription\x12\x10\n\x03url\x18\x02 \x01(\tR\x03url\"\xaa\x02\n\x06Schema\x12V\n\x0bjson_schema\x18\x01 \x01(\x0b\x32\x35.grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaR\njsonSchema\x12$\n\rdiscriminator\x18\x02 \x01(\tR\rdiscriminator\x12\x1b\n\tread_only\x18\x03 \x01(\x08R\x08readOnly\x12\x65\n\rexternal_docs\x18\x05 \x01(\x0b\x32@.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationR\x0c\x65xternalDocs\x12\x18\n\x07\x65xample\x18\x06 \x01(\tR\x07\x65xampleJ\x04\x08\x04\x10\x05\"\xd7\n\n\nJSONSchema\x12\x10\n\x03ref\x18\x03 \x01(\tR\x03ref\x12\x14\n\x05title\x18\x05 \x01(\tR\x05title\x12 \n\x0b\x64\x65scription\x18\x06 \x01(\tR\x0b\x64\x65scription\x12\x18\n\x07\x64\x65\x66\x61ult\x18\x07 \x01(\tR\x07\x64\x65\x66\x61ult\x12\x1b\n\tread_only\x18\x08 \x01(\x08R\x08readOnly\x12\x18\n\x07\x65xample\x18\t \x01(\tR\x07\x65xample\x12\x1f\n\x0bmultiple_of\x18\n \x01(\x01R\nmultipleOf\x12\x18\n\x07maximum\x18\x0b \x01(\x01R\x07maximum\x12+\n\x11\x65xclusive_maximum\x18\x0c \x01(\x08R\x10\x65xclusiveMaximum\x12\x18\n\x07minimum\x18\r \x01(\x01R\x07minimum\x12+\n\x11\x65xclusive_minimum\x18\x0e \x01(\x08R\x10\x65xclusiveMinimum\x12\x1d\n\nmax_length\x18\x0f \x01(\x04R\tmaxLength\x12\x1d\n\nmin_length\x18\x10 \x01(\x04R\tminLength\x12\x18\n\x07pattern\x18\x11 \x01(\tR\x07pattern\x12\x1b\n\tmax_items\x18\x14 \x01(\x04R\x08maxItems\x12\x1b\n\tmin_items\x18\x15 \x01(\x04R\x08minItems\x12!\n\x0cunique_items\x18\x16 \x01(\x08R\x0buniqueItems\x12%\n\x0emax_properties\x18\x18 \x01(\x04R\rmaxProperties\x12%\n\x0emin_properties\x18\x19 \x01(\x04R\rminProperties\x12\x1a\n\x08required\x18\x1a \x03(\tR\x08required\x12\x14\n\x05\x61rray\x18\" \x03(\tR\x05\x61rray\x12_\n\x04type\x18# \x03(\x0e\x32K.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypesR\x04type\x12\x16\n\x06\x66ormat\x18$ \x01(\tR\x06\x66ormat\x12\x12\n\x04\x65num\x18. \x03(\tR\x04\x65num\x12z\n\x13\x66ield_configuration\x18\xe9\x07 \x01(\x0b\x32H.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationR\x12\x66ieldConfiguration\x12\x65\n\nextensions\x18\x30 \x03(\x0b\x32\x45.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntryR\nextensions\x1a<\n\x12\x46ieldConfiguration\x12&\n\x0fpath_param_name\x18/ \x01(\tR\rpathParamName\x1aU\n\x0f\x45xtensionsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.ValueR\x05value:\x02\x38\x01\"w\n\x15JSONSchemaSimpleTypes\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05\x41RRAY\x10\x01\x12\x0b\n\x07\x42OOLEAN\x10\x02\x12\x0b\n\x07INTEGER\x10\x03\x12\x08\n\x04NULL\x10\x04\x12\n\n\x06NUMBER\x10\x05\x12\n\n\x06OBJECT\x10\x06\x12\n\n\x06STRING\x10\x07J\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x04\x10\x05J\x04\x08\x12\x10\x13J\x04\x08\x13\x10\x14J\x04\x08\x17\x10\x18J\x04\x08\x1b\x10\x1cJ\x04\x08\x1c\x10\x1dJ\x04\x08\x1d\x10\x1eJ\x04\x08\x1e\x10\"J\x04\x08%\x10*J\x04\x08*\x10+J\x04\x08+\x10.\"\xd9\x02\n\x03Tag\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x02 \x01(\tR\x0b\x64\x65scription\x12\x65\n\rexternal_docs\x18\x03 \x01(\x0b\x32@.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationR\x0c\x65xternalDocs\x12^\n\nextensions\x18\x04 \x03(\x0b\x32>.grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntryR\nextensions\x1aU\n\x0f\x45xtensionsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.ValueR\x05value:\x02\x38\x01\"\xf7\x01\n\x13SecurityDefinitions\x12h\n\x08security\x18\x01 \x03(\x0b\x32L.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntryR\x08security\x1av\n\rSecurityEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12O\n\x05value\x18\x02 \x01(\x0b\x32\x39.grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeR\x05value:\x02\x38\x01\"\xff\x06\n\x0eSecurityScheme\x12R\n\x04type\x18\x01 \x01(\x0e\x32>.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.TypeR\x04type\x12 \n\x0b\x64\x65scription\x18\x02 \x01(\tR\x0b\x64\x65scription\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12L\n\x02in\x18\x04 \x01(\x0e\x32<.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.InR\x02in\x12R\n\x04\x66low\x18\x05 \x01(\x0e\x32>.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.FlowR\x04\x66low\x12+\n\x11\x61uthorization_url\x18\x06 \x01(\tR\x10\x61uthorizationUrl\x12\x1b\n\ttoken_url\x18\x07 \x01(\tR\x08tokenUrl\x12I\n\x06scopes\x18\x08 \x01(\x0b\x32\x31.grpc.gateway.protoc_gen_openapiv2.options.ScopesR\x06scopes\x12i\n\nextensions\x18\t \x03(\x0b\x32I.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntryR\nextensions\x1aU\n\x0f\x45xtensionsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.ValueR\x05value:\x02\x38\x01\"K\n\x04Type\x12\x10\n\x0cTYPE_INVALID\x10\x00\x12\x0e\n\nTYPE_BASIC\x10\x01\x12\x10\n\x0cTYPE_API_KEY\x10\x02\x12\x0f\n\x0bTYPE_OAUTH2\x10\x03\"1\n\x02In\x12\x0e\n\nIN_INVALID\x10\x00\x12\x0c\n\x08IN_QUERY\x10\x01\x12\r\n\tIN_HEADER\x10\x02\"j\n\x04\x46low\x12\x10\n\x0c\x46LOW_INVALID\x10\x00\x12\x11\n\rFLOW_IMPLICIT\x10\x01\x12\x11\n\rFLOW_PASSWORD\x10\x02\x12\x14\n\x10\x46LOW_APPLICATION\x10\x03\x12\x14\n\x10\x46LOW_ACCESS_CODE\x10\x04\"\xf6\x02\n\x13SecurityRequirement\x12\x8a\x01\n\x14security_requirement\x18\x01 \x03(\x0b\x32W.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntryR\x13securityRequirement\x1a\x30\n\x18SecurityRequirementValue\x12\x14\n\x05scope\x18\x01 \x03(\tR\x05scope\x1a\x9f\x01\n\x18SecurityRequirementEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12m\n\x05value\x18\x02 \x01(\x0b\x32W.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValueR\x05value:\x02\x38\x01\"\x96\x01\n\x06Scopes\x12R\n\x05scope\x18\x01 \x03(\x0b\x32<.grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntryR\x05scope\x1a\x38\n\nScopeEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01*;\n\x06Scheme\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\x12\x06\n\x02WS\x10\x03\x12\x07\n\x03WSS\x10\x04\x42HZFgithub.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/optionsb\x06proto3"
|
11
|
+
|
12
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
|
+
|
14
|
+
begin
|
15
|
+
pool.add_serialized_file(descriptor_data)
|
16
|
+
rescue TypeError => e
|
17
|
+
# Compatibility code: will be removed in the next major version.
|
18
|
+
require 'google/protobuf/descriptor_pb'
|
19
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
20
|
+
parsed.clear_dependency
|
21
|
+
serialized = parsed.class.encode(parsed)
|
22
|
+
file = pool.add_serialized_file(serialized)
|
23
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
24
|
+
imports = [
|
25
|
+
["google.protobuf.Value", "google/protobuf/struct.proto"],
|
26
|
+
]
|
27
|
+
imports.each do |type_name, expected_filename|
|
28
|
+
import_file = pool.lookup(type_name).file_descriptor
|
29
|
+
if import_file.name != expected_filename
|
30
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
168
31
|
end
|
169
32
|
end
|
33
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
34
|
+
warn "This will become an error in the next major version."
|
170
35
|
end
|
171
36
|
|
172
37
|
module Cerbos::Protobuf::Grpc
|
@@ -175,6 +40,9 @@ module Cerbos::Protobuf::Grpc
|
|
175
40
|
module Options
|
176
41
|
Swagger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.Swagger").msgclass
|
177
42
|
Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.Operation").msgclass
|
43
|
+
Parameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.Parameters").msgclass
|
44
|
+
HeaderParameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter").msgclass
|
45
|
+
HeaderParameter::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type").enummodule
|
178
46
|
Header = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.Header").msgclass
|
179
47
|
Response = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.Response").msgclass
|
180
48
|
Info = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.Info").msgclass
|
@@ -183,6 +51,7 @@ module Cerbos::Protobuf::Grpc
|
|
183
51
|
ExternalDocumentation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation").msgclass
|
184
52
|
Schema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.Schema").msgclass
|
185
53
|
JSONSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.JSONSchema").msgclass
|
54
|
+
JSONSchema::FieldConfiguration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration").msgclass
|
186
55
|
JSONSchema::JSONSchemaSimpleTypes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes").enummodule
|
187
56
|
Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.Tag").msgclass
|
188
57
|
SecurityDefinitions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions").msgclass
|