options

package
v2.25.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: BSD-3-Clause Imports: 5 Imported by: 2,073

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Scheme_name = map[int32]string{
		0: "UNKNOWN",
		1: "HTTP",
		2: "HTTPS",
		3: "WS",
		4: "WSS",
	}
	Scheme_value = map[string]int32{
		"UNKNOWN": 0,
		"HTTP":    1,
		"HTTPS":   2,
		"WS":      3,
		"WSS":     4,
	}
)

Enum value maps for Scheme.

View Source
var (
	HeaderParameter_Type_name = map[int32]string{
		0: "UNKNOWN",
		1: "STRING",
		2: "NUMBER",
		3: "INTEGER",
		4: "BOOLEAN",
	}
	HeaderParameter_Type_value = map[string]int32{
		"UNKNOWN": 0,
		"STRING":  1,
		"NUMBER":  2,
		"INTEGER": 3,
		"BOOLEAN": 4,
	}
)

Enum value maps for HeaderParameter_Type.

View Source
var (
	JSONSchema_JSONSchemaSimpleTypes_name = map[int32]string{
		0: "UNKNOWN",
		1: "ARRAY",
		2: "BOOLEAN",
		3: "INTEGER",
		4: "NULL",
		5: "NUMBER",
		6: "OBJECT",
		7: "STRING",
	}
	JSONSchema_JSONSchemaSimpleTypes_value = map[string]int32{
		"UNKNOWN": 0,
		"ARRAY":   1,
		"BOOLEAN": 2,
		"INTEGER": 3,
		"NULL":    4,
		"NUMBER":  5,
		"OBJECT":  6,
		"STRING":  7,
	}
)

Enum value maps for JSONSchema_JSONSchemaSimpleTypes.

View Source
var (
	SecurityScheme_Type_name = map[int32]string{
		0: "TYPE_INVALID",
		1: "TYPE_BASIC",
		2: "TYPE_API_KEY",
		3: "TYPE_OAUTH2",
	}
	SecurityScheme_Type_value = map[string]int32{
		"TYPE_INVALID": 0,
		"TYPE_BASIC":   1,
		"TYPE_API_KEY": 2,
		"TYPE_OAUTH2":  3,
	}
)

Enum value maps for SecurityScheme_Type.

View Source
var (
	SecurityScheme_In_name = map[int32]string{
		0: "IN_INVALID",
		1: "IN_QUERY",
		2: "IN_HEADER",
	}
	SecurityScheme_In_value = map[string]int32{
		"IN_INVALID": 0,
		"IN_QUERY":   1,
		"IN_HEADER":  2,
	}
)

Enum value maps for SecurityScheme_In.

View Source
var (
	SecurityScheme_Flow_name = map[int32]string{
		0: "FLOW_INVALID",
		1: "FLOW_IMPLICIT",
		2: "FLOW_PASSWORD",
		3: "FLOW_APPLICATION",
		4: "FLOW_ACCESS_CODE",
	}
	SecurityScheme_Flow_value = map[string]int32{
		"FLOW_INVALID":     0,
		"FLOW_IMPLICIT":    1,
		"FLOW_PASSWORD":    2,
		"FLOW_APPLICATION": 3,
		"FLOW_ACCESS_CODE": 4,
	}
)

Enum value maps for SecurityScheme_Flow.

View Source
var (
	// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
	//
	// All IDs are the same, as assigned. It is okay that they are the same, as they extend
	// different descriptor messages.
	//
	// optional grpc.gateway.protoc_gen_openapiv2.options.EnumSchema openapiv2_enum = 1042;
	E_Openapiv2Enum = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[3]
)

Extension fields to descriptorpb.EnumOptions.

View Source
var (
	// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
	//
	// All IDs are the same, as assigned. It is okay that they are the same, as they extend
	// different descriptor messages.
	//
	// optional grpc.gateway.protoc_gen_openapiv2.options.JSONSchema openapiv2_field = 1042;
	E_Openapiv2Field = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[5]
)

Extension fields to descriptorpb.FieldOptions.

View Source
var (
	// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
	//
	// All IDs are the same, as assigned. It is okay that they are the same, as they extend
	// different descriptor messages.
	//
	// optional grpc.gateway.protoc_gen_openapiv2.options.Operation openapiv2_operation = 1042;
	E_Openapiv2Operation = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[1]
)

Extension fields to descriptorpb.MethodOptions.

View Source
var (
	// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
	//
	// All IDs are the same, as assigned. It is okay that they are the same, as they extend
	// different descriptor messages.
	//
	// optional grpc.gateway.protoc_gen_openapiv2.options.Schema openapiv2_schema = 1042;
	E_Openapiv2Schema = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[2]
)

Extension fields to descriptorpb.MessageOptions.

View Source
var (
	// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
	//
	// All IDs are the same, as assigned. It is okay that they are the same, as they extend
	// different descriptor messages.
	//
	// optional grpc.gateway.protoc_gen_openapiv2.options.Swagger openapiv2_swagger = 1042;
	E_Openapiv2Swagger = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[0]
)

Extension fields to descriptorpb.FileOptions.

View Source
var (
	// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
	//
	// All IDs are the same, as assigned. It is okay that they are the same, as they extend
	// different descriptor messages.
	//
	// optional grpc.gateway.protoc_gen_openapiv2.options.Tag openapiv2_tag = 1042;
	E_Openapiv2Tag = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[4]
)

Extension fields to descriptorpb.ServiceOptions.

View Source
var File_protoc_gen_openapiv2_options_annotations_proto protoreflect.FileDescriptor
View Source
var File_protoc_gen_openapiv2_options_openapiv2_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Contact

type Contact struct {

	// The identifying name of the contact person/organization.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The URL pointing to the contact information. MUST be in the format of a
	// URL.
	Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	// The email address of the contact person/organization. MUST be in the format
	// of an email address.
	Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

`Contact` is a representation of OpenAPI v2 specification's Contact object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject

Example:

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
  info: {
    ...
    contact: {
      name: "gRPC-Gateway project";
      url: "https://github.com/grpc-ecosystem/grpc-gateway";
      email: "none@example.com";
    };
    ...
  };
  ...
};

func (*Contact) GetEmail

func (x *Contact) GetEmail() string

func (*Contact) GetName

func (x *Contact) GetName() string

func (*Contact) GetUrl

func (x *Contact) GetUrl() string

func (*Contact) ProtoMessage

func (*Contact) ProtoMessage()

func (*Contact) ProtoReflect

func (x *Contact) ProtoReflect() protoreflect.Message

func (*Contact) Reset

func (x *Contact) Reset()

func (*Contact) SetEmail added in v2.25.1

func (x *Contact) SetEmail(v string)

func (*Contact) SetName added in v2.25.1

func (x *Contact) SetName(v string)

func (*Contact) SetUrl added in v2.25.1

func (x *Contact) SetUrl(v string)

func (*Contact) String

func (x *Contact) String() string

type Contact_builder added in v2.25.1

type Contact_builder struct {

	// The identifying name of the contact person/organization.
	Name string
	// The URL pointing to the contact information. MUST be in the format of a
	// URL.
	Url string
	// The email address of the contact person/organization. MUST be in the format
	// of an email address.
	Email string
	// contains filtered or unexported fields
}

func (Contact_builder) Build added in v2.25.1

func (b0 Contact_builder) Build() *Contact

type EnumSchema added in v2.25.0

type EnumSchema struct {

	// A short description of the schema.
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	Default     string `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
	// The title of the schema.
	Title    string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	Required bool   `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"`
	ReadOnly bool   `protobuf:"varint,5,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
	// Additional external documentation for this schema.
	ExternalDocs *ExternalDocumentation `protobuf:"bytes,6,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
	Example      string                 `protobuf:"bytes,7,opt,name=example,proto3" json:"example,omitempty"`
	// Ref is used to define an external reference to include in the message.
	// This could be a fully qualified proto message reference, and that type must
	// be imported into the protofile. If no message is identified, the Ref will
	// be used verbatim in the output.
	// For example:
	//
	//	`ref: ".google.protobuf.Timestamp"`.
	Ref string `protobuf:"bytes,8,opt,name=ref,proto3" json:"ref,omitempty"`
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

`EnumSchema` is subset of fields from the OpenAPI v2 specification's Schema object. Only fields that are applicable to Enums are included See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject

Example:

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum) = {
  ...
  title: "MyEnum";
  description:"This is my nice enum";
  example: "ZERO";
  required: true;
  ...
};

func (*EnumSchema) ClearExternalDocs added in v2.25.1

func (x *EnumSchema) ClearExternalDocs()

func (*EnumSchema) GetDefault added in v2.25.0

func (x *EnumSchema) GetDefault() string

func (*EnumSchema) GetDescription added in v2.25.0

func (x *EnumSchema) GetDescription() string

func (*EnumSchema) GetExample added in v2.25.0

func (x *EnumSchema) GetExample() string

func (*EnumSchema) GetExtensions added in v2.25.0

func (x *EnumSchema) GetExtensions() map[string]*structpb.Value

func (*EnumSchema) GetExternalDocs added in v2.25.0

func (x *EnumSchema) GetExternalDocs() *ExternalDocumentation

func (*EnumSchema) GetReadOnly added in v2.25.0

func (x *EnumSchema) GetReadOnly() bool

func (*EnumSchema) GetRef added in v2.25.0

func (x *EnumSchema) GetRef() string

func (*EnumSchema) GetRequired added in v2.25.0

func (x *EnumSchema) GetRequired() bool

func (*EnumSchema) GetTitle added in v2.25.0

func (x *EnumSchema) GetTitle() string

func (*EnumSchema) HasExternalDocs added in v2.25.1

func (x *EnumSchema) HasExternalDocs() bool

func (*EnumSchema) ProtoMessage added in v2.25.0

func (*EnumSchema) ProtoMessage()

func (*EnumSchema) ProtoReflect added in v2.25.0

func (x *EnumSchema) ProtoReflect() protoreflect.Message

func (*EnumSchema) Reset added in v2.25.0

func (x *EnumSchema) Reset()

