diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/defs.bzl b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/defs.bzl
index 4f90807..2cb1f22 100644
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/defs.bzl
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/defs.bzl
@@ -4,128 +4,165 @@
 Optionally applies settings from the grpc-service configuration.
 """
 
-def _collect_includes(gen_dir, srcs):
-    """Build an include path mapping.
+load("@rules_proto//proto:defs.bzl", "ProtoInfo")
 
-    It is important to not just collect unique dirnames, to also support
-    proto files of the same name from different packages.
+# TODO(yannic): Replace with |proto_common.direct_source_infos| when
+# https://github.com/bazelbuild/rules_proto/pull/22 lands.
+def _direct_source_infos(proto_info, provided_sources = []):
+    """Returns sequence of `ProtoFileInfo` for `proto_info`'s direct sources.
 
-    The implementation below is similar to what bazel does in its
-    ProtoCompileActionBuilder.java
+    Files that are both in `proto_info`'s direct sources and in
+    `provided_sources` are skipped. This is useful, e.g., for well-known
+    protos that are already provided by the Protobuf runtime.
+
+    Args:
+      proto_info: An instance of `ProtoInfo`.
+      provided_sources: Optional. A sequence of files to ignore.
+          Usually, these files are already provided by the
+          Protocol Buffer runtime (e.g. Well-Known protos).
+
+    Returns: A sequence of `ProtoFileInfo` containing information about
+        `proto_info`'s direct sources.
     """
-    includes = []
-    for src in srcs:
-        ref_path = src.path
 
-        if ref_path.startswith(gen_dir):
-            ref_path = ref_path[len(gen_dir):].lstrip("/")
+    source_root = proto_info.proto_source_root
+    if "." == source_root:
+        return [struct(file = src, import_path = src.path) for src in proto_info.direct_sources]
 
-        if src.owner.workspace_root:
-            workspace_root = src.owner.workspace_root
-            ref_path = ref_path[len(workspace_root):].lstrip("/")
+    offset = len(source_root) + 1  # + '/'.
 
-        include = ref_path + "=" + src.path
-        if include not in includes:
-            includes.append(include)
+    infos = []
+    for src in proto_info.direct_sources:
+        # TODO(yannic): Remove this hack when we drop support for Bazel < 1.0.
+        local_offset = offset
+        if src.root.path and not source_root.startswith(src.root.path):
+            # Before Bazel 1.0, `proto_source_root` wasn't guaranteed to be a
+            # prefix of `src.path`. This could happend, e.g., if `file` was
+            # generated (https://github.com/bazelbuild/bazel/issues/9215).
+            local_offset += len(src.root.path) + 1  # + '/'.
+        infos.append(struct(file = src, import_path = src.path[local_offset:]))
 
-    return includes
+    return infos
 
-def _run_proto_gen_swagger(ctx, direct_proto_srcs, transitive_proto_srcs, actions, protoc, protoc_gen_swagger, grpc_api_configuration, single_output):
-    swagger_files = []
+def _run_proto_gen_swagger(
+        actions,
+        proto_info,
+        target_name,
+        transitive_proto_srcs,
+        protoc,
+        protoc_gen_swagger,
+        grpc_api_configuration,
+        single_output,
+        json_names_for_fields):
+    args = actions.args()
 
-    inputs = direct_proto_srcs + transitive_proto_srcs
-    tools = [protoc_gen_swagger]
+    args.add("--plugin", "protoc-gen-swagger=%s" % protoc_gen_swagger.path)
 
-    options = ["logtostderr=true", "allow_repeated_fields_in_body=true"]
+    args.add("--swagger_opt", "logtostderr=true")
+    args.add("--swagger_opt", "allow_repeated_fields_in_body=true")
+
+    extra_inputs = []
     if grpc_api_configuration:
-        options.append("grpc_api_configuration=%s" % grpc_api_configuration.path)
-        inputs.append(grpc_api_configuration)
+        extra_inputs.append(grpc_api_configuration)
+        args.add("--swagger_opt", "grpc_api_configuration=%s" % grpc_api_configuration.path)
 
-    includes = _collect_includes(ctx.genfiles_dir.path, direct_proto_srcs + transitive_proto_srcs)
+    if json_names_for_fields:
+        args.add("--swagger_opt", "json_names_for_fields=true")
+
+    proto_file_infos = _direct_source_infos(proto_info)
+
+    # TODO(yannic): Use |proto_info.transitive_descriptor_sets| when
+    # https://github.com/bazelbuild/bazel/issues/9337 is fixed.
+    args.add_all(proto_info.transitive_proto_path, format_each = "--proto_path=%s")
 
     if single_output:
-        swagger_file = actions.declare_file(
-            "%s.swagger.json" % ctx.attr.name,
-            sibling = direct_proto_srcs[0],
-        )
-        output_dir = ctx.bin_dir.path
-        if direct_proto_srcs[0].owner.workspace_root:
-            output_dir = "/".join([output_dir, direct_proto_srcs[0].owner.workspace_root])
+        args.add("--swagger_opt", "allow_merge=true")
+        args.add("--swagger_opt", "merge_file_name=%s" % target_name)
 
-        output_dir = "/".join([output_dir, direct_proto_srcs[0].dirname])
+        swagger_file = actions.declare_file("%s.swagger.json" % target_name)
+        args.add("--swagger_out", swagger_file.dirname)
 
-        options.append("allow_merge=true")
-        options.append("merge_file_name=%s" % ctx.attr.name)
-
-        args = actions.args()
-        args.add("--plugin=%s" % protoc_gen_swagger.path)
-        args.add("--swagger_out=%s:%s" % (",".join(options), output_dir))
-        args.add_all(["-I%s" % include for include in includes])
-        args.add_all([src.path for src in direct_proto_srcs])
+        args.add_all([f.import_path for f in proto_file_infos])
 
         actions.run(
             executable = protoc,
-            inputs = inputs,
-            tools = tools,
+            tools = [protoc_gen_swagger],
+            inputs = depset(
+                direct = extra_inputs,
+                transitive = [transitive_proto_srcs],
+            ),
             outputs = [swagger_file],
             arguments = [args],
         )
 
+        return [swagger_file]
+
+    # TODO(yannic): We may be able to generate all files in a single action,
+    # but that will change at least the semantics of `use_go_template.proto`.
+    swagger_files = []
+    for proto_file_info in proto_file_infos:
+        # TODO(yannic): This probably doesn't work as expected: we only add this
+        # option after we have seen it, so `.proto` sources that happen to be
+        # in the list of `.proto` files before `use_go_template.proto` will be
+        # compiled without this option, and all sources that get compiled after
+        # `use_go_template.proto` will have this option on.
+        if proto_file_info.file.basename == "use_go_template.proto":
+            args.add("--swagger_opt", "use_go_templates=true")
+
+        file_name = "%s.swagger.json" % proto_file_info.import_path[:-len(".proto")]
+        swagger_file = actions.declare_file(
+            "_virtual_imports/%s/%s" % (target_name, file_name),
+        )
+
+        file_args = actions.args()
+
+        offset = len(file_name) + 1  # + '/'.
+        file_args.add("--swagger_out", swagger_file.path[:-offset])
+
+        file_args.add(proto_file_info.import_path)
+
+        actions.run(
+            executable = protoc,
+            tools = [protoc_gen_swagger],
+            inputs = depset(
+                direct = extra_inputs,
+                transitive = [transitive_proto_srcs],
+            ),
+            outputs = [swagger_file],
+            arguments = [args, file_args],
+        )
         swagger_files.append(swagger_file)
-    else:
-        for proto in direct_proto_srcs:
-            swagger_file = actions.declare_file(
-                "%s.swagger.json" % proto.basename[:-len(".proto")],
-                sibling = proto,
-            )
-
-            output_dir = ctx.bin_dir.path
-            if proto.owner.workspace_root:
-                output_dir = "/".join([output_dir, proto.owner.workspace_root])
-
-            args = actions.args()
-            args.add("--plugin=%s" % protoc_gen_swagger.path)
-            args.add("--swagger_out=%s:%s" % (",".join(options), output_dir))
-            args.add_all(["-I%s" % include for include in includes])
-            args.add(proto.path)
-
-            actions.run(
-                executable = protoc,
-                inputs = inputs,
-                tools = tools,
-                outputs = [swagger_file],
-                arguments = [args],
-            )
-
-            swagger_files.append(swagger_file)
 
     return swagger_files
 
 def _proto_gen_swagger_impl(ctx):
     proto = ctx.attr.proto[ProtoInfo]
-    grpc_api_configuration = ctx.file.grpc_api_configuration
-
-    return [DefaultInfo(
-        files = depset(
-            _run_proto_gen_swagger(
-                ctx,
-                direct_proto_srcs = proto.direct_sources,
-                transitive_proto_srcs = ctx.files._well_known_protos + proto.transitive_sources.to_list(),
-                actions = ctx.actions,
-                protoc = ctx.executable._protoc,
-                protoc_gen_swagger = ctx.executable._protoc_gen_swagger,
-                grpc_api_configuration = grpc_api_configuration,
-                single_output = ctx.attr.single_output,
+    return [
+        DefaultInfo(
+            files = depset(
+                _run_proto_gen_swagger(
+                    actions = ctx.actions,
+                    proto_info = proto,
+                    target_name = ctx.attr.name,
+                    transitive_proto_srcs = depset(
+                        direct = ctx.files._well_known_protos,
+                        transitive = [proto.transitive_sources],
+                    ),
+                    protoc = ctx.executable._protoc,
+                    protoc_gen_swagger = ctx.executable._protoc_gen_swagger,
+                    grpc_api_configuration = ctx.file.grpc_api_configuration,
+                    single_output = ctx.attr.single_output,
+                    json_names_for_fields = ctx.attr.json_names_for_fields,
+                ),
             ),
         ),
-    )]
+    ]
 
 protoc_gen_swagger = rule(
     attrs = {
         "proto": attr.label(
-            allow_rules = ["proto_library"],
             mandatory = True,
-            providers = ["proto"],
+            providers = [ProtoInfo],
         ),
         "grpc_api_configuration": attr.label(
             allow_single_file = True,
@@ -135,6 +172,10 @@
             default = False,
             mandatory = False,
         ),
+        "json_names_for_fields": attr.bool(
+            default = False,
+            mandatory = False,
+        ),
         "_protoc": attr.label(
             default = "@com_google_protobuf//:protoc",
             executable = True,
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/BUILD.bazel b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/BUILD.bazel
index 929d0cf..c89eb04 100644
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/BUILD.bazel
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/BUILD.bazel
@@ -7,6 +7,8 @@
     srcs = [
         "doc.go",
         "generator.go",
+        "helpers.go",
+        "helpers_go111_old.go",
         "template.go",
         "types.go",
     ],
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/generator.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/generator.go
index 31409ac..ecf1135 100644
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/generator.go
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/generator.go
@@ -52,9 +52,6 @@
 			for k, v := range f.swagger.Definitions {
 				mergedTarget.swagger.Definitions[k] = v
 			}
-			for k, v := range f.swagger.StreamDefinitions {
-				mergedTarget.swagger.StreamDefinitions[k] = v
-			}
 			for k, v := range f.swagger.Paths {
 				mergedTarget.swagger.Paths[k] = v
 			}
@@ -67,10 +64,6 @@
 	return mergedTarget
 }
 
-func fieldName(k string) string {
-	return strings.ReplaceAll(strings.Title(k), "-", "_")
-}
-
 // Q: What's up with the alias types here?
 // A: We don't want to completely override how these structs are marshaled into
 //    JSON, we only want to add fields (see below, extensionMarshalJSON).
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/helpers.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/helpers.go
new file mode 100644
index 0000000..3615596
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/helpers.go
@@ -0,0 +1,9 @@
+//+build go1.12
+
+package genswagger
+
+import "strings"
+
+func fieldName(k string) string {
+	return strings.ReplaceAll(strings.Title(k), "-", "_")
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/helpers_go111_old.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/helpers_go111_old.go
new file mode 100644
index 0000000..8e9458d
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/helpers_go111_old.go
@@ -0,0 +1,9 @@
+//+build !go1.12
+
+package genswagger
+
+import "strings"
+
+func fieldName(k string) string {
+	return strings.Replace(strings.Title(k), "-", "_", -1)
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/template.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/template.go
index 3d97207..1b9e14d 100644
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/template.go
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/template.go
@@ -1,8 +1,10 @@
 package genswagger
 
 import (
+	"bytes"
 	"encoding/json"
 	"fmt"
+	"io/ioutil"
 	"os"
 	"reflect"
 	"regexp"
@@ -10,13 +12,14 @@
 	"strconv"
 	"strings"
 	"sync"
+	"text/template"
 
 	"github.com/golang/glog"
 	"github.com/golang/protobuf/jsonpb"
 	"github.com/golang/protobuf/proto"
-	structpb "github.com/golang/protobuf/ptypes/struct"
 	pbdescriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
 	gogen "github.com/golang/protobuf/protoc-gen-go/generator"
+	structpb "github.com/golang/protobuf/ptypes/struct"
 	"github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/descriptor"
 	swagger_options "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
 )
@@ -122,7 +125,7 @@
 	fieldType := field.GetTypeName()
 	if message.File != nil {
 		comments := fieldProtoComments(reg, message, field)
-		if err := updateSwaggerDataFromComments(&schema, comments, false); err != nil {
+		if err := updateSwaggerDataFromComments(reg, &schema, message, comments, false); err != nil {
 			return nil, err
 		}
 	}
@@ -285,7 +288,7 @@
 			},
 		}
 		msgComments := protoComments(reg, msg.File, msg.Outers, "MessageType", int32(msg.Index))
-		if err := updateSwaggerDataFromComments(&schema, msgComments, false); err != nil {
+		if err := updateSwaggerDataFromComments(reg, &schema, msg, msgComments, false); err != nil {
 			panic(err)
 		}
 		opts, err := extractSchemaOptionFromMessageDescriptor(msg.DescriptorProto)
@@ -293,7 +296,7 @@
 			panic(err)
 		}
 		if opts != nil {
-			protoSchema := swaggerSchemaFromProtoSchema(opts, reg, customRefs)
+			protoSchema := swaggerSchemaFromProtoSchema(opts, reg, customRefs, msg)
 
 			// Warning: Make sure not to overwrite any fields already set on the schema type.
 			schema.ExternalDocs = protoSchema.ExternalDocs
@@ -330,7 +333,7 @@
 		for _, f := range msg.Fields {
 			fieldValue := schemaOfField(f, reg, customRefs)
 			comments := fieldProtoComments(reg, msg, f)
-			if err := updateSwaggerDataFromComments(&fieldValue, comments, false); err != nil {
+			if err := updateSwaggerDataFromComments(reg, &fieldValue, f, comments, false); err != nil {
 				panic(err)
 			}
 
@@ -349,42 +352,6 @@
 	}
 }
 
-func renderMessagesAsStreamDefinition(messages messageMap, d swaggerDefinitionsObject, reg *descriptor.Registry) {
-	for name, msg := range messages {
-		if skipRenderingRef(name) {
-			continue
-		}
-
-		if opt := msg.GetOptions(); opt != nil && opt.MapEntry != nil && *opt.MapEntry {
-			continue
-		}
-		d[fullyQualifiedNameToSwaggerName(msg.FQMN(), reg)] = swaggerSchemaObject{
-			schemaCore: schemaCore{
-				Type: "object",
-			},
-			Title: fmt.Sprintf("Stream result of %s", fullyQualifiedNameToSwaggerName(msg.FQMN(), reg)),
-			Properties: &swaggerSchemaObjectProperties{
-				keyVal{
-					Key: "result",
-					Value: swaggerSchemaObject{
-						schemaCore: schemaCore{
-							Ref: fmt.Sprintf("#/definitions/%s", fullyQualifiedNameToSwaggerName(msg.FQMN(), reg)),
-						},
-					},
-				},
-				keyVal{
-					Key: "error",
-					Value: swaggerSchemaObject{
-						schemaCore: schemaCore{
-							Ref: fmt.Sprintf("#/definitions/%s", fullyQualifiedNameToSwaggerName(".grpc.gateway.runtime.StreamError", reg)),
-						},
-					},
-				},
-			},
-		}
-	}
-}
-
 // schemaOfField returns a swagger Schema Object for a protobuf field.
 func schemaOfField(f *descriptor.Field, reg *descriptor.Registry, refs refMap) swaggerSchemaObject {
 	const (
@@ -461,7 +428,7 @@
 	}
 
 	if j, err := extractJSONSchemaFromFieldDescriptor(fd); err == nil {
-		updateSwaggerObjectFromJSONSchema(&ret, j)
+		updateSwaggerObjectFromJSONSchema(&ret, j, reg, f)
 	}
 
 	return ret
@@ -535,7 +502,7 @@
 				Default: defaultValue,
 			},
 		}
-		if err := updateSwaggerDataFromComments(&enumSchemaObject, enumComments, false); err != nil {
+		if err := updateSwaggerDataFromComments(reg, &enumSchemaObject, enum, enumComments, false); err != nil {
 			panic(err)
 		}
 
@@ -618,7 +585,7 @@
 var canRegexp = regexp.MustCompile("{([a-zA-Z][a-zA-Z0-9_.]*).*}")
 
 // Swagger expects paths of the form /path/{string_value} but grpc-gateway paths are expected to be of the form /path/{string_value=strprefix/*}. This should reformat it correctly.
-func templateToSwaggerPath(path string, reg *descriptor.Registry) string {
+func templateToSwaggerPath(path string, reg *descriptor.Registry, fields []*descriptor.Field) string {
 	// It seems like the right thing to do here is to just use
 	// strings.Split(path, "/") but that breaks badly when you hit a url like
 	// /{my_field=prefix/*}/ and end up with 2 sections representing my_field.
@@ -647,7 +614,7 @@
 			if reg.GetUseJSONNamesForFields() &&
 				len(jsonBuffer) > 1 {
 				jsonSnakeCaseName := string(jsonBuffer[1:])
-				jsonCamelCaseName := string(lowerCamelCase(jsonSnakeCaseName))
+				jsonCamelCaseName := string(lowerCamelCase(jsonSnakeCaseName, fields))
 				prev := string(buffer[:len(buffer)-len(jsonSnakeCaseName)-2])
 				buffer = strings.Join([]string{prev, "{", jsonCamelCaseName, "}"}, "")
 				jsonBuffer = ""
@@ -766,7 +733,7 @@
 					}
 					parameterString := parameter.String()
 					if reg.GetUseJSONNamesForFields() {
-						parameterString = lowerCamelCase(parameterString)
+						parameterString = lowerCamelCase(parameterString, meth.RequestType.Fields)
 					}
 					parameters = append(parameters, swaggerParameterObject{
 						Name:        parameterString,
@@ -833,7 +800,7 @@
 					parameters = append(parameters, queryParams...)
 				}
 
-				pathItemObject, ok := paths[templateToSwaggerPath(b.PathTmpl.Template, reg)]
+				pathItemObject, ok := paths[templateToSwaggerPath(b.PathTmpl.Template, reg, meth.RequestType.Fields)]
 				if !ok {
 					pathItemObject = swaggerPathItemObject{}
 				}
@@ -874,8 +841,26 @@
 				}
 				if meth.GetServerStreaming() {
 					desc += "(streaming responses)"
-					// Use the streamdefinition which wraps the message in a "result"
-					responseSchema.Ref = strings.Replace(responseSchema.Ref, `#/definitions/`, `#/x-stream-definitions/`, 1)
+					responseSchema.Type = "object"
+					responseSchema.Title = fmt.Sprintf("Stream result of %s", fullyQualifiedNameToSwaggerName(meth.ResponseType.FQMN(), reg))
+					responseSchema.Properties = &swaggerSchemaObjectProperties{
+						keyVal{
+							Key: "result",
+							Value: swaggerSchemaObject{
+								schemaCore: schemaCore{
+									Ref: responseSchema.Ref,
+								},
+							},
+						},
+						keyVal{
+							Key: "error",
+							Value: swaggerSchemaObject{
+								schemaCore: schemaCore{
+									Ref: fmt.Sprintf("#/definitions/%s", fullyQualifiedNameToSwaggerName(".grpc.gateway.runtime.StreamError", reg))},
+							},
+						},
+					}
+					responseSchema.Ref = ""
 				}
 
 				tag := svc.GetName()
@@ -907,8 +892,8 @@
 					}
 				}
 
-				methComments := protoComments(reg, svc.File, nil, "Method", int32(svcIdx), methProtoPath, int32(methIdx))
-				if err := updateSwaggerDataFromComments(operationObject, methComments, false); err != nil {
+				methComments := protoComments(reg, svc.File, nil, "Service", int32(svcIdx), methProtoPath, int32(methIdx))
+				if err := updateSwaggerDataFromComments(reg, operationObject, meth, methComments, false); err != nil {
 					panic(err)
 				}
 
@@ -917,7 +902,7 @@
 					if err != nil {
 						panic(err)
 					}
-					operationObject.ExternalDocs = protoExternalDocumentationToSwaggerExternalDocumentation(opts.ExternalDocs)
+					operationObject.ExternalDocs = protoExternalDocumentationToSwaggerExternalDocumentation(opts.ExternalDocs, reg, meth)
 					// TODO(ivucica): this would be better supported by looking whether the method is deprecated in the proto file
 					operationObject.Deprecated = opts.Deprecated
 
@@ -931,6 +916,9 @@
 						operationObject.Tags = make([]string, len(opts.Tags))
 						copy(operationObject.Tags, opts.Tags)
 					}
+					if opts.OperationId != "" {
+						operationObject.OperationID = opts.OperationId
+					}
 					if opts.Security != nil {
 						newSecurity := []swaggerSecurityRequirementObject{}
 						if operationObject.Security != nil {
@@ -958,7 +946,7 @@
 						for name, resp := range opts.Responses {
 							respObj := swaggerResponseObject{
 								Description: resp.Description,
-								Schema:      swaggerSchemaFromProtoSchema(resp.Schema, reg, customRefs),
+								Schema:      swaggerSchemaFromProtoSchema(resp.Schema, reg, customRefs, meth),
 							}
 							if resp.Extensions != nil {
 								exts, err := processExtensions(resp.Extensions)
@@ -999,7 +987,7 @@
 					pathItemObject.Patch = operationObject
 					break
 				}
-				paths[templateToSwaggerPath(b.PathTmpl.Template, reg)] = pathItemObject
+				paths[templateToSwaggerPath(b.PathTmpl.Template, reg, meth.RequestType.Fields)] = pathItemObject
 			}
 		}
 	}
@@ -1014,13 +1002,11 @@
 	// defined off of.
 	s := swaggerObject{
 		// Swagger 2.0 is the version of this document
-		Swagger:           "2.0",
-		Schemes:           []string{"http", "https"},
-		Consumes:          []string{"application/json"},
-		Produces:          []string{"application/json"},
-		Paths:             make(swaggerPathsObject),
-		Definitions:       make(swaggerDefinitionsObject),
-		StreamDefinitions: make(swaggerDefinitionsObject),
+		Swagger:     "2.0",
+		Consumes:    []string{"application/json"},
+		Produces:    []string{"application/json"},
+		Paths:       make(swaggerPathsObject),
+		Definitions: make(swaggerDefinitionsObject),
 		Info: swaggerInfoObject{
 			Title:   *p.File.Name,
 			Version: "version not set",
@@ -1042,13 +1028,12 @@
 	e := enumMap{}
 	findServicesMessagesAndEnumerations(p.Services, p.reg, m, ms, e, requestResponseRefs)
 	renderMessagesAsDefinition(m, s.Definitions, p.reg, customRefs)
-	renderMessagesAsStreamDefinition(ms, s.StreamDefinitions, p.reg)
 	renderEnumerationsAsDefinition(e, s.Definitions, p.reg)
 
 	// File itself might have some comments and metadata.
 	packageProtoPath := protoPathIndex(reflect.TypeOf((*pbdescriptor.FileDescriptorProto)(nil)), "Package")
 	packageComments := protoComments(p.reg, p.File, nil, "Package", packageProtoPath)
-	if err := updateSwaggerDataFromComments(&s, packageComments, true); err != nil {
+	if err := updateSwaggerDataFromComments(p.reg, &s, p, packageComments, true); err != nil {
 		panic(err)
 	}
 
@@ -1216,7 +1201,7 @@
 			}
 			s.Security = newSecurity
 		}
-		s.ExternalDocs = protoExternalDocumentationToSwaggerExternalDocumentation(spb.ExternalDocs)
+		s.ExternalDocs = protoExternalDocumentationToSwaggerExternalDocumentation(spb.ExternalDocs, p.reg, spb)
 		// Populate all Paths with Responses set at top level,
 		// preferring Responses already set over those at the top level.
 		if spb.Responses != nil {
@@ -1246,7 +1231,7 @@
 						}
 						respMap[k] = swaggerResponseObject{
 							Description: v.Description,
-							Schema:      swaggerSchemaFromProtoSchema(v.Schema, p.reg, customRefs),
+							Schema:      swaggerSchemaFromProtoSchema(v.Schema, p.reg, customRefs, nil),
 						}
 					}
 				}
@@ -1300,11 +1285,16 @@
 //
 // If there is no 'Summary', the same behavior will be attempted on 'Title',
 // but only if the last character is not a period.
-func updateSwaggerDataFromComments(swaggerObject interface{}, comment string, isPackageObject bool) error {
+func updateSwaggerDataFromComments(reg *descriptor.Registry, swaggerObject interface{}, data interface{}, comment string, isPackageObject bool) error {
 	if len(comment) == 0 {
 		return nil
 	}
 
+	// Checks whether the "use_go_templates" flag is set to true
+	if reg.GetUseGoTemplate() {
+		comment = goTemplateComments(comment, data, reg)
+	}
+
 	// Figure out what to apply changes to.
 	swaggerObjectValue := reflect.ValueOf(swaggerObject)
 	infoObjectValue := swaggerObjectValue.Elem().FieldByName("Info")
@@ -1435,6 +1425,37 @@
 	return ""
 }
 
+func goTemplateComments(comment string, data interface{}, reg *descriptor.Registry) string {
+	var temp bytes.Buffer
+	tpl, err := template.New("").Funcs(template.FuncMap{
+		// Allows importing documentation from a file
+		"import": func(name string) string {
+			file, err := ioutil.ReadFile(name)
+			if err != nil {
+				return err.Error()
+			}
+			// Runs template over imported file
+			return goTemplateComments(string(file), data, reg)
+		},
+		// Grabs title and description from a field
+		"fieldcomments": func(msg *descriptor.Message, field *descriptor.Field) string {
+			return strings.Replace(fieldProtoComments(reg, msg, field), "\n", "<br>", -1)
+		},
+	}).Parse(comment)
+	if err != nil {
+		// If there is an error parsing the templating insert the error as string in the comment
+		// to make it easier to debug the template error
+		return err.Error()
+	}
+	err = tpl.Execute(&temp, data)
+	if err != nil {
+		// If there is an error executing the templating insert the error as string in the comment
+		// to make it easier to debug the error
+		return err.Error()
+	}
+	return temp.String()
+}
+
 var messageProtoPath = protoPathIndex(reflect.TypeOf((*pbdescriptor.FileDescriptorProto)(nil)), "MessageType")
 var nestedProtoPath = protoPathIndex(reflect.TypeOf((*pbdescriptor.DescriptorProto)(nil)), "NestedType")
 var packageProtoPath = protoPathIndex(reflect.TypeOf((*pbdescriptor.FileDescriptorProto)(nil)), "Package")
@@ -1638,9 +1659,14 @@
 	return ret
 }
 
-func updateSwaggerObjectFromJSONSchema(s *swaggerSchemaObject, j *swagger_options.JSONSchema) {
+func updateSwaggerObjectFromJSONSchema(s *swaggerSchemaObject, j *swagger_options.JSONSchema, reg *descriptor.Registry, data interface{}) {
 	s.Title = j.GetTitle()
 	s.Description = j.GetDescription()
+	if reg.GetUseGoTemplate() {
+		s.Title = goTemplateComments(s.Title, data, reg)
+		s.Description = goTemplateComments(s.Description, data, reg)
+	}
+
 	s.ReadOnly = j.GetReadOnly()
 	s.MultipleOf = j.GetMultipleOf()
 	s.Maximum = j.GetMaximum()
@@ -1662,13 +1688,13 @@
 	}
 }
 
-func swaggerSchemaFromProtoSchema(s *swagger_options.Schema, reg *descriptor.Registry, refs refMap) swaggerSchemaObject {
+func swaggerSchemaFromProtoSchema(s *swagger_options.Schema, reg *descriptor.Registry, refs refMap, data interface{}) swaggerSchemaObject {
 	ret := swaggerSchemaObject{
-		ExternalDocs: protoExternalDocumentationToSwaggerExternalDocumentation(s.GetExternalDocs()),
+		ExternalDocs: protoExternalDocumentationToSwaggerExternalDocumentation(s.GetExternalDocs(), reg, data),
 	}
 
 	ret.schemaCore = protoJSONSchemaToSwaggerSchemaCore(s.GetJsonSchema(), reg, refs)
-	updateSwaggerObjectFromJSONSchema(&ret, s.GetJsonSchema())
+	updateSwaggerObjectFromJSONSchema(&ret, s.GetJsonSchema(), reg, data)
 
 	if s != nil && s.Example != nil {
 		ret.Example = json.RawMessage(s.Example.Value)
@@ -1712,11 +1738,15 @@
 	}
 }
 
-func protoExternalDocumentationToSwaggerExternalDocumentation(in *swagger_options.ExternalDocumentation) *swaggerExternalDocumentationObject {
+func protoExternalDocumentationToSwaggerExternalDocumentation(in *swagger_options.ExternalDocumentation, reg *descriptor.Registry, data interface{}) *swaggerExternalDocumentationObject {
 	if in == nil {
 		return nil
 	}
 
+	if reg.GetUseGoTemplate() {
+		in.Description = goTemplateComments(in.Description, data, reg)
+	}
+
 	return &swaggerExternalDocumentationObject{
 		Description: in.Description,
 		URL:         in.Url,
@@ -1755,8 +1785,13 @@
 	addCustomRefs(d, reg, refs)
 }
 
-func lowerCamelCase(parameter string) string {
-	parameterString := gogen.CamelCase(parameter)
+func lowerCamelCase(fieldName string, fields []*descriptor.Field) string {
+	for _, oneField := range fields {
+		if oneField.GetName() == fieldName {
+			return oneField.GetJsonName()
+		}
+	}
+	parameterString := gogen.CamelCase(fieldName)
 	builder := &strings.Builder{}
 	builder.WriteString(strings.ToLower(string(parameterString[0])))
 	builder.WriteString(parameterString[1:])
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/types.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/types.go
index 77db96d..5765706 100644
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/types.go
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/types.go
@@ -59,12 +59,11 @@
 	Info                swaggerInfoObject                   `json:"info"`
 	Host                string                              `json:"host,omitempty"`
 	BasePath            string                              `json:"basePath,omitempty"`
-	Schemes             []string                            `json:"schemes"`
+	Schemes             []string                            `json:"schemes,omitempty"`
 	Consumes            []string                            `json:"consumes"`
 	Produces            []string                            `json:"produces"`
 	Paths               swaggerPathsObject                  `json:"paths"`
 	Definitions         swaggerDefinitionsObject            `json:"definitions"`
-	StreamDefinitions   swaggerDefinitionsObject            `json:"x-stream-definitions,omitempty"`
 	SecurityDefinitions swaggerSecurityDefinitionsObject    `json:"securityDefinitions,omitempty"`
 	Security            []swaggerSecurityRequirementObject  `json:"security,omitempty"`
 	ExternalDocs        *swaggerExternalDocumentationObject `json:"externalDocs,omitempty"`
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/main.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/main.go
index 237e460..9befc25 100644
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/main.go
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/main.go
@@ -27,6 +27,7 @@
 	allowRepeatedFieldsInBody  = flag.Bool("allow_repeated_fields_in_body", false, "allows to use repeated field in `body` and `response_body` field of `google.api.http` annotation option")
 	includePackageInTags       = flag.Bool("include_package_in_tags", false, "if unset, the gRPC service name is added to the `Tags` field of each operation. if set and the `package` directive is shown in the proto file, the package name will be prepended to the service name")
 	useFQNForSwaggerName       = flag.Bool("fqn_for_swagger_name", false, "if set, the object's swagger names will use the fully qualify name from the proto definition (ie my.package.MyMessage.MyInnerMessage")
+	useGoTemplate              = flag.Bool("use_go_templates", false, "if set, you can use Go templates in protofile comments")
 )
 
 // Variables set by goreleaser at build time
@@ -78,6 +79,7 @@
 	reg.SetAllowRepeatedFieldsInBody(*allowRepeatedFieldsInBody)
 	reg.SetIncludePackageInTags(*includePackageInTags)
 	reg.SetUseFQNForSwaggerName(*useFQNForSwaggerName)
+	reg.SetUseGoTemplate(*useGoTemplate)
 	if err := reg.SetRepeatedPathParamSeparator(*repeatedPathParamSeparator); err != nil {
 		emitError(err)
 		return
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/BUILD.bazel b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/BUILD.bazel
index 8dea43d..464a56d 100644
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/BUILD.bazel
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/BUILD.bazel
@@ -1,3 +1,4 @@
+load("@rules_proto//proto:defs.bzl", "proto_library")
 load("@io_bazel_rules_go//go:def.bzl", "go_library")
 load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
 
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/annotations.pb.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/annotations.pb.go
index 9fc282b..6514002 100644
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/annotations.pb.go
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/annotations.pb.go
@@ -1,12 +1,14 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: protoc-gen-swagger/options/annotations.proto
 
-package options // import "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
+package options
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -17,14 +19,14 @@
 // 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
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 var E_Openapiv2Swagger = &proto.ExtensionDesc{
 	ExtendedType:  (*descriptor.FileOptions)(nil),
 	ExtensionType: (*Swagger)(nil),
 	Field:         1042,
 	Name:          "grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger",
-	Tag:           "bytes,1042,opt,name=openapiv2_swagger,json=openapiv2Swagger",
+	Tag:           "bytes,1042,opt,name=openapiv2_swagger",
 	Filename:      "protoc-gen-swagger/options/annotations.proto",
 }
 
@@ -33,7 +35,7 @@
 	ExtensionType: (*Operation)(nil),
 	Field:         1042,
 	Name:          "grpc.gateway.protoc_gen_swagger.options.openapiv2_operation",
-	Tag:           "bytes,1042,opt,name=openapiv2_operation,json=openapiv2Operation",
+	Tag:           "bytes,1042,opt,name=openapiv2_operation",
 	Filename:      "protoc-gen-swagger/options/annotations.proto",
 }
 
@@ -42,7 +44,7 @@
 	ExtensionType: (*Schema)(nil),
 	Field:         1042,
 	Name:          "grpc.gateway.protoc_gen_swagger.options.openapiv2_schema",
-	Tag:           "bytes,1042,opt,name=openapiv2_schema,json=openapiv2Schema",
+	Tag:           "bytes,1042,opt,name=openapiv2_schema",
 	Filename:      "protoc-gen-swagger/options/annotations.proto",
 }
 
@@ -51,7 +53,7 @@
 	ExtensionType: (*Tag)(nil),
 	Field:         1042,
 	Name:          "grpc.gateway.protoc_gen_swagger.options.openapiv2_tag",
-	Tag:           "bytes,1042,opt,name=openapiv2_tag,json=openapiv2Tag",
+	Tag:           "bytes,1042,opt,name=openapiv2_tag",
 	Filename:      "protoc-gen-swagger/options/annotations.proto",
 }
 
@@ -60,7 +62,7 @@
 	ExtensionType: (*JSONSchema)(nil),
 	Field:         1042,
 	Name:          "grpc.gateway.protoc_gen_swagger.options.openapiv2_field",
-	Tag:           "bytes,1042,opt,name=openapiv2_field,json=openapiv2Field",
+	Tag:           "bytes,1042,opt,name=openapiv2_field",
 	Filename:      "protoc-gen-swagger/options/annotations.proto",
 }
 
@@ -73,31 +75,31 @@
 }
 
 func init() {
-	proto.RegisterFile("protoc-gen-swagger/options/annotations.proto", fileDescriptor_annotations_8378bd63c2853a5a)
+	proto.RegisterFile("protoc-gen-swagger/options/annotations.proto", fileDescriptor_a6a34ca6badab664)
 }
 
-var fileDescriptor_annotations_8378bd63c2853a5a = []byte{
+var fileDescriptor_a6a34ca6badab664 = []byte{
 	// 346 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4f, 0x4f, 0xea, 0x40,
 	0x14, 0xc5, 0xc3, 0xe6, 0xe5, 0xa5, 0xef, 0xa9, 0x58, 0x37, 0x86, 0xf8, 0x87, 0x9d, 0xc6, 0xc0,
 	0x8c, 0x81, 0x5d, 0x77, 0x6a, 0xe2, 0xc2, 0x44, 0x49, 0x0a, 0x2b, 0x37, 0x64, 0x18, 0x2e, 0x97,
 	0x49, 0x4a, 0xef, 0x64, 0x66, 0x80, 0x90, 0xb0, 0xf4, 0x13, 0xf8, 0x89, 0x8d, 0xd3, 0xd2, 0x9a,
-	0x8a, 0xa6, 0xbb, 0xde, 0xdb, 0x39, 0xe7, 0x77, 0x7a, 0x3a, 0x41, 0x47, 0x1b, 0x72, 0x24, 0xbb,
+	0x8a, 0xa6, 0xbb, 0xce, 0xe9, 0xbd, 0xe7, 0x77, 0x7a, 0x3a, 0x41, 0x47, 0x1b, 0x72, 0x24, 0xbb,
 	0x08, 0x69, 0xd7, 0xae, 0x05, 0x22, 0x18, 0x4e, 0xda, 0x29, 0x4a, 0x2d, 0x17, 0x69, 0x4a, 0x4e,
-	0xf8, 0x67, 0xe6, 0x8f, 0x85, 0x57, 0x68, 0xb4, 0x64, 0x28, 0x1c, 0xac, 0xc5, 0x26, 0xdb, 0xc9,
-	0x31, 0x42, 0x3a, 0xce, 0xa5, 0x2c, 0x97, 0xb6, 0x6e, 0x7e, 0xb1, 0x25, 0x0d, 0xa9, 0xd0, 0x6a,
-	0xd5, 0xcb, 0x0c, 0x5a, 0x6d, 0x24, 0xc2, 0x04, 0xb8, 0x9f, 0x26, 0xcb, 0x19, 0x9f, 0x82, 0x95,
-	0x46, 0x69, 0x47, 0x26, 0x3b, 0x11, 0x6d, 0x83, 0xe3, 0x42, 0xb4, 0x43, 0x85, 0x67, 0x2c, 0xd3,
-	0xb1, 0x9d, 0x8e, 0x3d, 0xaa, 0x04, 0x06, 0x19, 0xe4, 0xf4, 0xfd, 0x6f, 0xbb, 0x71, 0xfd, 0xaf,
-	0x77, 0xcb, 0x6a, 0x26, 0x66, 0xc3, 0x6c, 0x8e, 0x9b, 0x05, 0x29, 0xdf, 0x44, 0x6f, 0x8d, 0xe0,
+	0xf8, 0x67, 0xe6, 0xc7, 0xc2, 0x2b, 0x34, 0x5a, 0x32, 0x14, 0x0e, 0xd6, 0x62, 0x93, 0x69, 0x72,
+	0x8c, 0x90, 0x8e, 0xf3, 0x55, 0x96, 0xaf, 0xb6, 0xda, 0x48, 0x84, 0x09, 0x70, 0x3f, 0x32, 0x59,
+	0xce, 0xf8, 0x14, 0xac, 0x34, 0x4a, 0x3b, 0x32, 0xd9, 0x5a, 0xeb, 0xe6, 0x17, 0x30, 0x69, 0x48,
+	0x85, 0x56, 0xab, 0x5e, 0x36, 0x1b, 0x6d, 0x83, 0xe3, 0x42, 0xda, 0xa1, 0xc2, 0x33, 0x96, 0x31,
+	0xd8, 0x8e, 0xc1, 0x1e, 0x55, 0x02, 0x83, 0xcc, 0xe2, 0xf4, 0xfd, 0x6f, 0xbb, 0x71, 0xfd, 0xaf,
+	0x77, 0xcb, 0x6a, 0x26, 0x66, 0xc3, 0xec, 0x1c, 0x37, 0x0b, 0x52, 0xae, 0x44, 0x6f, 0x8d, 0xe0,
 	0xa4, 0xc4, 0x93, 0x06, 0xe3, 0x3b, 0x09, 0x2f, 0xbe, 0x05, 0x78, 0x06, 0x37, 0xa7, 0x69, 0x25,
-	0x42, 0xaf, 0x76, 0x84, 0xc1, 0xce, 0x3a, 0x0e, 0x0b, 0x5e, 0xb1, 0x8b, 0xb6, 0x41, 0xf3, 0x4b,
-	0x09, 0x72, 0x0e, 0x0b, 0x11, 0x5e, 0xee, 0x89, 0x60, 0xad, 0xc0, 0x6a, 0x0d, 0xbc, 0x7e, 0x0d,
-	0xde, 0x38, 0x3e, 0x2a, 0x5b, 0xf0, 0x8b, 0xc8, 0x06, 0x07, 0x25, 0xdd, 0x09, 0xdc, 0x83, 0x1e,
-	0x82, 0x59, 0x29, 0x59, 0x45, 0x77, 0x6a, 0xa3, 0x47, 0x02, 0xe3, 0xff, 0x05, 0x64, 0x24, 0x30,
-	0xda, 0x06, 0x65, 0x8e, 0xf1, 0x4c, 0x41, 0x32, 0x0d, 0xcf, 0xf7, 0xfc, 0x75, 0x48, 0xaa, 0x9d,
-	0xf7, 0x6b, 0x43, 0x9f, 0x86, 0x83, 0x97, 0xfc, 0x9b, 0x0f, 0x0b, 0x96, 0xb7, 0xbc, 0x7f, 0x78,
-	0xbd, 0x43, 0xe5, 0xe6, 0xcb, 0x09, 0x93, 0xb4, 0xe0, 0x9f, 0x86, 0x5d, 0x90, 0x64, 0x37, 0xd6,
-	0x41, 0x3e, 0xe6, 0xfe, 0xfc, 0xe7, 0xcb, 0x3e, 0xf9, 0xe3, 0xdf, 0xf5, 0x3f, 0x02, 0x00, 0x00,
-	0xff, 0xff, 0x4b, 0xc4, 0x41, 0xfb, 0x68, 0x03, 0x00, 0x00,
+	0x42, 0xaf, 0x76, 0x84, 0xc1, 0xce, 0x3a, 0x0e, 0x0b, 0x5e, 0xa1, 0x45, 0xdb, 0xa0, 0xf9, 0xa5,
+	0x04, 0x39, 0x87, 0x85, 0x08, 0x2f, 0xf7, 0x44, 0xb0, 0x56, 0x60, 0xb5, 0x06, 0x5e, 0xbf, 0x06,
+	0x6f, 0x1c, 0x1f, 0x95, 0x2d, 0x78, 0x21, 0xb2, 0xc1, 0x41, 0x49, 0x77, 0x02, 0xf7, 0xa0, 0x87,
+	0x60, 0x56, 0x4a, 0x56, 0xd1, 0x9d, 0xda, 0xe8, 0x91, 0xc0, 0xf8, 0x7f, 0x01, 0x19, 0x09, 0x8c,
+	0xb6, 0x41, 0x99, 0x63, 0x3c, 0x53, 0x90, 0x4c, 0xc3, 0xf3, 0x3d, 0x7f, 0x1d, 0x92, 0x6a, 0xe7,
+	0xfd, 0xda, 0xd0, 0xa7, 0xe1, 0xe0, 0x25, 0xff, 0xe6, 0xc3, 0x82, 0xe5, 0x2d, 0xef, 0x1f, 0x5e,
+	0xef, 0x50, 0xb9, 0xf9, 0x72, 0xc2, 0x24, 0x2d, 0xf8, 0xa7, 0x61, 0x17, 0x24, 0xd9, 0x8d, 0x75,
+	0x90, 0x1f, 0x73, 0x7f, 0xfe, 0xf3, 0x55, 0x9e, 0xfc, 0xf1, 0xef, 0xfa, 0x1f, 0x01, 0x00, 0x00,
+	0xff, 0xff, 0x59, 0x78, 0xb0, 0x03, 0x68, 0x03, 0x00, 0x00,
 }
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/annotations.proto b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/annotations.proto
index 2c0f594..5151fd5 100644
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/annotations.proto
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/annotations.proto
@@ -4,8 +4,8 @@
 
 option go_package = "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options";
 
-import "protoc-gen-swagger/options/openapiv2.proto";
 import "google/protobuf/descriptor.proto";
+import "protoc-gen-swagger/options/openapiv2.proto";
 
 extend google.protobuf.FileOptions {
   // ID assigned by protobuf-global-extension-registry@google.com for grpc-gateway project.
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/openapiv2.pb.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/openapiv2.pb.go
index 6720071..727ca52 100644
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/openapiv2.pb.go
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/openapiv2.pb.go
@@ -1,13 +1,15 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // source: protoc-gen-swagger/options/openapiv2.proto
 
-package options // import "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
+package options
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import any "github.com/golang/protobuf/ptypes/any"
-import _struct "github.com/golang/protobuf/ptypes/struct"
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	any "github.com/golang/protobuf/ptypes/any"
+	_struct "github.com/golang/protobuf/ptypes/struct"
+	math "math"
+)
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
@@ -18,7 +20,7 @@
 // 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
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
 type Swagger_SwaggerScheme int32
 
@@ -37,6 +39,7 @@
 	3: "WS",
 	4: "WSS",
 }
+
 var Swagger_SwaggerScheme_value = map[string]int32{
 	"UNKNOWN": 0,
 	"HTTP":    1,
@@ -48,8 +51,9 @@
 func (x Swagger_SwaggerScheme) String() string {
 	return proto.EnumName(Swagger_SwaggerScheme_name, int32(x))
 }
+
 func (Swagger_SwaggerScheme) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{0, 0}
+	return fileDescriptor_ba35ad8af024fb48, []int{0, 0}
 }
 
 type JSONSchema_JSONSchemaSimpleTypes int32
@@ -75,6 +79,7 @@
 	6: "OBJECT",
 	7: "STRING",
 }
+
 var JSONSchema_JSONSchemaSimpleTypes_value = map[string]int32{
 	"UNKNOWN": 0,
 	"ARRAY":   1,
@@ -89,8 +94,9 @@
 func (x JSONSchema_JSONSchemaSimpleTypes) String() string {
 	return proto.EnumName(JSONSchema_JSONSchemaSimpleTypes_name, int32(x))
 }
+
 func (JSONSchema_JSONSchemaSimpleTypes) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{8, 0}
+	return fileDescriptor_ba35ad8af024fb48, []int{8, 0}
 }
 
 // Required. The type of the security scheme. Valid values are "basic",
@@ -110,6 +116,7 @@
 	2: "TYPE_API_KEY",
 	3: "TYPE_OAUTH2",
 }
+
 var SecurityScheme_Type_value = map[string]int32{
 	"TYPE_INVALID": 0,
 	"TYPE_BASIC":   1,
@@ -120,8 +127,9 @@
 func (x SecurityScheme_Type) String() string {
 	return proto.EnumName(SecurityScheme_Type_name, int32(x))
 }
+
 func (SecurityScheme_Type) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{11, 0}
+	return fileDescriptor_ba35ad8af024fb48, []int{11, 0}
 }
 
 // Required. The location of the API key. Valid values are "query" or "header".
@@ -138,6 +146,7 @@
 	1: "IN_QUERY",
 	2: "IN_HEADER",
 }
+
 var SecurityScheme_In_value = map[string]int32{
 	"IN_INVALID": 0,
 	"IN_QUERY":   1,
@@ -147,8 +156,9 @@
 func (x SecurityScheme_In) String() string {
 	return proto.EnumName(SecurityScheme_In_name, int32(x))
 }
+
 func (SecurityScheme_In) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{11, 1}
+	return fileDescriptor_ba35ad8af024fb48, []int{11, 1}
 }
 
 // Required. The flow used by the OAuth2 security scheme. Valid values are
@@ -170,6 +180,7 @@
 	3: "FLOW_APPLICATION",
 	4: "FLOW_ACCESS_CODE",
 }
+
 var SecurityScheme_Flow_value = map[string]int32{
 	"FLOW_INVALID":     0,
 	"FLOW_IMPLICIT":    1,
@@ -181,8 +192,9 @@
 func (x SecurityScheme_Flow) String() string {
 	return proto.EnumName(SecurityScheme_Flow_name, int32(x))
 }
+
 func (SecurityScheme_Flow) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{11, 2}
+	return fileDescriptor_ba35ad8af024fb48, []int{11, 2}
 }
 
 // `Swagger` is a representation of OpenAPI v2 specification's Swagger object.
@@ -218,16 +230,17 @@
 func (m *Swagger) String() string { return proto.CompactTextString(m) }
 func (*Swagger) ProtoMessage()    {}
 func (*Swagger) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{0}
+	return fileDescriptor_ba35ad8af024fb48, []int{0}
 }