func (*EnumSchema) SetDefault added in v2.25.1

func (x *EnumSchema) SetDefault(v string)

func (*EnumSchema) SetDescription added in v2.25.1

func (x *EnumSchema) SetDescription(v string)

func (*EnumSchema) SetExample added in v2.25.1

func (x *EnumSchema) SetExample(v string)

func (*EnumSchema) SetExtensions added in v2.25.1

func (x *EnumSchema) SetExtensions(v map[string]*structpb.Value)

func (*EnumSchema) SetExternalDocs added in v2.25.1

func (x *EnumSchema) SetExternalDocs(v *ExternalDocumentation)

func (*EnumSchema) SetReadOnly added in v2.25.1

func (x *EnumSchema) SetReadOnly(v bool)

func (*EnumSchema) SetRef added in v2.25.1

func (x *EnumSchema) SetRef(v string)

func (*EnumSchema) SetRequired added in v2.25.1

func (x *EnumSchema) SetRequired(v bool)

func (*EnumSchema) SetTitle added in v2.25.1

func (x *EnumSchema) SetTitle(v string)

func (*EnumSchema) String added in v2.25.0

func (x *EnumSchema) String() string

type EnumSchema_builder added in v2.25.1

type EnumSchema_builder struct {

	// A short description of the schema.
	Description string
	Default     string
	// The title of the schema.
	Title    string
	Required bool
	ReadOnly bool
	// Additional external documentation for this schema.
	ExternalDocs *ExternalDocumentation
	Example      string
	// Ref is used to define an external reference to include in the message.
	// This could be a fully qualified proto message reference, and that type must
	// be imported into the protofile. If no message is identified, the Ref will
	// be used verbatim in the output.
	// For example:
	//
	//	`ref: ".google.protobuf.Timestamp"`.
	Ref string
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value
	// contains filtered or unexported fields
}

func (EnumSchema_builder) Build added in v2.25.1

func (b0 EnumSchema_builder) Build() *EnumSchema

type ExternalDocumentation

type ExternalDocumentation struct {

	// A short description of the target documentation. GFM syntax can be used for
	// rich text representation.
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	// The URL for the target documentation. Value MUST be in the format
	// of a URL.
	Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

`ExternalDocumentation` is a representation of OpenAPI v2 specification's ExternalDocumentation object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject

Example:

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
  ...
  external_docs: {
    description: "More about gRPC-Gateway";
    url: "https://github.com/grpc-ecosystem/grpc-gateway";
  }
  ...
};

func (*ExternalDocumentation) GetDescription

func (x *ExternalDocumentation) GetDescription() string

func (*ExternalDocumentation) GetUrl

func (x *ExternalDocumentation) GetUrl() string

func (*ExternalDocumentation) ProtoMessage

func (*ExternalDocumentation) ProtoMessage()

func (*ExternalDocumentation) ProtoReflect

func (x *ExternalDocumentation) ProtoReflect() protoreflect.Message

func (*ExternalDocumentation) Reset

func (x *ExternalDocumentation) Reset()

func (*ExternalDocumentation) SetDescription added in v2.25.1

func (x *ExternalDocumentation) SetDescription(v string)

func (*ExternalDocumentation) SetUrl added in v2.25.1

func (x *ExternalDocumentation) SetUrl(v string)

func (*ExternalDocumentation) String

func (x *ExternalDocumentation) String() string

type ExternalDocumentation_builder added in v2.25.1

type ExternalDocumentation_builder struct {

	// A short description of the target documentation. GFM syntax can be used for
	// rich text representation.
	Description string
	// The URL for the target documentation. Value MUST be in the format
	// of a URL.
	Url string
	// contains filtered or unexported fields
}

func (ExternalDocumentation_builder) Build added in v2.25.1

type Header struct {

	// `Description` is a short description of the header.
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	// The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// `Format` The extending format for the previously mentioned type.
	Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"`
	// `Default` Declares the value of the header that the server will use if none is provided.
	// See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
	// Unlike JSON Schema this value MUST conform to the defined type for the header.
	Default string `protobuf:"bytes,6,opt,name=default,proto3" json:"default,omitempty"`
	// 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
	Pattern string `protobuf:"bytes,13,opt,name=pattern,proto3" json:"pattern,omitempty"`
	// contains filtered or unexported fields
}

`Header` is a representation of OpenAPI v2 specification's Header object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject

func (*Header) GetDefault added in v2.1.0

func (x *Header) GetDefault() string

func (*Header) GetDescription added in v2.1.0

func (x *Header) GetDescription() string

func (*Header) GetFormat added in v2.1.0

func (x *Header) GetFormat() string

func (*Header) GetPattern added in v2.1.0

func (x *Header) GetPattern() string

func (*Header) GetType added in v2.1.0

func (x *Header) GetType() string

func (*Header) ProtoMessage added in v2.1.0

func (*Header) ProtoMessage()

func (*Header) ProtoReflect added in v2.1.0

func (x *Header) ProtoReflect() protoreflect.Message

func (*Header) Reset added in v2.1.0

func (x *Header) Reset()

func (*Header) SetDefault added in v2.25.1

func (x *Header) SetDefault(v string)

func (*Header) SetDescription added in v2.25.1

func (x *Header) SetDescription(v string)

func (*Header) SetFormat added in v2.25.1

func (x *Header) SetFormat(v string)

func (*Header) SetPattern added in v2.25.1

func (x *Header) SetPattern(v string)

func (*Header) SetType added in v2.25.1

func (x *Header) SetType(v string)

func (*Header) String added in v2.1.0

func (x *Header) String() string

type HeaderParameter added in v2.14.0

type HeaderParameter struct {

	// `Name` is the header name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// `Description` is a short description of the header.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
	// See: https://swagger.io/specification/v2/#parameterType.
	Type HeaderParameter_Type `` /* 130-byte string literal not displayed */
	// `Format` The extending format for the previously mentioned type.
	Format string `protobuf:"bytes,4,opt,name=format,proto3" json:"format,omitempty"`
	// `Required` indicates if the header is optional
	Required bool `protobuf:"varint,5,opt,name=required,proto3" json:"required,omitempty"`
	// contains filtered or unexported fields
}

`HeaderParameter` a HTTP header parameter. See: https://swagger.io/specification/v2/#parameter-object

func (*HeaderParameter) GetDescription added in v2.14.0

func (x *HeaderParameter) GetDescription() string

func (*HeaderParameter) GetFormat added in v2.14.0

func (x *HeaderParameter) GetFormat() string

func (*HeaderParameter) GetName added in v2.14.0

func (x *HeaderParameter) GetName() string

func (*HeaderParameter) GetRequired added in v2.14.0

func (x *HeaderParameter) GetRequired() bool

func (*HeaderParameter) GetType added in v2.14.0

func (*HeaderParameter) ProtoMessage added in v2.14.0

func (*HeaderParameter) ProtoMessage()

func (*HeaderParameter) ProtoReflect added in v2.14.0

func (x *HeaderParameter) ProtoReflect() protoreflect.Message

func (*HeaderParameter) Reset added in v2.14.0

func (x *HeaderParameter) Reset()

func (*HeaderParameter) SetDescription added in v2.25.1

func (x *HeaderParameter) SetDescription(v string)

func (*HeaderParameter) SetFormat added in v2.25.1

func (x *HeaderParameter) SetFormat(v string)

func (*HeaderParameter) SetName added in v2.25.1

func (x *HeaderParameter) SetName(v string)

func (*HeaderParameter) SetRequired added in v2.25.1

func (x *HeaderParameter) SetRequired(v bool)

func (*HeaderParameter) SetType added in v2.25.1

func (x *HeaderParameter) SetType(v HeaderParameter_Type)

func (*HeaderParameter) String added in v2.14.0

func (x *HeaderParameter) String() string

type HeaderParameter_Type added in v2.14.0

type HeaderParameter_Type int32

`Type` is a supported HTTP header type. See https://swagger.io/specification/v2/#parameterType.

const (
	HeaderParameter_UNKNOWN HeaderParameter_Type = 0
	HeaderParameter_STRING  HeaderParameter_Type = 1
	HeaderParameter_NUMBER  HeaderParameter_Type = 2
	HeaderParameter_INTEGER HeaderParameter_Type = 3
	HeaderParameter_BOOLEAN HeaderParameter_Type = 4
)

func (HeaderParameter_Type) Descriptor added in v2.14.0

func (HeaderParameter_Type) Enum added in v2.14.0

func (HeaderParameter_Type) Number added in v2.14.0

func (HeaderParameter_Type) String added in v2.14.0

func (x HeaderParameter_Type) String() string

func (HeaderParameter_Type) Type added in v2.14.0

type HeaderParameter_builder added in v2.25.1

type HeaderParameter_builder struct {

	// `Name` is the header name.
	Name string
	// `Description` is a short description of the header.
	Description string
	// `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
	// See: https://swagger.io/specification/v2/#parameterType.
	Type HeaderParameter_Type
	// `Format` The extending format for the previously mentioned type.
	Format string
	// `Required` indicates if the header is optional
	Required bool
	// contains filtered or unexported fields
}

func (HeaderParameter_builder) Build added in v2.25.1

type Header_builder added in v2.25.1

type Header_builder struct {

	// `Description` is a short description of the header.
	Description string
	// The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
	Type string
	// `Format` The extending format for the previously mentioned type.
	Format string
	// `Default` Declares the value of the header that the server will use if none is provided.
	// See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
	// Unlike JSON Schema this value MUST conform to the defined type for the header.
	Default string
	// 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
	Pattern string
	// contains filtered or unexported fields
}

func (Header_builder) Build added in v2.25.1

func (b0 Header_builder) Build() *Header

type Info