+
 func (m *Swagger) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Swagger.Unmarshal(m, b)
 }
 func (m *Swagger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Swagger.Marshal(b, m, deterministic)
 }
-func (dst *Swagger) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Swagger.Merge(dst, src)
+func (m *Swagger) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Swagger.Merge(m, src)
 }
 func (m *Swagger) XXX_Size() int {
 	return xxx_messageInfo_Swagger.Size(m)
@@ -349,16 +362,17 @@
 func (m *Operation) String() string { return proto.CompactTextString(m) }
 func (*Operation) ProtoMessage()    {}
 func (*Operation) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{1}
+	return fileDescriptor_ba35ad8af024fb48, []int{1}
 }
+
 func (m *Operation) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Operation.Unmarshal(m, b)
 }
 func (m *Operation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Operation.Marshal(b, m, deterministic)
 }
-func (dst *Operation) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Operation.Merge(dst, src)
+func (m *Operation) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Operation.Merge(m, src)
 }
 func (m *Operation) XXX_Size() int {
 	return xxx_messageInfo_Operation.Size(m)
@@ -474,16 +488,17 @@
 func (m *Response) String() string { return proto.CompactTextString(m) }
 func (*Response) ProtoMessage()    {}
 func (*Response) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{2}
+	return fileDescriptor_ba35ad8af024fb48, []int{2}
 }
+
 func (m *Response) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Response.Unmarshal(m, b)
 }
 func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Response.Marshal(b, m, deterministic)
 }
-func (dst *Response) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Response.Merge(dst, src)
+func (m *Response) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Response.Merge(m, src)
 }
 func (m *Response) XXX_Size() int {
 	return xxx_messageInfo_Response.Size(m)
@@ -537,16 +552,17 @@
 func (m *Info) String() string { return proto.CompactTextString(m) }
 func (*Info) ProtoMessage()    {}
 func (*Info) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{3}
+	return fileDescriptor_ba35ad8af024fb48, []int{3}
 }
+
 func (m *Info) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Info.Unmarshal(m, b)
 }
 func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Info.Marshal(b, m, deterministic)
 }
-func (dst *Info) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Info.Merge(dst, src)
+func (m *Info) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Info.Merge(m, src)
 }
 func (m *Info) XXX_Size() int {
 	return xxx_messageInfo_Info.Size(m)
@@ -624,16 +640,17 @@
 func (m *Contact) String() string { return proto.CompactTextString(m) }
 func (*Contact) ProtoMessage()    {}
 func (*Contact) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{4}
+	return fileDescriptor_ba35ad8af024fb48, []int{4}
 }
+
 func (m *Contact) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Contact.Unmarshal(m, b)
 }
 func (m *Contact) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Contact.Marshal(b, m, deterministic)
 }