type Info struct {

	// The title of the application.
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// A short description of the application. GFM syntax can be used for rich
	// text representation.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// The Terms of Service for the API.
	TermsOfService string `protobuf:"bytes,3,opt,name=terms_of_service,json=termsOfService,proto3" json:"terms_of_service,omitempty"`
	// The contact information for the exposed API.
	Contact *Contact `protobuf:"bytes,4,opt,name=contact,proto3" json:"contact,omitempty"`
	// The license information for the exposed API.
	License *License `protobuf:"bytes,5,opt,name=license,proto3" json:"license,omitempty"`
	// Provides the version of the application API (not to be confused
	// with the specification version).
	Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

`Info` is a representation of OpenAPI v2 specification's Info object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject

Example:

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
  info: {
    title: "Echo API";
    version: "1.0";
    description: "";
    contact: {
      name: "gRPC-Gateway project";
      url: "https://github.com/grpc-ecosystem/grpc-gateway";
      email: "none@example.com";
    };
    license: {
      name: "BSD 3-Clause License";
      url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
    };
  };
  ...
};

func (*Info) ClearContact added in v2.25.1

func (x *Info) ClearContact()

func (*Info) ClearLicense added in v2.25.1

func (x *Info) ClearLicense()

func (*Info) GetContact

func (x *Info) GetContact() *Contact

func (*Info) GetDescription

func (x *Info) GetDescription() string

func (*Info) GetExtensions

func (x *Info) GetExtensions() map[string]*structpb.Value

func (*Info) GetLicense

func (x *Info) GetLicense() *License

func (*Info) GetTermsOfService

func (x *Info) GetTermsOfService() string

func (*Info) GetTitle

func (x *Info) GetTitle() string

func (*Info) GetVersion

func (x *Info) GetVersion() string

func (*Info) HasContact added in v2.25.1

func (x *Info) HasContact() bool

func (*Info) HasLicense added in v2.25.1

func (x *Info) HasLicense() bool

func (*Info) ProtoMessage

func (*Info) ProtoMessage()

func (*Info) ProtoReflect

func (x *Info) ProtoReflect() protoreflect.Message

func (*Info) Reset

func (x *Info) Reset()

func (*Info) SetContact added in v2.25.1

func (x *Info) SetContact(v *Contact)

func (*Info) SetDescription added in v2.25.1

func (x *Info) SetDescription(v string)

func (*Info) SetExtensions added in v2.25.1

func (x *Info) SetExtensions(v map[string]*structpb.Value)

func (*Info) SetLicense added in v2.25.1

func (x *Info) SetLicense(v *License)

func (*Info) SetTermsOfService added in v2.25.1

func (x *Info) SetTermsOfService(v string)

func (*Info) SetTitle added in v2.25.1

func (x *Info) SetTitle(v string)

func (*Info) SetVersion added in v2.25.1

func (x *Info) SetVersion(v string)

func (*Info) String

func (x *Info) String() string

type Info_builder added in v2.25.1

type Info_builder struct {

	// The title of the application.
	Title string
	// A short description of the application. GFM syntax can be used for rich
	// text representation.
	Description string
	// The Terms of Service for the API.
	TermsOfService string
	// The contact information for the exposed API.
	Contact *Contact
	// The license information for the exposed API.
	License *License
	// Provides the version of the application API (not to be confused
	// with the specification version).
	Version string
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value
	// contains filtered or unexported fields
}

func (Info_builder) Build added in v2.25.1

func (b0 Info_builder) Build() *Info

type JSONSchema

type JSONSchema struct {

	// Ref is used to define an external reference to include in the message.
	// This could be a fully qualified proto message reference, and that type must
	// be imported into the protofile. If no message is identified, the Ref will
	// be used verbatim in the output.
	// For example:
	//
	//	`ref: ".google.protobuf.Timestamp"`.
	Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"`
	// The title of the schema.
	Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"`
	// A short description of the schema.
	Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
	Default     string `protobuf:"bytes,7,opt,name=default,proto3" json:"default,omitempty"`
	ReadOnly    bool   `protobuf:"varint,8,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
	// A free-form property to include a JSON example of this field. This is copied
	// verbatim to the output swagger.json. Quotes must be escaped.
	// This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
	Example    string  `protobuf:"bytes,9,opt,name=example,proto3" json:"example,omitempty"`
	MultipleOf float64 `protobuf:"fixed64,10,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"`
	// Maximum represents an inclusive upper limit for a numeric instance. The
	// value of MUST be a number,
	Maximum          float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"`
	ExclusiveMaximum bool    `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"`
	// minimum represents an inclusive lower limit for a numeric instance. The
	// value of MUST be a number,
	Minimum          float64  `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"`
	ExclusiveMinimum bool     `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"`
	MaxLength        uint64   `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"`
	MinLength        uint64   `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"`
	Pattern          string   `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"`
	MaxItems         uint64   `protobuf:"varint,20,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
	MinItems         uint64   `protobuf:"varint,21,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
	UniqueItems      bool     `protobuf:"varint,22,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"`
	MaxProperties    uint64   `protobuf:"varint,24,opt,name=max_properties,json=maxProperties,proto3" json:"max_properties,omitempty"`
	MinProperties    uint64   `protobuf:"varint,25,opt,name=min_properties,json=minProperties,proto3" json:"min_properties,omitempty"`
	Required         []string `protobuf:"bytes,26,rep,name=required,proto3" json:"required,omitempty"`
	// Items in 'array' must be unique.
	Array []string                           `protobuf:"bytes,34,rep,name=array,proto3" json:"array,omitempty"`
	Type  []JSONSchema_JSONSchemaSimpleTypes `` /* 150-byte string literal not displayed */
	// `Format`
	Format string `protobuf:"bytes,36,opt,name=format,proto3" json:"format,omitempty"`
	// Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
	Enum []string `protobuf:"bytes,46,rep,name=enum,proto3" json:"enum,omitempty"`
	// Additional field level properties used when generating the OpenAPI v2 file.
	FieldConfiguration *JSONSchema_FieldConfiguration `protobuf:"bytes,1001,opt,name=field_configuration,json=fieldConfiguration,proto3" json:"field_configuration,omitempty"`
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value `` /* 148-byte string literal not displayed */
	// contains filtered or unexported fields
}

`JSONSchema` represents properties from JSON Schema taken, and as used, in the OpenAPI v2 spec.

This includes changes made by OpenAPI v2.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject

See also: https://cswr.github.io/JsonSchema/spec/basic_types/, https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json

Example:

message SimpleMessage {
  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
    json_schema: {
      title: "SimpleMessage"
      description: "A simple message."
      required: ["id"]
    }
  };

  // Id represents the message identifier.
  string id = 1; [
      (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
        description: "The unique identifier of the simple message."
      }];
}

func (*JSONSchema) ClearFieldConfiguration added in v2.25.1

func (x *JSONSchema) ClearFieldConfiguration()

func (*JSONSchema) GetArray

func (x *JSONSchema) GetArray() []string

func (*JSONSchema) GetDefault

func (x *JSONSchema) GetDefault() string

func (*JSONSchema) GetDescription

func (x *JSONSchema) GetDescription() string

func (*JSONSchema) GetEnum added in v2.1.0

func (x *JSONSchema) GetEnum() []string

func (*JSONSchema) GetExample added in v2.1.0

func (x *JSONSchema) GetExample() string

func (*JSONSchema) GetExclusiveMaximum

func (x *JSONSchema) GetExclusiveMaximum() bool

func (*JSONSchema) GetExclusiveMinimum

func (x *JSONSchema) GetExclusiveMinimum() bool

func (*JSONSchema) GetExtensions added in v2.10.1

func (x *JSONSchema) GetExtensions() map[string]*structpb.Value

func (*JSONSchema) GetFieldConfiguration added in v2.10.0

func (x *JSONSchema) GetFieldConfiguration() *JSONSchema_FieldConfiguration

func (*JSONSchema) GetFormat added in v2.1.0

func (x *JSONSchema) GetFormat() string

func (*JSONSchema) GetMaxItems

func (x *JSONSchema) GetMaxItems() uint64

func (*JSONSchema) GetMaxLength

func (x *JSONSchema) GetMaxLength() uint64

func (*JSONSchema) GetMaxProperties

func (x *JSONSchema) GetMaxProperties() uint64

func (*JSONSchema) GetMaximum

func (x *JSONSchema) GetMaximum() float64

func (*JSONSchema) GetMinItems

func (x *JSONSchema) GetMinItems() uint64

func (*JSONSchema) GetMinLength

func (x *JSONSchema) GetMinLength() uint64

func (*JSONSchema) GetMinProperties

func (x *JSONSchema) GetMinProperties() uint64

func (*JSONSchema) GetMinimum

func (x *JSONSchema) GetMinimum() float64

func (*JSONSchema) GetMultipleOf

func (x *JSONSchema) GetMultipleOf() float64

func (*JSONSchema) GetPattern

func (x *JSONSchema) GetPattern() string

func (*JSONSchema) GetReadOnly

func (x *JSONSchema) GetReadOnly() bool

func (*JSONSchema) GetRef

func (x *JSONSchema) GetRef() string

func (*JSONSchema) GetRequired

func (x *JSONSchema) GetRequired() []string

func (*JSONSchema) GetTitle

func (x *JSONSchema) GetTitle() string

func (*JSONSchema) GetType

func (*JSONSchema) GetUniqueItems

func (x *JSONSchema) GetUniqueItems() bool

func (*JSONSchema) HasFieldConfiguration added in v2.25.1

func (x *JSONSchema) HasFieldConfiguration() bool

func (*JSONSchema) ProtoMessage

func (*JSONSchema) ProtoMessage()

func (*JSONSchema) ProtoReflect

func (x *JSONSchema) ProtoReflect() protoreflect.Message

func (*JSONSchema) Reset

func (x *JSONSchema) Reset()

func (*JSONSchema) SetArray added in v2.25.1

func (x *JSONSchema) SetArray(v []string)

func (*JSONSchema) SetDefault added in v2.25.1

func (x *JSONSchema) SetDefault(v string)

func (*JSONSchema) SetDescription added in v2.25.1

func (x *JSONSchema) SetDescription(v string)

func (*JSONSchema) SetEnum added in v2.25.1

func (x *JSONSchema) SetEnum(v []string)

func (*JSONSchema) SetExample added in v2.25.1