-func (dst *Contact) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Contact.Merge(dst, src)
+func (m *Contact) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Contact.Merge(m, src)
 }
 func (m *Contact) XXX_Size() int {
 	return xxx_messageInfo_Contact.Size(m)
@@ -683,16 +700,17 @@
 func (m *License) String() string { return proto.CompactTextString(m) }
 func (*License) ProtoMessage()    {}
 func (*License) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{5}
+	return fileDescriptor_ba35ad8af024fb48, []int{5}
 }
+
 func (m *License) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_License.Unmarshal(m, b)
 }
 func (m *License) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_License.Marshal(b, m, deterministic)
 }
-func (dst *License) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_License.Merge(dst, src)
+func (m *License) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_License.Merge(m, src)
 }
 func (m *License) XXX_Size() int {
 	return xxx_messageInfo_License.Size(m)
@@ -735,16 +753,17 @@
 func (m *ExternalDocumentation) String() string { return proto.CompactTextString(m) }
 func (*ExternalDocumentation) ProtoMessage()    {}
 func (*ExternalDocumentation) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{6}
+	return fileDescriptor_ba35ad8af024fb48, []int{6}
 }
+
 func (m *ExternalDocumentation) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_ExternalDocumentation.Unmarshal(m, b)
 }
 func (m *ExternalDocumentation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_ExternalDocumentation.Marshal(b, m, deterministic)
 }
-func (dst *ExternalDocumentation) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ExternalDocumentation.Merge(dst, src)
+func (m *ExternalDocumentation) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ExternalDocumentation.Merge(m, src)
 }
 func (m *ExternalDocumentation) XXX_Size() int {
 	return xxx_messageInfo_ExternalDocumentation.Size(m)
@@ -789,16 +808,17 @@
 func (m *Schema) String() string { return proto.CompactTextString(m) }
 func (*Schema) ProtoMessage()    {}
 func (*Schema) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{7}
+	return fileDescriptor_ba35ad8af024fb48, []int{7}
 }
+
 func (m *Schema) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Schema.Unmarshal(m, b)
 }
 func (m *Schema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Schema.Marshal(b, m, deterministic)
 }
-func (dst *Schema) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Schema.Merge(dst, src)
+func (m *Schema) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Schema.Merge(m, src)
 }
 func (m *Schema) XXX_Size() int {
 	return xxx_messageInfo_Schema.Size(m)
@@ -893,16 +913,17 @@
 func (m *JSONSchema) String() string { return proto.CompactTextString(m) }
 func (*JSONSchema) ProtoMessage()    {}
 func (*JSONSchema) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{8}
+	return fileDescriptor_ba35ad8af024fb48, []int{8}
 }
+
 func (m *JSONSchema) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_JSONSchema.Unmarshal(m, b)
 }
 func (m *JSONSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_JSONSchema.Marshal(b, m, deterministic)
 }