func (x *JSONSchema) SetExample(v string)

func (*JSONSchema) SetExclusiveMaximum added in v2.25.1

func (x *JSONSchema) SetExclusiveMaximum(v bool)

func (*JSONSchema) SetExclusiveMinimum added in v2.25.1

func (x *JSONSchema) SetExclusiveMinimum(v bool)

func (*JSONSchema) SetExtensions added in v2.25.1

func (x *JSONSchema) SetExtensions(v map[string]*structpb.Value)

func (*JSONSchema) SetFieldConfiguration added in v2.25.1

func (x *JSONSchema) SetFieldConfiguration(v *JSONSchema_FieldConfiguration)

func (*JSONSchema) SetFormat added in v2.25.1

func (x *JSONSchema) SetFormat(v string)

func (*JSONSchema) SetMaxItems added in v2.25.1

func (x *JSONSchema) SetMaxItems(v uint64)

func (*JSONSchema) SetMaxLength added in v2.25.1

func (x *JSONSchema) SetMaxLength(v uint64)

func (*JSONSchema) SetMaxProperties added in v2.25.1

func (x *JSONSchema) SetMaxProperties(v uint64)

func (*JSONSchema) SetMaximum added in v2.25.1

func (x *JSONSchema) SetMaximum(v float64)

func (*JSONSchema) SetMinItems added in v2.25.1

func (x *JSONSchema) SetMinItems(v uint64)

func (*JSONSchema) SetMinLength added in v2.25.1

func (x *JSONSchema) SetMinLength(v uint64)

func (*JSONSchema) SetMinProperties added in v2.25.1

func (x *JSONSchema) SetMinProperties(v uint64)

func (*JSONSchema) SetMinimum added in v2.25.1

func (x *JSONSchema) SetMinimum(v float64)

func (*JSONSchema) SetMultipleOf added in v2.25.1

func (x *JSONSchema) SetMultipleOf(v float64)

func (*JSONSchema) SetPattern added in v2.25.1

func (x *JSONSchema) SetPattern(v string)

func (*JSONSchema) SetReadOnly added in v2.25.1

func (x *JSONSchema) SetReadOnly(v bool)

func (*JSONSchema) SetRef added in v2.25.1

func (x *JSONSchema) SetRef(v string)

func (*JSONSchema) SetRequired added in v2.25.1

func (x *JSONSchema) SetRequired(v []string)

func (*JSONSchema) SetTitle added in v2.25.1

func (x *JSONSchema) SetTitle(v string)

func (*JSONSchema) SetType added in v2.25.1

func (*JSONSchema) SetUniqueItems added in v2.25.1

func (x *JSONSchema) SetUniqueItems(v bool)

func (*JSONSchema) String

func (x *JSONSchema) String() string

type JSONSchema_FieldConfiguration added in v2.10.0

type JSONSchema_FieldConfiguration struct {

	// Alternative parameter name when used as path parameter. If set, this will
	// be used as the complete parameter name when this field is used as a path
	// parameter. Use this to avoid having auto generated path parameter names
	// for overlapping paths.
	PathParamName string `protobuf:"bytes,47,opt,name=path_param_name,json=pathParamName,proto3" json:"path_param_name,omitempty"`
	// contains filtered or unexported fields
}

'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file. These properties are not defined by OpenAPIv2, but they are used to control the generation.

func (*JSONSchema_FieldConfiguration) GetPathParamName added in v2.10.0

func (x *JSONSchema_FieldConfiguration) GetPathParamName() string

func (*JSONSchema_FieldConfiguration) ProtoMessage added in v2.10.0

func (*JSONSchema_FieldConfiguration) ProtoMessage()

func (*JSONSchema_FieldConfiguration) ProtoReflect added in v2.10.0

func (*JSONSchema_FieldConfiguration) Reset added in v2.10.0

func (x *JSONSchema_FieldConfiguration) Reset()

func (*JSONSchema_FieldConfiguration) SetPathParamName added in v2.25.1

func (x *JSONSchema_FieldConfiguration) SetPathParamName(v string)

func (*JSONSchema_FieldConfiguration) String added in v2.10.0

type JSONSchema_FieldConfiguration_builder added in v2.25.1

type JSONSchema_FieldConfiguration_builder struct {

	// Alternative parameter name when used as path parameter. If set, this will
	// be used as the complete parameter name when this field is used as a path
	// parameter. Use this to avoid having auto generated path parameter names
	// for overlapping paths.
	PathParamName string
	// contains filtered or unexported fields
}

func (JSONSchema_FieldConfiguration_builder) Build added in v2.25.1

type JSONSchema_JSONSchemaSimpleTypes

type JSONSchema_JSONSchemaSimpleTypes int32
const (
	JSONSchema_UNKNOWN JSONSchema_JSONSchemaSimpleTypes = 0
	JSONSchema_ARRAY   JSONSchema_JSONSchemaSimpleTypes = 1
	JSONSchema_BOOLEAN JSONSchema_JSONSchemaSimpleTypes = 2
	JSONSchema_INTEGER JSONSchema_JSONSchemaSimpleTypes = 3
	JSONSchema_NULL    JSONSchema_JSONSchemaSimpleTypes = 4
	JSONSchema_NUMBER  JSONSchema_JSONSchemaSimpleTypes = 5
	JSONSchema_OBJECT  JSONSchema_JSONSchemaSimpleTypes = 6
	JSONSchema_STRING  JSONSchema_JSONSchemaSimpleTypes = 7
)

func (JSONSchema_JSONSchemaSimpleTypes) Descriptor

func (JSONSchema_JSONSchemaSimpleTypes) Enum

func (JSONSchema_JSONSchemaSimpleTypes) Number

func (JSONSchema_JSONSchemaSimpleTypes) String

func (JSONSchema_JSONSchemaSimpleTypes) Type

type JSONSchema_builder added in v2.25.1

type JSONSchema_builder struct {

	// Ref is used to define an external reference to include in the message.
	// This could be a fully qualified proto message reference, and that type must
	// be imported into the protofile. If no message is identified, the Ref will
	// be used verbatim in the output.
	// For example:
	//
	//	`ref: ".google.protobuf.Timestamp"`.
	Ref string
	// The title of the schema.
	Title string
	// A short description of the schema.
	Description string
	Default     string
	ReadOnly    bool
	// A free-form property to include a JSON example of this field. This is copied
	// verbatim to the output swagger.json. Quotes must be escaped.
	// This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
	Example    string
	MultipleOf float64
	// Maximum represents an inclusive upper limit for a numeric instance. The
	// value of MUST be a number,
	Maximum          float64
	ExclusiveMaximum bool
	// minimum represents an inclusive lower limit for a numeric instance. The
	// value of MUST be a number,
	Minimum          float64
	ExclusiveMinimum bool
	MaxLength        uint64
	MinLength        uint64
	Pattern          string
	MaxItems         uint64
	MinItems         uint64
	UniqueItems      bool
	MaxProperties    uint64
	MinProperties    uint64
	Required         []string
	// Items in 'array' must be unique.
	Array []string
	Type  []JSONSchema_JSONSchemaSimpleTypes
	// `Format`
	Format string
	// Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
	Enum []string
	// Additional field level properties used when generating the OpenAPI v2 file.
	FieldConfiguration *JSONSchema_FieldConfiguration
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value
	// contains filtered or unexported fields
}

func (JSONSchema_builder) Build added in v2.25.1

func (b0 JSONSchema_builder) Build() *JSONSchema

type License

type License struct {

	// The license name used for the API.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// A URL to the license used for the API. MUST be in the format of a URL.
	Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

`License` is a representation of OpenAPI v2 specification's License object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject

Example:

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
  info: {
    ...
    license: {
      name: "BSD 3-Clause License";
      url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
    };
    ...
  };
  ...
};

func (*License) GetName

func (x *License) GetName() string

func (*License) GetUrl

func (x *License) GetUrl() string

func (*License) ProtoMessage

func (*License) ProtoMessage()

func (*License) ProtoReflect

func (x *License) ProtoReflect() protoreflect.Message

func (*License) Reset

func (x *License) Reset()

func (*License) SetName added in v2.25.1

func (x *License) SetName(v string)

func (*License) SetUrl added in v2.25.1

func (x *License) SetUrl(v string)

func (*License) String

func (x *License) String() string

type License_builder added in v2.25.1

type License_builder struct {

	// The license name used for the API.
	Name string
	// A URL to the license used for the API. MUST be in the format of a URL.
	Url string
	// contains filtered or unexported fields
}

func (License_builder) Build added in v2.25.1

func (b0 License_builder) Build() *License

type Operation

type Operation struct {

	// A list of tags for API documentation control. Tags can be used for logical
	// grouping of operations by resources or any other qualifier.
	Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
	// A short summary of what the operation does. For maximum readability in the
	// swagger-ui, this field SHOULD be less than 120 characters.
	Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
	// A verbose explanation of the operation behavior. GFM syntax can be used for
	// rich text representation.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// Additional external documentation for this operation.
	ExternalDocs *ExternalDocumentation `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
	// Unique string used to identify the operation. The id MUST be unique among
	// all operations described in the API. Tools and libraries MAY use the
	// operationId to uniquely identify an operation, therefore, it is recommended
	// to follow common programming naming conventions.
	OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
	// A list of MIME types the operation can consume. This overrides the consumes
	// definition at the OpenAPI Object. An empty value MAY be used to clear the
	// global definition. Value MUST be as described under Mime Types.
	Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"`
	// A list of MIME types the operation can produce. This overrides the produces
	// definition at the OpenAPI Object. An empty value MAY be used to clear the
	// global definition. Value MUST be as described under Mime Types.
	Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"`
	// The list of possible responses as they are returned from executing this
	// operation.
	Responses map[string]*Response `` /* 145-byte string literal not displayed */
	// The transfer protocol for the operation. Values MUST be from the list:
	// "http", "https", "ws", "wss". The value overrides the OpenAPI Object
	// schemes definition.
	Schemes []Scheme `` /* 130-byte string literal not displayed */
	// Declares this operation to be deprecated. Usage of the declared operation
	// should be refrained. Default value is false.
	Deprecated bool `protobuf:"varint,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
	// A declaration of which security schemes are applied for this operation. The
	// list of values describes alternative security schemes that can be used
	// (that is, there is a logical OR between the security requirements). This
	// definition overrides any declared top-level security. To remove a top-level
	// security declaration, an empty array can be used.
	Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"`
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value `` /* 148-byte string literal not displayed */
	// Custom parameters such as HTTP request headers.
	// See: https://swagger.io/docs/specification/2-0/describing-parameters/
	// and https://swagger.io/specification/v2/#parameter-object.
	Parameters *Parameters `protobuf:"bytes,14,opt,name=parameters,proto3" json:"parameters,omitempty"`
	// contains filtered or unexported fields
}