-func (dst *JSONSchema) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_JSONSchema.Merge(dst, src)
+func (m *JSONSchema) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_JSONSchema.Merge(m, src)
 }
 func (m *JSONSchema) XXX_Size() int {
 	return xxx_messageInfo_JSONSchema.Size(m)
@@ -1079,16 +1100,17 @@
 func (m *Tag) String() string { return proto.CompactTextString(m) }
 func (*Tag) ProtoMessage()    {}
 func (*Tag) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{9}
+	return fileDescriptor_ba35ad8af024fb48, []int{9}
 }
+
 func (m *Tag) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Tag.Unmarshal(m, b)
 }
 func (m *Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Tag.Marshal(b, m, deterministic)
 }
-func (dst *Tag) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Tag.Merge(dst, src)
+func (m *Tag) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Tag.Merge(m, src)
 }
 func (m *Tag) XXX_Size() int {
 	return xxx_messageInfo_Tag.Size(m)
@@ -1133,16 +1155,17 @@
 func (m *SecurityDefinitions) String() string { return proto.CompactTextString(m) }
 func (*SecurityDefinitions) ProtoMessage()    {}
 func (*SecurityDefinitions) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{10}
+	return fileDescriptor_ba35ad8af024fb48, []int{10}
 }
+
 func (m *SecurityDefinitions) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_SecurityDefinitions.Unmarshal(m, b)
 }
 func (m *SecurityDefinitions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_SecurityDefinitions.Marshal(b, m, deterministic)
 }