`Operation` is a representation of OpenAPI v2 specification's Operation object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject

Example:

service EchoService {
  rpc Echo(SimpleMessage) returns (SimpleMessage) {
    option (google.api.http) = {
      get: "/v1/example/echo/{id}"
    };

    option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
      summary: "Get a message.";
      operation_id: "getMessage";
      tags: "echo";
      responses: {
        key: "200"
          value: {
          description: "OK";
        }
      }
    };
  }
}

func (*Operation) ClearExternalDocs added in v2.25.1

func (x *Operation) ClearExternalDocs()

func (*Operation) ClearParameters added in v2.25.1

func (x *Operation) ClearParameters()

func (*Operation) GetConsumes

func (x *Operation) GetConsumes() []string

func (*Operation) GetDeprecated

func (x *Operation) GetDeprecated() bool

func (*Operation) GetDescription

func (x *Operation) GetDescription() string

func (*Operation) GetExtensions

func (x *Operation) GetExtensions() map[string]*structpb.Value

func (*Operation) GetExternalDocs

func (x *Operation) GetExternalDocs() *ExternalDocumentation

func (*Operation) GetOperationId

func (x *Operation) GetOperationId() string

func (*Operation) GetParameters added in v2.14.0

func (x *Operation) GetParameters() *Parameters

func (*Operation) GetProduces

func (x *Operation) GetProduces() []string

func (*Operation) GetResponses

func (x *Operation) GetResponses() map[string]*Response

func (*Operation) GetSchemes

func (x *Operation) GetSchemes() []Scheme

func (*Operation) GetSecurity

func (x *Operation) GetSecurity() []*SecurityRequirement

func (*Operation) GetSummary

func (x *Operation) GetSummary() string

func (*Operation) GetTags

func (x *Operation) GetTags() []string

func (*Operation) HasExternalDocs added in v2.25.1

func (x *Operation) HasExternalDocs() bool

func (*Operation) HasParameters added in v2.25.1

func (x *Operation) HasParameters() bool

func (*Operation) ProtoMessage

func (*Operation) ProtoMessage()

func (*Operation) ProtoReflect

func (x *Operation) ProtoReflect() protoreflect.Message

func (*Operation) Reset

func (x *Operation) Reset()

func (*Operation) SetConsumes added in v2.25.1

func (x *Operation) SetConsumes(v []string)

func (*Operation) SetDeprecated added in v2.25.1

func (x *Operation) SetDeprecated(v bool)

func (*Operation) SetDescription added in v2.25.1

func (x *Operation) SetDescription(v string)

func (*Operation) SetExtensions added in v2.25.1

func (x *Operation) SetExtensions(v map[string]*structpb.Value)

func (*Operation) SetExternalDocs added in v2.25.1

func (x *Operation) SetExternalDocs(v *ExternalDocumentation)

func (*Operation) SetOperationId added in v2.25.1

func (x *Operation) SetOperationId(v string)

func (*Operation) SetParameters added in v2.25.1

func (x *Operation) SetParameters(v *Parameters)

func (*Operation) SetProduces added in v2.25.1

func (x *Operation) SetProduces(v []string)

func (*Operation) SetResponses added in v2.25.1

func (x *Operation) SetResponses(v map[string]*Response)

func (*Operation) SetSchemes added in v2.25.1

func (x *Operation) SetSchemes(v []Scheme)

func (*Operation) SetSecurity added in v2.25.1

func (x *Operation) SetSecurity(v []*SecurityRequirement)

func (*Operation) SetSummary added in v2.25.1

func (x *Operation) SetSummary(v string)

func (*Operation) SetTags added in v2.25.1

func (x *Operation) SetTags(v []string)

func (*Operation) String

func (x *Operation) String() string

type Operation_builder added in v2.25.1

type Operation_builder struct {

	// A list of tags for API documentation control. Tags can be used for logical
	// grouping of operations by resources or any other qualifier.
	Tags []string
	// A short summary of what the operation does. For maximum readability in the
	// swagger-ui, this field SHOULD be less than 120 characters.
	Summary string
	// A verbose explanation of the operation behavior. GFM syntax can be used for
	// rich text representation.
	Description string
	// Additional external documentation for this operation.
	ExternalDocs *ExternalDocumentation
	// Unique string used to identify the operation. The id MUST be unique among
	// all operations described in the API. Tools and libraries MAY use the
	// operationId to uniquely identify an operation, therefore, it is recommended
	// to follow common programming naming conventions.
	OperationId string
	// A list of MIME types the operation can consume. This overrides the consumes
	// definition at the OpenAPI Object. An empty value MAY be used to clear the
	// global definition. Value MUST be as described under Mime Types.
	Consumes []string
	// A list of MIME types the operation can produce. This overrides the produces
	// definition at the OpenAPI Object. An empty value MAY be used to clear the
	// global definition. Value MUST be as described under Mime Types.
	Produces []string
	// The list of possible responses as they are returned from executing this
	// operation.
	Responses map[string]*Response
	// The transfer protocol for the operation. Values MUST be from the list:
	// "http", "https", "ws", "wss". The value overrides the OpenAPI Object
	// schemes definition.
	Schemes []Scheme
	// Declares this operation to be deprecated. Usage of the declared operation
	// should be refrained. Default value is false.
	Deprecated bool
	// A declaration of which security schemes are applied for this operation. The
	// list of values describes alternative security schemes that can be used
	// (that is, there is a logical OR between the security requirements). This
	// definition overrides any declared top-level security. To remove a top-level
	// security declaration, an empty array can be used.
	Security []*SecurityRequirement
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value
	// Custom parameters such as HTTP request headers.
	// See: https://swagger.io/docs/specification/2-0/describing-parameters/
	// and https://swagger.io/specification/v2/#parameter-object.
	Parameters *Parameters
	// contains filtered or unexported fields
}

func (Operation_builder) Build added in v2.25.1

func (b0 Operation_builder) Build() *Operation

type Parameters added in v2.14.0

type Parameters struct {

	// `Headers` is one or more HTTP header parameter.
	// See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
	Headers []*HeaderParameter `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"`
	// contains filtered or unexported fields
}

`Parameters` is a representation of OpenAPI v2 specification's parameters object. Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only allow header parameters to be set here since we do not want users specifying custom non-header parameters beyond those inferred from the Protobuf schema. See: https://swagger.io/specification/v2/#parameter-object

func (*Parameters) GetHeaders added in v2.14.0

func (x *Parameters) GetHeaders() []*HeaderParameter

func (*Parameters) ProtoMessage added in v2.14.0

func (*Parameters) ProtoMessage()

func (*Parameters) ProtoReflect added in v2.14.0

func (x *Parameters) ProtoReflect() protoreflect.Message

func (*Parameters) Reset added in v2.14.0

func (x *Parameters) Reset()

func (*Parameters) SetHeaders added in v2.25.1

func (x *Parameters) SetHeaders(v []*HeaderParameter)

func (*Parameters) String added in v2.14.0

func (x *Parameters) String() string

type Parameters_builder added in v2.25.1

type Parameters_builder struct {

	// `Headers` is one or more HTTP header parameter.
	// See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
	Headers []*HeaderParameter
	// contains filtered or unexported fields
}

func (Parameters_builder) Build added in v2.25.1

func (b0 Parameters_builder) Build() *Parameters

type Response

type Response struct {

	// `Description` is a short description of the response.
	// GFM syntax can be used for rich text representation.
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	// `Schema` optionally defines the structure of the response.
	// If `Schema` is not provided, it means there is no content to the response.
	Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`
	// `Headers` A list of headers that are sent with the response.
	// `Header` name is expected to be a string in the canonical format of the MIME header key
	// See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
	Headers map[string]*Header `` /* 141-byte string literal not displayed */
	// `Examples` gives per-mimetype response examples.
	// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
	Examples map[string]string `` /* 143-byte string literal not displayed */
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

`Response` is a representation of OpenAPI v2 specification's Response object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject

func (*Response) ClearSchema added in v2.25.1

func (x *Response) ClearSchema()

func (*Response) GetDescription

func (x *Response) GetDescription() string

func (*Response) GetExamples

func (x *Response) GetExamples() map[string]string

func (*Response) GetExtensions

func (x *Response) GetExtensions() map[string]*structpb.Value

func (*Response) GetHeaders added in v2.1.0

func (x *Response) GetHeaders() map[string]*Header

func (*Response) GetSchema

func (x *Response) GetSchema() *Schema

func (*Response) HasSchema added in v2.25.1

func (x *Response) HasSchema() bool

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) SetDescription added in v2.25.1

func (x *Response) SetDescription(v string)

func (*Response) SetExamples added in v2.25.1

func (x *Response) SetExamples(v map[string]string)

func (*Response) SetExtensions added in v2.25.1

func (x *Response) SetExtensions(v map[string]*structpb.Value)

func (*Response) SetHeaders added in v2.25.1

func (x *Response) SetHeaders(v map[string]*Header)

func (*Response) SetSchema added in v2.25.1

func (x *Response) SetSchema(v *Schema)

func (*Response) String

func (x *Response) String() string

type Response_builder added in v2.25.1

type Response_builder struct {

	// `Description` is a short description of the response.
	// GFM syntax can be used for rich text representation.
	Description string
	// `Schema` optionally defines the structure of the response.
	// If `Schema` is not provided, it means there is no content to the response.
	Schema *Schema
	// `Headers` A list of headers that are sent with the response.
	// `Header` name is expected to be a string in the canonical format of the MIME header key
	// See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
	Headers map[string]*Header
	// `Examples` gives per-mimetype response examples.
	// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
	Examples map[string]string
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value
	// contains filtered or unexported fields
}

func (Response_builder) Build added in v2.25.1

func (b0 Response_builder) Build() *Response

type Schema

type Schema struct {
	JsonSchema *JSONSchema `protobuf:"bytes,1,opt,name=json_schema,json=jsonSchema,proto3" json:"json_schema,omitempty"`
	// Adds support for polymorphism. The discriminator is the schema property
	// name that is used to differentiate between other schema that inherit this
	// schema. The property name used MUST be defined at this schema and it MUST
	// be in the required property list. When used, the value MUST be the name of
	// this schema or any schema that inherits it.
	Discriminator string `protobuf:"bytes,2,opt,name=discriminator,proto3" json:"discriminator,omitempty"`
	// Relevant only for Schema "properties" definitions. Declares the property as
	// "read only". This means that it MAY be sent as part of a response but MUST
	// NOT be sent as part of the request. Properties marked as readOnly being
	// true SHOULD NOT be in the required list of the defined schema. Default
	// value is false.
	ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
	// Additional external documentation for this schema.
	ExternalDocs *ExternalDocumentation `protobuf:"bytes,5,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
	// A free-form property to include an example of an instance for this schema in JSON.
	// This is copied verbatim to the output.
	Example string `protobuf:"bytes,6,opt,name=example,proto3" json:"example,omitempty"`
	// contains filtered or unexported fields
}

`Schema` is a representation of OpenAPI v2 specification's Schema object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject

func (*Schema) ClearExternalDocs added in v2.25.1

func (x *Schema) ClearExternalDocs()

func (*Schema) ClearJsonSchema added in v2.25.1

func (x *Schema) ClearJsonSchema()

func (*Schema) GetDiscriminator

func (x *Schema) GetDiscriminator() string

func (*Schema) GetExample

func (x *Schema) GetExample() string

func (*Schema) GetExternalDocs

func (x *Schema) GetExternalDocs() *ExternalDocumentation

func (*Schema) GetJsonSchema

func (x *Schema) GetJsonSchema() *JSONSchema

func (*Schema) GetReadOnly

func (x *Schema) GetReadOnly() bool

func (*Schema) HasExternalDocs added in v2.25.1

func (x *Schema) HasExternalDocs() bool

func (*Schema) HasJsonSchema added in v2.25.1

func (x *Schema) HasJsonSchema() bool

func (*Schema) ProtoMessage

func (*Schema) ProtoMessage()

func (*Schema) ProtoReflect

func (x *Schema) ProtoReflect() protoreflect.Message

func (*Schema) Reset

func (x *Schema) Reset()

func (*Schema) SetDiscriminator added in v2.25.1

func (x *Schema) SetDiscriminator(v string)

func (*Schema) SetExample added in v2.25.1

func (x *Schema) SetExample(v string)

func (*Schema) SetExternalDocs added in v2.25.1

func (x *Schema) SetExternalDocs(v *ExternalDocumentation)

func (*Schema) SetJsonSchema added in v2.25.1

func (x *Schema) SetJsonSchema(v *JSONSchema)

func (*Schema) SetReadOnly added in v2.25.1

func (x *Schema) SetReadOnly(v bool)

func (*Schema) String

func (x *Schema) String() string

type Schema_builder added in v2.25.1

type Schema_builder struct {
	JsonSchema *JSONSchema
	// Adds support for polymorphism. The discriminator is the schema property
	// name that is used to differentiate between other schema that inherit this
	// schema. The property name used MUST be defined at this schema and it MUST
	// be in the required property list. When used, the value MUST be the name of
	// this schema or any schema that inherits it.
	Discriminator string
	// Relevant only for Schema "properties" definitions. Declares the property as
	// "read only". This means that it MAY be sent as part of a response but MUST
	// NOT be sent as part of the request. Properties marked as readOnly being
	// true SHOULD NOT be in the required list of the defined schema. Default
	// value is false.
	ReadOnly bool
	// Additional external documentation for this schema.
	ExternalDocs *ExternalDocumentation
	// A free-form property to include an example of an instance for this schema in JSON.
	// This is copied verbatim to the output.
	Example string
	// contains filtered or unexported fields
}

func (Schema_builder) Build added in v2.25.1

func (b0 Schema_builder) Build() *Schema

type Scheme

type Scheme int32

Scheme describes the schemes supported by the OpenAPI Swagger and Operation objects.

const (
	Scheme_UNKNOWN Scheme = 0
	Scheme_HTTP    Scheme = 1
	Scheme_HTTPS   Scheme = 2
	Scheme_WS      Scheme = 3
	Scheme_WSS     Scheme = 4
)

func (Scheme) Descriptor

func (Scheme) Descriptor() protoreflect.EnumDescriptor

func (Scheme) Enum

func (x Scheme) Enum() *Scheme

func (Scheme) Number

func (x Scheme) Number() protoreflect.EnumNumber

func (Scheme) String

func (x Scheme) String() string

func (Scheme) Type

func (Scheme) Type() protoreflect.EnumType

type Scopes

type Scopes struct {

	// Maps between a name of a scope to a short description of it (as the value
	// of the property).
	Scope map[string]string `` /* 137-byte string literal not displayed */
	// contains filtered or unexported fields
}

`Scopes` is a representation of OpenAPI v2 specification's Scopes object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject

Lists the available scopes for an OAuth2 security scheme.

func (*Scopes) GetScope

func (x *Scopes) GetScope() map[string]string

func (*Scopes) ProtoMessage

func (*Scopes) ProtoMessage()

func (*Scopes) ProtoReflect

func (x *Scopes) ProtoReflect() protoreflect.Message

func (*Scopes) Reset

func (x *Scopes) Reset()

func (*Scopes) SetScope added in v2.25.1

func (x *Scopes) SetScope(v map[string]string)

func (*Scopes) String

func (x *Scopes) String() string

type Scopes_builder added in v2.25.1

type Scopes_builder struct {

	// Maps between a name of a scope to a short description of it (as the value
	// of the property).
	Scope map[string]string
	// contains filtered or unexported fields
}

func (Scopes_builder) Build added in v2.25.1

func (b0 Scopes_builder) Build() *Scopes

type SecurityDefinitions

type SecurityDefinitions struct {

	// A single security scheme definition, mapping a "name" to the scheme it
	// defines.
	Security map[string]*SecurityScheme `` /* 143-byte string literal not displayed */
	// contains filtered or unexported fields
}

`SecurityDefinitions` is a representation of OpenAPI v2 specification's Security Definitions object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject

A declaration of the security schemes available to be used in the specification. This does not enforce the security schemes on the operations and only serves to provide the relevant details for each scheme.

func (*SecurityDefinitions) GetSecurity

func (x *SecurityDefinitions) GetSecurity() map[string]*SecurityScheme

func (*SecurityDefinitions) ProtoMessage

func (*SecurityDefinitions) ProtoMessage()

func (*SecurityDefinitions) ProtoReflect

func (x *SecurityDefinitions) ProtoReflect() protoreflect.Message

func (*SecurityDefinitions) Reset

func (x *SecurityDefinitions) Reset()

func (*SecurityDefinitions) SetSecurity added in v2.25.1

func (x *SecurityDefinitions) SetSecurity(v map[string]*SecurityScheme)

func (*SecurityDefinitions) String

func (x *SecurityDefinitions) String() string

type SecurityDefinitions_builder added in v2.25.1

type SecurityDefinitions_builder struct {

	// A single security scheme definition, mapping a "name" to the scheme it
	// defines.
	Security map[string]*SecurityScheme
	// contains filtered or unexported fields
}

func (SecurityDefinitions_builder) Build added in v2.25.1

type SecurityRequirement

type SecurityRequirement struct {

	// Each name must correspond to a security scheme which is declared in
	// the Security Definitions. If the security scheme is of type "oauth2",
	// then the value is a list of scope names required for the execution.
	// For other security scheme types, the array MUST be empty.
	SecurityRequirement map[string]*SecurityRequirement_SecurityRequirementValue `` /* 192-byte string literal not displayed */
	// contains filtered or unexported fields
}

`SecurityRequirement` is a representation of OpenAPI v2 specification's Security Requirement object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject

Lists the required security schemes to execute this operation. The object can have multiple security schemes declared in it which are all required (that is, there is a logical AND between the schemes).

The name used for each property MUST correspond to a security scheme declared in the Security Definitions.

func (*SecurityRequirement) GetSecurityRequirement

func (*SecurityRequirement) ProtoMessage

func (*SecurityRequirement) ProtoMessage()

func (*SecurityRequirement) ProtoReflect

func (x *SecurityRequirement) ProtoReflect() protoreflect.Message

func (*SecurityRequirement) Reset

func (x *SecurityRequirement) Reset()

func (*SecurityRequirement) SetSecurityRequirement added in v2.25.1

func (*SecurityRequirement) String

func (x *SecurityRequirement) String() string

type SecurityRequirement_SecurityRequirementValue

type SecurityRequirement_SecurityRequirementValue struct {
	Scope []string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty"`
	// contains filtered or unexported fields
}

If the security scheme is of type "oauth2", then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty.

func (*SecurityRequirement_SecurityRequirementValue) GetScope

func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage

func (*SecurityRequirement_SecurityRequirementValue) ProtoReflect

func (*SecurityRequirement_SecurityRequirementValue) Reset

func (*SecurityRequirement_SecurityRequirementValue) SetScope added in v2.25.1

func (*SecurityRequirement_SecurityRequirementValue) String

type SecurityRequirement_SecurityRequirementValue_builder added in v2.25.1

type SecurityRequirement_SecurityRequirementValue_builder struct {
	Scope []string
	// contains filtered or unexported fields
}

func (SecurityRequirement_SecurityRequirementValue_builder) Build added in v2.25.1