-func (dst *SecurityDefinitions) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SecurityDefinitions.Merge(dst, src)
+func (m *SecurityDefinitions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SecurityDefinitions.Merge(m, src)
 }
 func (m *SecurityDefinitions) XXX_Size() int {
 	return xxx_messageInfo_SecurityDefinitions.Size(m)
@@ -1212,16 +1235,17 @@
 func (m *SecurityScheme) String() string { return proto.CompactTextString(m) }
 func (*SecurityScheme) ProtoMessage()    {}
 func (*SecurityScheme) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{11}
+	return fileDescriptor_ba35ad8af024fb48, []int{11}
 }
+
 func (m *SecurityScheme) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_SecurityScheme.Unmarshal(m, b)
 }
 func (m *SecurityScheme) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_SecurityScheme.Marshal(b, m, deterministic)
 }
-func (dst *SecurityScheme) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SecurityScheme.Merge(dst, src)
+func (m *SecurityScheme) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SecurityScheme.Merge(m, src)
 }
 func (m *SecurityScheme) XXX_Size() int {
 	return xxx_messageInfo_SecurityScheme.Size(m)
@@ -1321,16 +1345,17 @@
 func (m *SecurityRequirement) String() string { return proto.CompactTextString(m) }
 func (*SecurityRequirement) ProtoMessage()    {}
 func (*SecurityRequirement) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{12}
+	return fileDescriptor_ba35ad8af024fb48, []int{12}
 }
+
 func (m *SecurityRequirement) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_SecurityRequirement.Unmarshal(m, b)
 }
 func (m *SecurityRequirement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_SecurityRequirement.Marshal(b, m, deterministic)
 }
-func (dst *SecurityRequirement) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SecurityRequirement.Merge(dst, src)
+func (m *SecurityRequirement) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SecurityRequirement.Merge(m, src)
 }
 func (m *SecurityRequirement) XXX_Size() int {
 	return xxx_messageInfo_SecurityRequirement.Size(m)
@@ -1366,16 +1391,17 @@
 }
 func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage() {}
 func (*SecurityRequirement_SecurityRequirementValue) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{12, 0}
+	return fileDescriptor_ba35ad8af024fb48, []int{12, 0}
 }
+
 func (m *SecurityRequirement_SecurityRequirementValue) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_SecurityRequirement_SecurityRequirementValue.Unmarshal(m, b)
 }
 func (m *SecurityRequirement_SecurityRequirementValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_SecurityRequirement_SecurityRequirementValue.Marshal(b, m, deterministic)
 }
-func (dst *SecurityRequirement_SecurityRequirementValue) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SecurityRequirement_SecurityRequirementValue.Merge(dst, src)
+func (m *SecurityRequirement_SecurityRequirementValue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SecurityRequirement_SecurityRequirementValue.Merge(m, src)
 }
 func (m *SecurityRequirement_SecurityRequirementValue) XXX_Size() int {
 	return xxx_messageInfo_SecurityRequirement_SecurityRequirementValue.Size(m)
@@ -1411,16 +1437,17 @@
 func (m *Scopes) String() string { return proto.CompactTextString(m) }
 func (*Scopes) ProtoMessage()    {}
 func (*Scopes) Descriptor() ([]byte, []int) {
-	return fileDescriptor_openapiv2_7182f700aabb5117, []int{13}
+	return fileDescriptor_ba35ad8af024fb48, []int{13}
 }
+
 func (m *Scopes) XXX_Unmarshal(b []byte) error {
 	return xxx_messageInfo_Scopes.Unmarshal(m, b)
 }
 func (m *Scopes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
 	return xxx_messageInfo_Scopes.Marshal(b, m, deterministic)
 }
-func (dst *Scopes) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Scopes.Merge(dst, src)
+func (m *Scopes) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Scopes.Merge(m, src)
 }
 func (m *Scopes) XXX_Size() int {
 	return xxx_messageInfo_Scopes.Size(m)
@@ -1439,6 +1466,11 @@
 }
 
 func init() {
+	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)
 	proto.RegisterType((*Swagger)(nil), "grpc.gateway.protoc_gen_swagger.options.Swagger")
 	proto.RegisterMapType((map[string]*_struct.Value)(nil), "grpc.gateway.protoc_gen_swagger.options.Swagger.ExtensionsEntry")
 	proto.RegisterMapType((map[string]*Response)(nil), "grpc.gateway.protoc_gen_swagger.options.Swagger.ResponsesEntry")
@@ -1464,18 +1496,13 @@
 	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.RegisterMapType((map[string]string)(nil), "grpc.gateway.protoc_gen_swagger.options.Scopes.ScopeEntry")
-	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", fileDescriptor_openapiv2_7182f700aabb5117)
+	proto.RegisterFile("protoc-gen-swagger/options/openapiv2.proto", fileDescriptor_ba35ad8af024fb48)
 }
 
-var fileDescriptor_openapiv2_7182f700aabb5117 = []byte{
+var fileDescriptor_ba35ad8af024fb48 = []byte{
 	// 1884 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x5b, 0x73, 0xdb, 0xc6,
 	0xf5, 0x0f, 0x48, 0x90, 0x04, 0x0f, 0x45, 0x7a, 0xbd, 0x96, 0xf3, 0x47, 0x18, 0xdb, 0x7f, 0x85,