type SecurityRequirement_builder added in v2.25.1

type SecurityRequirement_builder struct {

	// Each name must correspond to a security scheme which is declared in
	// the Security Definitions. If the security scheme is of type "oauth2",
	// then the value is a list of scope names required for the execution.
	// For other security scheme types, the array MUST be empty.
	SecurityRequirement map[string]*SecurityRequirement_SecurityRequirementValue
	// contains filtered or unexported fields
}

func (SecurityRequirement_builder) Build added in v2.25.1

type SecurityScheme

type SecurityScheme struct {

	// The type of the security scheme. Valid values are "basic",
	// "apiKey" or "oauth2".
	Type SecurityScheme_Type `` /* 129-byte string literal not displayed */
	// A short description for security scheme.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// The name of the header or query parameter to be used.
	// Valid for apiKey.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// The location of the API key. Valid values are "query" or
	// "header".
	// Valid for apiKey.
	In SecurityScheme_In `protobuf:"varint,4,opt,name=in,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_In" json:"in,omitempty"`
	// The flow used by the OAuth2 security scheme. Valid values are
	// "implicit", "password", "application" or "accessCode".
	// Valid for oauth2.
	Flow SecurityScheme_Flow `` /* 129-byte string literal not displayed */
	// The authorization URL to be used for this flow. This SHOULD be in
	// the form of a URL.
	// Valid for oauth2/implicit and oauth2/accessCode.
	AuthorizationUrl string `protobuf:"bytes,6,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"`
	// The token URL to be used for this flow. This SHOULD be in the
	// form of a URL.
	// Valid for oauth2/password, oauth2/application and oauth2/accessCode.
	TokenUrl string `protobuf:"bytes,7,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"`
	// The available scopes for the OAuth2 security scheme.
	// Valid for oauth2.
	Scopes *Scopes `protobuf:"bytes,8,opt,name=scopes,proto3" json:"scopes,omitempty"`
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

`SecurityScheme` is a representation of OpenAPI v2 specification's Security Scheme object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject

Allows the definition of a security scheme that can be used by the operations. Supported schemes are basic authentication, an API key (either as a header or as a query parameter) and OAuth2's common flows (implicit, password, application and access code).

func (*SecurityScheme) ClearScopes added in v2.25.1

func (x *SecurityScheme) ClearScopes()

func (*SecurityScheme) GetAuthorizationUrl

func (x *SecurityScheme) GetAuthorizationUrl() string

func (*SecurityScheme) GetDescription

func (x *SecurityScheme) GetDescription() string

func (*SecurityScheme) GetExtensions

func (x *SecurityScheme) GetExtensions() map[string]*structpb.Value

func (*SecurityScheme) GetFlow

func (x *SecurityScheme) GetFlow() SecurityScheme_Flow

func (*SecurityScheme) GetIn

func (x *SecurityScheme) GetIn() SecurityScheme_In

func (*SecurityScheme) GetName

func (x *SecurityScheme) GetName() string

func (*SecurityScheme) GetScopes

func (x *SecurityScheme) GetScopes() *Scopes

func (*SecurityScheme) GetTokenUrl

func (x *SecurityScheme) GetTokenUrl() string

func (*SecurityScheme) GetType

func (x *SecurityScheme) GetType() SecurityScheme_Type

func (*SecurityScheme) HasScopes added in v2.25.1

func (x *SecurityScheme) HasScopes() bool

func (*SecurityScheme) ProtoMessage

func (*SecurityScheme) ProtoMessage()

func (*SecurityScheme) ProtoReflect

func (x *SecurityScheme) ProtoReflect() protoreflect.Message

func (*SecurityScheme) Reset

func (x *SecurityScheme) Reset()

func (*SecurityScheme) SetAuthorizationUrl added in v2.25.1

func (x *SecurityScheme) SetAuthorizationUrl(v string)

func (*SecurityScheme) SetDescription added in v2.25.1

func (x *SecurityScheme) SetDescription(v string)

func (*SecurityScheme) SetExtensions added in v2.25.1

func (x *SecurityScheme) SetExtensions(v map[string]*structpb.Value)

func (*SecurityScheme) SetFlow added in v2.25.1

func (x *SecurityScheme) SetFlow(v SecurityScheme_Flow)

func (*SecurityScheme) SetIn added in v2.25.1

func (x *SecurityScheme) SetIn(v SecurityScheme_In)

func (*SecurityScheme) SetName added in v2.25.1

func (x *SecurityScheme) SetName(v string)

func (*SecurityScheme) SetScopes added in v2.25.1

func (x *SecurityScheme) SetScopes(v *Scopes)

func (*SecurityScheme) SetTokenUrl added in v2.25.1

func (x *SecurityScheme) SetTokenUrl(v string)

func (*SecurityScheme) SetType added in v2.25.1

func (x *SecurityScheme) SetType(v SecurityScheme_Type)

func (*SecurityScheme) String

func (x *SecurityScheme) String() string

type SecurityScheme_Flow

type SecurityScheme_Flow int32

The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode".

const (
	SecurityScheme_FLOW_INVALID     SecurityScheme_Flow = 0
	SecurityScheme_FLOW_IMPLICIT    SecurityScheme_Flow = 1
	SecurityScheme_FLOW_PASSWORD    SecurityScheme_Flow = 2
	SecurityScheme_FLOW_APPLICATION SecurityScheme_Flow = 3
	SecurityScheme_FLOW_ACCESS_CODE SecurityScheme_Flow = 4
)

func (SecurityScheme_Flow) Descriptor

func (SecurityScheme_Flow) Enum

func (SecurityScheme_Flow) Number

func (SecurityScheme_Flow) String

func (x SecurityScheme_Flow) String() string

func (SecurityScheme_Flow) Type

type SecurityScheme_In

type SecurityScheme_In int32

The location of the API key. Valid values are "query" or "header".

const (
	SecurityScheme_IN_INVALID SecurityScheme_In = 0
	SecurityScheme_IN_QUERY   SecurityScheme_In = 1
	SecurityScheme_IN_HEADER  SecurityScheme_In = 2
)

func (SecurityScheme_In) Descriptor

func (SecurityScheme_In) Enum

func (SecurityScheme_In) Number

func (SecurityScheme_In) String

func (x SecurityScheme_In) String() string

func (SecurityScheme_In) Type

type SecurityScheme_Type

type SecurityScheme_Type int32

The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".

const (
	SecurityScheme_TYPE_INVALID SecurityScheme_Type = 0
	SecurityScheme_TYPE_BASIC   SecurityScheme_Type = 1
	SecurityScheme_TYPE_API_KEY SecurityScheme_Type = 2
	SecurityScheme_TYPE_OAUTH2  SecurityScheme_Type = 3
)

func (SecurityScheme_Type) Descriptor

func (SecurityScheme_Type) Enum

func (SecurityScheme_Type) Number

func (SecurityScheme_Type) String

func (x SecurityScheme_Type) String() string

func (SecurityScheme_Type) Type

type SecurityScheme_builder added in v2.25.1

type SecurityScheme_builder struct {

	// The type of the security scheme. Valid values are "basic",
	// "apiKey" or "oauth2".
	Type SecurityScheme_Type
	// A short description for security scheme.
	Description string
	// The name of the header or query parameter to be used.
	// Valid for apiKey.
	Name string
	// The location of the API key. Valid values are "query" or
	// "header".
	// Valid for apiKey.
	In SecurityScheme_In
	// The flow used by the OAuth2 security scheme. Valid values are
	// "implicit", "password", "application" or "accessCode".
	// Valid for oauth2.
	Flow SecurityScheme_Flow
	// The authorization URL to be used for this flow. This SHOULD be in
	// the form of a URL.
	// Valid for oauth2/implicit and oauth2/accessCode.
	AuthorizationUrl string
	// The token URL to be used for this flow. This SHOULD be in the
	// form of a URL.
	// Valid for oauth2/password, oauth2/application and oauth2/accessCode.
	TokenUrl string
	// The available scopes for the OAuth2 security scheme.
	// Valid for oauth2.
	Scopes *Scopes
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value
	// contains filtered or unexported fields
}

func (SecurityScheme_builder) Build added in v2.25.1

type Swagger

type Swagger struct {

	// Specifies the OpenAPI Specification version being used. It can be
	// used by the OpenAPI UI and other clients to interpret the API listing. The
	// value MUST be "2.0".
	Swagger string `protobuf:"bytes,1,opt,name=swagger,proto3" json:"swagger,omitempty"`
	// Provides metadata about the API. The metadata can be used by the
	// clients if needed.
	Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"`
	// The host (name or ip) serving the API. This MUST be the host only and does
	// not include the scheme nor sub-paths. It MAY include a port. If the host is
	// not included, the host serving the documentation is to be used (including
	// the port). The host does not support path templating.
	Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"`
	// The base path on which the API is served, which is relative to the host. If
	// it is not included, the API is served directly under the host. The value
	// MUST start with a leading slash (/). The basePath does not support path
	// templating.
	// Note that using `base_path` does not change the endpoint paths that are
	// generated in the resulting OpenAPI file. If you wish to use `base_path`
	// with relatively generated OpenAPI paths, the `base_path` prefix must be
	// manually removed from your `google.api.http` paths and your code changed to
	// serve the API from the `base_path`.
	BasePath string `protobuf:"bytes,4,opt,name=base_path,json=basePath,proto3" json:"base_path,omitempty"`
	// The transfer protocol of the API. Values MUST be from the list: "http",
	// "https", "ws", "wss". If the schemes is not included, the default scheme to
	// be used is the one used to access the OpenAPI definition itself.
	Schemes []Scheme `` /* 129-byte string literal not displayed */
	// A list of MIME types the APIs can consume. This is global to all APIs but
	// can be overridden on specific API calls. Value MUST be as described under
	// Mime Types.
	Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"`
	// A list of MIME types the APIs can produce. This is global to all APIs but
	// can be overridden on specific API calls. Value MUST be as described under
	// Mime Types.
	Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"`
	// An object to hold responses that can be used across operations. This
	// property does not define global responses for all operations.
	Responses map[string]*Response `` /* 146-byte string literal not displayed */
	// Security scheme definitions that can be used across the specification.
	SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,11,opt,name=security_definitions,json=securityDefinitions,proto3" json:"security_definitions,omitempty"`
	// A declaration of which security schemes are applied for the API as a whole.
	// The list of values describes alternative security schemes that can be used
	// (that is, there is a logical OR between the security requirements).
	// Individual operations can override this definition.
	Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"`
	// A list of tags for API documentation control. Tags can be used for logical
	// grouping of operations by resources or any other qualifier.
	Tags []*Tag `protobuf:"bytes,13,rep,name=tags,proto3" json:"tags,omitempty"`
	// Additional external documentation.
	ExternalDocs *ExternalDocumentation `protobuf:"bytes,14,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value `` /* 148-byte string literal not displayed */
	// contains filtered or unexported fields
}

`Swagger` is a representation of OpenAPI v2 specification's Swagger object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject

Example:

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
  info: {
    title: "Echo API";
    version: "1.0";
    description: "";
    contact: {
      name: "gRPC-Gateway project";
      url: "https://github.com/grpc-ecosystem/grpc-gateway";
      email: "none@example.com";
    };
    license: {
      name: "BSD 3-Clause License";
      url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
    };
  };
  schemes: HTTPS;
  consumes: "application/json";
  produces: "application/json";
};

func (*Swagger) ClearExternalDocs added in v2.25.1

func (x *Swagger) ClearExternalDocs()

func (*Swagger) ClearInfo added in v2.25.1

func (x *Swagger) ClearInfo()

func (*Swagger) ClearSecurityDefinitions added in v2.25.1

func (x *Swagger) ClearSecurityDefinitions()

func (*Swagger) GetBasePath

func (x *Swagger) GetBasePath() string

func (*Swagger) GetConsumes

func (x *Swagger) GetConsumes() []string

func (*Swagger) GetExtensions

func (x *Swagger) GetExtensions() map[string]*structpb.Value

func (*Swagger) GetExternalDocs

func (x *Swagger) GetExternalDocs() *ExternalDocumentation

func (*Swagger) GetHost

func (x *Swagger) GetHost() string

func (*Swagger) GetInfo

func (x *Swagger) GetInfo() *Info

func (*Swagger) GetProduces

func (x *Swagger) GetProduces() []string

func (*Swagger) GetResponses

func (x *Swagger) GetResponses() map[string]*Response

func (*Swagger) GetSchemes

func (x *Swagger) GetSchemes() []Scheme

func (*Swagger) GetSecurity

func (x *Swagger) GetSecurity() []*SecurityRequirement

func (*Swagger) GetSecurityDefinitions

func (x *Swagger) GetSecurityDefinitions() *SecurityDefinitions

func (*Swagger) GetSwagger

func (x *Swagger) GetSwagger() string

func (*Swagger) GetTags added in v2.12.0

func (x *Swagger) GetTags() []*Tag

func (*Swagger) HasExternalDocs added in v2.25.1

func (x *Swagger) HasExternalDocs() bool

func (*Swagger) HasInfo added in v2.25.1

func (x *Swagger) HasInfo() bool

func (*Swagger) HasSecurityDefinitions added in v2.25.1

func (x *Swagger) HasSecurityDefinitions() bool

func (*Swagger) ProtoMessage

func (*Swagger) ProtoMessage()

func (*Swagger) ProtoReflect

func (x *Swagger) ProtoReflect() protoreflect.Message

func (*Swagger) Reset

func (x *Swagger) Reset()

func (*Swagger) SetBasePath added in v2.25.1

func (x *Swagger) SetBasePath(v string)

func (*Swagger) SetConsumes added in v2.25.1

func (x *Swagger) SetConsumes(v []string)

func (*Swagger) SetExtensions added in v2.25.1

func (x *Swagger) SetExtensions(v map[string]*structpb.Value)

func (*Swagger) SetExternalDocs added in v2.25.1

func (x *Swagger) SetExternalDocs(v *ExternalDocumentation)

func (*Swagger) SetHost added in v2.25.1

func (x *Swagger) SetHost(v string)

func (*Swagger) SetInfo added in v2.25.1

func (x *Swagger) SetInfo(v *Info)

func (*Swagger) SetProduces added in v2.25.1

func (x *Swagger) SetProduces(v []string)

func (*Swagger) SetResponses added in v2.25.1

func (x *Swagger) SetResponses(v map[string]*Response)

func (*Swagger) SetSchemes added in v2.25.1

func (x *Swagger) SetSchemes(v []Scheme)

func (*Swagger) SetSecurity added in v2.25.1

func (x *Swagger) SetSecurity(v []*SecurityRequirement)

func (*Swagger) SetSecurityDefinitions added in v2.25.1

func (x *Swagger) SetSecurityDefinitions(v *SecurityDefinitions)

func (*Swagger) SetSwagger added in v2.25.1

func (x *Swagger) SetSwagger(v string)

func (*Swagger) SetTags added in v2.25.1

func (x *Swagger) SetTags(v []*Tag)

func (*Swagger) String

func (x *Swagger) String() string

type Swagger_builder added in v2.25.1

type Swagger_builder struct {

	// Specifies the OpenAPI Specification version being used. It can be
	// used by the OpenAPI UI and other clients to interpret the API listing. The
	// value MUST be "2.0".
	Swagger string
	// Provides metadata about the API. The metadata can be used by the
	// clients if needed.
	Info *Info
	// The host (name or ip) serving the API. This MUST be the host only and does
	// not include the scheme nor sub-paths. It MAY include a port. If the host is
	// not included, the host serving the documentation is to be used (including
	// the port). The host does not support path templating.
	Host string
	// The base path on which the API is served, which is relative to the host. If
	// it is not included, the API is served directly under the host. The value
	// MUST start with a leading slash (/). The basePath does not support path
	// templating.
	// Note that using `base_path` does not change the endpoint paths that are
	// generated in the resulting OpenAPI file. If you wish to use `base_path`
	// with relatively generated OpenAPI paths, the `base_path` prefix must be
	// manually removed from your `google.api.http` paths and your code changed to
	// serve the API from the `base_path`.
	BasePath string
	// The transfer protocol of the API. Values MUST be from the list: "http",
	// "https", "ws", "wss". If the schemes is not included, the default scheme to
	// be used is the one used to access the OpenAPI definition itself.
	Schemes []Scheme
	// A list of MIME types the APIs can consume. This is global to all APIs but
	// can be overridden on specific API calls. Value MUST be as described under
	// Mime Types.
	Consumes []string
	// A list of MIME types the APIs can produce. This is global to all APIs but
	// can be overridden on specific API calls. Value MUST be as described under
	// Mime Types.
	Produces []string
	// An object to hold responses that can be used across operations. This
	// property does not define global responses for all operations.
	Responses map[string]*Response
	// Security scheme definitions that can be used across the specification.
	SecurityDefinitions *SecurityDefinitions
	// A declaration of which security schemes are applied for the API as a whole.
	// The list of values describes alternative security schemes that can be used
	// (that is, there is a logical OR between the security requirements).
	// Individual operations can override this definition.
	Security []*SecurityRequirement
	// A list of tags for API documentation control. Tags can be used for logical
	// grouping of operations by resources or any other qualifier.
	Tags []*Tag
	// Additional external documentation.
	ExternalDocs *ExternalDocumentation
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value
	// contains filtered or unexported fields
}

func (Swagger_builder) Build added in v2.25.1

func (b0 Swagger_builder) Build() *Swagger

type Tag

type Tag struct {

	// The name of the tag. Use it to allow override of the name of a
	// global Tag object, then use that name to reference the tag throughout the
	// OpenAPI file.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// A short description for the tag. GFM syntax can be used for rich text
	// representation.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Additional external documentation for this tag.
	ExternalDocs *ExternalDocumentation `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

`Tag` is a representation of OpenAPI v2 specification's Tag object.

See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject

func (*Tag) ClearExternalDocs added in v2.25.1

func (x *Tag) ClearExternalDocs()

func (*Tag) GetDescription

func (x *Tag) GetDescription() string

func (*Tag) GetExtensions added in v2.12.0

func (x *Tag) GetExtensions() map[string]*structpb.Value

func (*Tag) GetExternalDocs

func (x *Tag) GetExternalDocs() *ExternalDocumentation

func (*Tag) GetName added in v2.12.0

func (x *Tag) GetName() string

func (*Tag) HasExternalDocs added in v2.25.1

func (x *Tag) HasExternalDocs() bool

func (*Tag) ProtoMessage

func (*Tag) ProtoMessage()

func (*Tag) ProtoReflect

func (x *Tag) ProtoReflect() protoreflect.Message

func (*Tag) Reset

func (x *Tag) Reset()

func (*Tag) SetDescription added in v2.25.1

func (x *Tag) SetDescription(v string)

func (*Tag) SetExtensions added in v2.25.1

func (x *Tag) SetExtensions(v map[string]*structpb.Value)

func (*Tag) SetExternalDocs added in v2.25.1

func (x *Tag) SetExternalDocs(v *ExternalDocumentation)

func (*Tag) SetName added in v2.25.1

func (x *Tag) SetName(v string)

func (*Tag) String

func (x *Tag) String() string

type Tag_builder added in v2.25.1

type Tag_builder struct {

	// The name of the tag. Use it to allow override of the name of a
	// global Tag object, then use that name to reference the tag throughout the
	// OpenAPI file.
	Name string
	// A short description for the tag. GFM syntax can be used for rich text
	// representation.
	Description string
	// Additional external documentation for this tag.
	ExternalDocs *ExternalDocumentation
	// Custom properties that start with "x-" such as "x-foo" used to describe
	// extra functionality that is not covered by the standard OpenAPI Specification.
	// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
	Extensions map[string]*structpb.Value
	// contains filtered or unexported fields
}

func (Tag_builder) Build added in v2.25.1

func (b0 Tag_builder) Build() *Tag

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL