Documentation ¶
Index ¶
- Variables
- type Contact
- func (*Contact) Descriptor() ([]byte, []int)deprecated
- func (x *Contact) GetEmail() string
- func (x *Contact) GetName() string
- func (x *Contact) GetURL() string
- func (*Contact) ProtoMessage()
- func (x *Contact) ProtoReflect() protoreflect.Message
- func (x *Contact) Reset()
- func (x *Contact) String() string
- type ExternalDocumentation
- func (*ExternalDocumentation) Descriptor() ([]byte, []int)deprecated
- func (x *ExternalDocumentation) GetDescription() string
- func (x *ExternalDocumentation) GetURL() string
- func (*ExternalDocumentation) ProtoMessage()
- func (x *ExternalDocumentation) ProtoReflect() protoreflect.Message
- func (x *ExternalDocumentation) Reset()
- func (x *ExternalDocumentation) String() string
- type Flow
- type Header
- func (*Header) Descriptor() ([]byte, []int)deprecated
- func (x *Header) GetDefault() string
- func (x *Header) GetDescription() string
- func (x *Header) GetFormat() string
- func (x *Header) GetPattern() string
- func (x *Header) GetType() string
- func (*Header) ProtoMessage()
- func (x *Header) ProtoReflect() protoreflect.Message
- func (x *Header) Reset()
- func (x *Header) String() string
- type In
- type Info
- func (*Info) Descriptor() ([]byte, []int)deprecated
- func (x *Info) GetContact() *Contact
- func (x *Info) GetDescription() string
- func (x *Info) GetLicense() *License
- func (x *Info) GetTermsOfService() string
- func (x *Info) GetTitle() string
- func (x *Info) GetVersion() string
- func (*Info) ProtoMessage()
- func (x *Info) ProtoReflect() protoreflect.Message
- func (x *Info) Reset()
- func (x *Info) String() string
- type JSONSchema
- func (*JSONSchema) Descriptor() ([]byte, []int)deprecated
- func (x *JSONSchema) GetArray() []string
- func (x *JSONSchema) GetDefault() string
- func (x *JSONSchema) GetDescription() string
- func (x *JSONSchema) GetEnum() []string
- func (x *JSONSchema) GetExample() string
- func (x *JSONSchema) GetExclusiveMaximum() bool
- func (x *JSONSchema) GetExclusiveMinimum() bool
- func (x *JSONSchema) GetFormat() string
- func (x *JSONSchema) GetMaxItems() uint64
- func (x *JSONSchema) GetMaxLength() uint64
- func (x *JSONSchema) GetMaxProperties() uint64
- func (x *JSONSchema) GetMaximum() float64
- func (x *JSONSchema) GetMinItems() uint64
- func (x *JSONSchema) GetMinLength() uint64
- func (x *JSONSchema) GetMinProperties() uint64
- func (x *JSONSchema) GetMinimum() float64
- func (x *JSONSchema) GetMultipleOf() float64
- func (x *JSONSchema) GetPattern() string
- func (x *JSONSchema) GetReadOnly() bool
- func (x *JSONSchema) GetRef() string
- func (x *JSONSchema) GetRequired() []string
- func (x *JSONSchema) GetTitle() string
- func (x *JSONSchema) GetType() []JSONSchemaSimpleTypes
- func (x *JSONSchema) GetUniqueItems() bool
- func (*JSONSchema) ProtoMessage()
- func (x *JSONSchema) ProtoReflect() protoreflect.Message
- func (x *JSONSchema) Reset()
- func (x *JSONSchema) String() string
- type JSONSchemaSimpleTypes
- func (JSONSchemaSimpleTypes) Descriptor() protoreflect.EnumDescriptor
- func (x JSONSchemaSimpleTypes) Enum() *JSONSchemaSimpleTypes
- func (JSONSchemaSimpleTypes) EnumDescriptor() ([]byte, []int)deprecated
- func (x JSONSchemaSimpleTypes) Number() protoreflect.EnumNumber
- func (x JSONSchemaSimpleTypes) String() string
- func (JSONSchemaSimpleTypes) Type() protoreflect.EnumType
- type License
- type Operation
- func (*Operation) Descriptor() ([]byte, []int)deprecated
- func (x *Operation) GetConsumes() []string
- func (x *Operation) GetDeprecated() bool
- func (x *Operation) GetDescription() string
- func (x *Operation) GetExternalDocs() *ExternalDocumentation
- func (x *Operation) GetOperationID() string
- func (x *Operation) GetProduces() []string
- func (x *Operation) GetResponses() map[string]*Response
- func (x *Operation) GetSchemes() []Scheme
- func (x *Operation) GetSecurity() []*SecurityRequirement
- func (x *Operation) GetSummary() string
- func (x *Operation) GetTags() []string
- func (*Operation) ProtoMessage()
- func (x *Operation) ProtoReflect() protoreflect.Message
- func (x *Operation) Reset()
- func (x *Operation) String() string
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetDescription() string
- func (x *Response) GetExamples() map[string]string
- func (x *Response) GetHeaders() map[string]*Header
- func (x *Response) GetSchema() *Schema
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type Schema
- func (*Schema) Descriptor() ([]byte, []int)deprecated
- func (x *Schema) GetDiscriminator() string
- func (x *Schema) GetExample() string
- func (x *Schema) GetExternalDocs() *ExternalDocumentation
- func (x *Schema) GetJSONSchema() *JSONSchema
- func (x *Schema) GetReadOnly() bool
- func (*Schema) ProtoMessage()
- func (x *Schema) ProtoReflect() protoreflect.Message
- func (x *Schema) Reset()
- func (x *Schema) String() string
- type Scheme
- type Scopes
- type SecurityDefinitions
- func (*SecurityDefinitions) Descriptor() ([]byte, []int)deprecated
- func (x *SecurityDefinitions) GetSecurity() map[string]*SecurityScheme
- func (*SecurityDefinitions) ProtoMessage()
- func (x *SecurityDefinitions) ProtoReflect() protoreflect.Message
- func (x *SecurityDefinitions) Reset()
- func (x *SecurityDefinitions) String() string
- type SecurityRequirement
- func (*SecurityRequirement) Descriptor() ([]byte, []int)deprecated
- func (x *SecurityRequirement) GetSecurityRequirement() map[string]*SecurityRequirement_SecurityRequirementValue
- func (*SecurityRequirement) ProtoMessage()
- func (x *SecurityRequirement) ProtoReflect() protoreflect.Message
- func (x *SecurityRequirement) Reset()
- func (x *SecurityRequirement) String() string
- type SecurityRequirement_SecurityRequirementValue
- func (*SecurityRequirement_SecurityRequirementValue) Descriptor() ([]byte, []int)deprecated
- func (x *SecurityRequirement_SecurityRequirementValue) GetScope() []string
- func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage()
- func (x *SecurityRequirement_SecurityRequirementValue) ProtoReflect() protoreflect.Message
- func (x *SecurityRequirement_SecurityRequirementValue) Reset()
- func (x *SecurityRequirement_SecurityRequirementValue) String() string
- type SecurityScheme
- func (*SecurityScheme) Descriptor() ([]byte, []int)deprecated
- func (x *SecurityScheme) GetAuthorizationURL() string
- func (x *SecurityScheme) GetDescription() string
- func (x *SecurityScheme) GetFlow() Flow
- func (x *SecurityScheme) GetIn() In
- func (x *SecurityScheme) GetName() string
- func (x *SecurityScheme) GetScopes() *Scopes
- func (x *SecurityScheme) GetTokenURL() string
- func (x *SecurityScheme) GetType() Type
- func (*SecurityScheme) ProtoMessage()
- func (x *SecurityScheme) ProtoReflect() protoreflect.Message
- func (x *SecurityScheme) Reset()
- func (x *SecurityScheme) String() string
- type Swagger
- func (*Swagger) Descriptor() ([]byte, []int)deprecated
- func (x *Swagger) GetBasePath() string
- func (x *Swagger) GetConsumes() []string
- func (x *Swagger) GetExternalDocs() *ExternalDocumentation
- func (x *Swagger) GetHost() string
- func (x *Swagger) GetInfo() *Info
- func (x *Swagger) GetProduces() []string
- func (x *Swagger) GetResponses() map[string]*Response
- func (x *Swagger) GetSchemes() []Scheme
- func (x *Swagger) GetSecurity() []*SecurityRequirement
- func (x *Swagger) GetSecurityDefinitions() *SecurityDefinitions
- func (x *Swagger) GetSwagger() string
- func (*Swagger) ProtoMessage()
- func (x *Swagger) ProtoReflect() protoreflect.Message
- func (x *Swagger) Reset()
- func (x *Swagger) String() string
- type Tag
- type Type
Constants ¶
This section is empty.
Variables ¶
var ( Scheme_name = map[int32]string{ 0: "SwaggerSchemeUNKNOWN", 1: "HTTP", 2: "HTTPS", 3: "WS", 4: "WSS", } Scheme_value = map[string]int32{ "SwaggerSchemeUNKNOWN": 0, "HTTP": 1, "HTTPS": 2, "WS": 3, "WSS": 4, } )
Enum value maps for Scheme.
var ( JSONSchemaSimpleTypes_name = map[int32]string{ 0: "JSONSchemaSimpleTypes_UNKNOWN", 1: "ARRAY", 2: "BOOLEAN", 3: "INTEGER", 4: "NULL", 5: "NUMBER", 6: "OBJECT", 7: "STRING", } JSONSchemaSimpleTypes_value = map[string]int32{ "JSONSchemaSimpleTypes_UNKNOWN": 0, "ARRAY": 1, "BOOLEAN": 2, "INTEGER": 3, "NULL": 4, "NUMBER": 5, "OBJECT": 6, "STRING": 7, } )
Enum value maps for JSONSchemaSimpleTypes.
var ( Type_name = map[int32]string{ 0: "TYPE_INVALID", 1: "TYPE_BASIC", 2: "TYPE_API_KEY", 3: "TYPE_OAUTH2", } Type_value = map[string]int32{ "TYPE_INVALID": 0, "TYPE_BASIC": 1, "TYPE_API_KEY": 2, "TYPE_OAUTH2": 3, } )
Enum value maps for Type.
var ( In_name = map[int32]string{ 0: "IN_INVALID", 1: "IN_QUERY", 2: "IN_HEADER", } In_value = map[string]int32{ "IN_INVALID": 0, "IN_QUERY": 1, "IN_HEADER": 2, } )
Enum value maps for In.
var ( Flow_name = map[int32]string{ 0: "FLOW_INVALID", 1: "FLOW_IMPLICIT", 2: "FLOW_PASSWORD", 3: "FLOW_APPLICATION", 4: "FLOW_ACCESS_CODE", } 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 Flow.
var File_github_com_gunk_opt_openapiv2_all_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,json=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,json=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,json=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) Descriptor
deprecated
func (*Contact) ProtoMessage ¶
func (*Contact) ProtoMessage()
func (*Contact) ProtoReflect ¶
func (x *Contact) ProtoReflect() protoreflect.Message
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,json=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,json=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) Descriptor
deprecated
func (*ExternalDocumentation) Descriptor() ([]byte, []int)
Deprecated: Use ExternalDocumentation.ProtoReflect.Descriptor instead.
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) String ¶
func (x *ExternalDocumentation) String() string
type Flow ¶
type Flow int32
The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode".
func (Flow) Descriptor ¶
func (Flow) Descriptor() protoreflect.EnumDescriptor
func (Flow) EnumDescriptor
deprecated
func (Flow) Number ¶
func (x Flow) Number() protoreflect.EnumNumber
func (Flow) Type ¶
func (Flow) Type() protoreflect.EnumType
type Header ¶
type Header struct { // `Description` is a short description of the header. Description string `protobuf:"bytes,1,opt,name=Description,json=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,json=type,proto3" json:"Type,omitempty"` // `Format` The extending format for the previously mentioned type. Format string `protobuf:"bytes,3,opt,name=Format,json=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,json=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,json=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) Descriptor
deprecated
func (*Header) GetDefault ¶
func (*Header) GetDescription ¶
func (*Header) GetPattern ¶
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
func (*Header) ProtoReflect ¶
func (x *Header) ProtoReflect() protoreflect.Message
type In ¶
type In int32
The location of the API key. Valid values are "query" or "header".
func (In) Descriptor ¶
func (In) Descriptor() protoreflect.EnumDescriptor
func (In) EnumDescriptor
deprecated
func (In) Number ¶
func (x In) Number() protoreflect.EnumNumber
func (In) Type ¶
func (In) Type() protoreflect.EnumType
type Info ¶
type Info struct { // The title of the application. Title string `protobuf:"bytes,1,opt,name=Title,json=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,json=description,proto3" json:"Description,omitempty"` // The Terms of Service for the API. TermsOfService string `protobuf:"bytes,3,opt,name=TermsOfService,json=terms_of_service,proto3" json:"TermsOfService,omitempty"` // The contact information for the exposed API. Contact *Contact `protobuf:"bytes,4,opt,name=Contact,json=contact,proto3" json:"Contact,omitempty"` // The license information for the exposed API. License *License `protobuf:"bytes,5,opt,name=License,json=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,json=version,proto3" json:"Version,omitempty"` // 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/master/LICENSE.txt"; }; }; ... };
func (*Info) Descriptor
deprecated
func (*Info) GetContact ¶
func (*Info) GetDescription ¶
func (*Info) GetLicense ¶
func (*Info) GetTermsOfService ¶
func (*Info) GetVersion ¶
func (*Info) ProtoMessage ¶
func (*Info) ProtoMessage()
func (*Info) ProtoReflect ¶
func (x *Info) ProtoReflect() protoreflect.Message
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,json=ref,proto3" json:"Ref,omitempty"` // The title of the schema. Title string `protobuf:"bytes,5,opt,name=Title,json=title,proto3" json:"Title,omitempty"` // A short description of the schema. Description string `protobuf:"bytes,6,opt,name=Description,json=description,proto3" json:"Description,omitempty"` Default string `protobuf:"bytes,7,opt,name=Default,json=default,proto3" json:"Default,omitempty"` ReadOnly bool `protobuf:"varint,8,opt,name=ReadOnly,json=read_only,proto3" json:"ReadOnly,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,json=example,proto3" json:"Example,omitempty"` MultipleOf float64 `protobuf:"fixed64,10,opt,name=MultipleOf,json=multiple_of,proto3" json:"MultipleOf,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,json=maximum,proto3" json:"Maximum,omitempty"` ExclusiveMaximum bool `protobuf:"varint,12,opt,name=ExclusiveMaximum,json=exclusive_maximum,proto3" json:"ExclusiveMaximum,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,json=minimum,proto3" json:"Minimum,omitempty"` ExclusiveMinimum bool `protobuf:"varint,14,opt,name=ExclusiveMinimum,json=exclusive_minimum,proto3" json:"ExclusiveMinimum,omitempty"` MaxLength uint64 `protobuf:"varint,15,opt,name=MaxLength,json=max_length,proto3" json:"MaxLength,omitempty"` MinLength uint64 `protobuf:"varint,16,opt,name=MinLength,json=min_length,proto3" json:"MinLength,omitempty"` Pattern string `protobuf:"bytes,17,opt,name=Pattern,json=pattern,proto3" json:"Pattern,omitempty"` MaxItems uint64 `protobuf:"varint,20,opt,name=MaxItems,json=max_items,proto3" json:"MaxItems,omitempty"` MinItems uint64 `protobuf:"varint,21,opt,name=MinItems,json=min_items,proto3" json:"MinItems,omitempty"` UniqueItems bool `protobuf:"varint,22,opt,name=UniqueItems,json=unique_items,proto3" json:"UniqueItems,omitempty"` MaxProperties uint64 `protobuf:"varint,24,opt,name=MaxProperties,json=max_properties,proto3" json:"MaxProperties,omitempty"` MinProperties uint64 `protobuf:"varint,25,opt,name=MinProperties,json=min_properties,proto3" json:"MinProperties,omitempty"` Required []string `protobuf:"bytes,26,rep,name=Required,json=required,proto3" json:"Required,omitempty"` // Items in 'array' must be unique. Array []string `protobuf:"bytes,34,rep,name=Array,json=array,proto3" json:"Array,omitempty"` Type []JSONSchemaSimpleTypes `protobuf:"varint,35,rep,packed,name=Type,json=type,proto3,enum=openapiv2.JSONSchemaSimpleTypes" json:"Type,omitempty"` // `Format` Format string `protobuf:"bytes,36,opt,name=Format,json=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,json=enum,proto3" json:"Enum,omitempty"` // 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) Descriptor
deprecated
func (*JSONSchema) Descriptor() ([]byte, []int)
Deprecated: Use JSONSchema.ProtoReflect.Descriptor instead.
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 ¶
func (x *JSONSchema) GetEnum() []string
func (*JSONSchema) GetExample ¶
func (x *JSONSchema) GetExample() string
func (*JSONSchema) GetExclusiveMaximum ¶
func (x *JSONSchema) GetExclusiveMaximum() bool
func (*JSONSchema) GetExclusiveMinimum ¶
func (x *JSONSchema) GetExclusiveMinimum() bool
func (*JSONSchema) GetFormat ¶
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 (x *JSONSchema) GetType() []JSONSchemaSimpleTypes
func (*JSONSchema) GetUniqueItems ¶
func (x *JSONSchema) GetUniqueItems() 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) String ¶
func (x *JSONSchema) String() string
type JSONSchemaSimpleTypes ¶
type JSONSchemaSimpleTypes int32
const ( JSONSchemaSimpleTypes_JSONSchemaSimpleTypes_UNKNOWN JSONSchemaSimpleTypes = 0 JSONSchemaSimpleTypes_ARRAY JSONSchemaSimpleTypes = 1 JSONSchemaSimpleTypes_BOOLEAN JSONSchemaSimpleTypes = 2 JSONSchemaSimpleTypes_INTEGER JSONSchemaSimpleTypes = 3 JSONSchemaSimpleTypes_NULL JSONSchemaSimpleTypes = 4 JSONSchemaSimpleTypes_NUMBER JSONSchemaSimpleTypes = 5 JSONSchemaSimpleTypes_OBJECT JSONSchemaSimpleTypes = 6 JSONSchemaSimpleTypes_STRING JSONSchemaSimpleTypes = 7 )
func (JSONSchemaSimpleTypes) Descriptor ¶
func (JSONSchemaSimpleTypes) Descriptor() protoreflect.EnumDescriptor
func (JSONSchemaSimpleTypes) Enum ¶
func (x JSONSchemaSimpleTypes) Enum() *JSONSchemaSimpleTypes
func (JSONSchemaSimpleTypes) EnumDescriptor
deprecated
func (JSONSchemaSimpleTypes) EnumDescriptor() ([]byte, []int)
Deprecated: Use JSONSchemaSimpleTypes.Descriptor instead.
func (JSONSchemaSimpleTypes) Number ¶
func (x JSONSchemaSimpleTypes) Number() protoreflect.EnumNumber
func (JSONSchemaSimpleTypes) String ¶
func (x JSONSchemaSimpleTypes) String() string
func (JSONSchemaSimpleTypes) Type ¶
func (JSONSchemaSimpleTypes) Type() protoreflect.EnumType
type License ¶
type License struct { // The license name used for the API. Name string `protobuf:"bytes,1,opt,name=Name,json=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,json=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/master/LICENSE.txt"; }; ... }; ... };
func (*License) Descriptor
deprecated
func (*License) ProtoMessage ¶
func (*License) ProtoMessage()
func (*License) ProtoReflect ¶
func (x *License) ProtoReflect() protoreflect.Message
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,json=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,json=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,json=description,proto3" json:"Description,omitempty"` // Additional external documentation for this operation. ExternalDocs *ExternalDocumentation `protobuf:"bytes,4,opt,name=ExternalDocs,json=external_docs,proto3" json:"ExternalDocs,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=OperationID,json=operation_id,proto3" json:"OperationID,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,json=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,json=produces,proto3" json:"Produces,omitempty"` // The list of possible responses as they are returned from executing this // operation. Responses map[string]*Response `` /* 174-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 `protobuf:"varint,10,rep,packed,name=Schemes,json=schemes,proto3,enum=openapiv2.Scheme" json:"Schemes,omitempty"` // Declares this operation to be deprecated. Usage of the declared operation // should be refrained. Default value is false. Deprecated bool `protobuf:"varint,11,opt,name=Deprecated,json=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,json=security,proto3" json:"Security,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) Descriptor
deprecated
func (*Operation) GetConsumes ¶
func (*Operation) GetDeprecated ¶
func (*Operation) GetDescription ¶
func (*Operation) GetExternalDocs ¶
func (x *Operation) GetExternalDocs() *ExternalDocumentation
func (*Operation) GetOperationID ¶
func (*Operation) GetProduces ¶
func (*Operation) GetResponses ¶
func (*Operation) GetSchemes ¶
func (*Operation) GetSecurity ¶
func (x *Operation) GetSecurity() []*SecurityRequirement
func (*Operation) GetSummary ¶
func (*Operation) ProtoMessage ¶
func (*Operation) ProtoMessage()
func (*Operation) ProtoReflect ¶
func (x *Operation) ProtoReflect() protoreflect.Message
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,json=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,json=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 `` /* 168-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 `` /* 171-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) Descriptor
deprecated
func (*Response) GetDescription ¶
func (*Response) GetExamples ¶
func (*Response) GetHeaders ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type Schema ¶
type Schema struct { JSONSchema *JSONSchema `protobuf:"bytes,1,opt,name=JSONSchema,json=json_schema,proto3" json:"JSONSchema,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,json=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=ReadOnly,json=read_only,proto3" json:"ReadOnly,omitempty"` // Additional external documentation for this schema. ExternalDocs *ExternalDocumentation `protobuf:"bytes,5,opt,name=ExternalDocs,json=external_docs,proto3" json:"ExternalDocs,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,json=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) Descriptor
deprecated
func (*Schema) GetDiscriminator ¶
func (*Schema) GetExample ¶
func (*Schema) GetExternalDocs ¶
func (x *Schema) GetExternalDocs() *ExternalDocumentation
func (*Schema) GetJSONSchema ¶
func (x *Schema) GetJSONSchema() *JSONSchema
func (*Schema) GetReadOnly ¶
func (*Schema) ProtoMessage ¶
func (*Schema) ProtoMessage()
func (*Schema) ProtoReflect ¶
func (x *Schema) ProtoReflect() protoreflect.Message
type Scheme ¶
type Scheme int32
Scheme describes the schemes supported by the OpenAPI Swagger and Operation objects.
func (Scheme) Descriptor ¶
func (Scheme) Descriptor() protoreflect.EnumDescriptor
func (Scheme) EnumDescriptor
deprecated
func (Scheme) Number ¶
func (x Scheme) Number() protoreflect.EnumNumber
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 `` /* 162-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) Descriptor
deprecated
func (*Scopes) ProtoMessage ¶
func (*Scopes) ProtoMessage()
func (*Scopes) ProtoReflect ¶
func (x *Scopes) ProtoReflect() protoreflect.Message
type SecurityDefinitions ¶
type SecurityDefinitions struct { // A single security scheme definition, mapping a "name" to the scheme it // defines. Security map[string]*SecurityScheme `` /* 171-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) Descriptor
deprecated
func (*SecurityDefinitions) Descriptor() ([]byte, []int)
Deprecated: Use SecurityDefinitions.ProtoReflect.Descriptor instead.
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) String ¶
func (x *SecurityDefinitions) String() string
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 `` /* 205-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) Descriptor
deprecated
func (*SecurityRequirement) Descriptor() ([]byte, []int)
Deprecated: Use SecurityRequirement.ProtoReflect.Descriptor instead.
func (*SecurityRequirement) GetSecurityRequirement ¶
func (x *SecurityRequirement) GetSecurityRequirement() map[string]*SecurityRequirement_SecurityRequirementValue
func (*SecurityRequirement) ProtoMessage ¶
func (*SecurityRequirement) ProtoMessage()
func (*SecurityRequirement) ProtoReflect ¶
func (x *SecurityRequirement) ProtoReflect() protoreflect.Message
func (*SecurityRequirement) Reset ¶
func (x *SecurityRequirement) Reset()
func (*SecurityRequirement) String ¶
func (x *SecurityRequirement) String() string
type SecurityRequirement_SecurityRequirementValue ¶
type SecurityRequirement_SecurityRequirementValue struct { Scope []string `protobuf:"bytes,1,rep,name=Scope,json=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) Descriptor
deprecated
func (*SecurityRequirement_SecurityRequirementValue) Descriptor() ([]byte, []int)
Deprecated: Use SecurityRequirement_SecurityRequirementValue.ProtoReflect.Descriptor instead.
func (*SecurityRequirement_SecurityRequirementValue) GetScope ¶
func (x *SecurityRequirement_SecurityRequirementValue) GetScope() []string
func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage ¶
func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage()
func (*SecurityRequirement_SecurityRequirementValue) ProtoReflect ¶
func (x *SecurityRequirement_SecurityRequirementValue) ProtoReflect() protoreflect.Message
func (*SecurityRequirement_SecurityRequirementValue) Reset ¶
func (x *SecurityRequirement_SecurityRequirementValue) Reset()
func (*SecurityRequirement_SecurityRequirementValue) String ¶
func (x *SecurityRequirement_SecurityRequirementValue) String() string
type SecurityScheme ¶
type SecurityScheme struct { // The type of the security scheme. Valid values are "basic", // "apiKey" or "oauth2". Type Type `protobuf:"varint,1,opt,name=Type,json=type,proto3,enum=openapiv2.Type" json:"Type,omitempty"` // A short description for security scheme. Description string `protobuf:"bytes,2,opt,name=Description,json=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,json=name,proto3" json:"Name,omitempty"` // The location of the API key. Valid values are "query" or // "header". // Valid for apiKey. In In `protobuf:"varint,4,opt,name=In,json=in,proto3,enum=openapiv2.In" json:"In,omitempty"` // The flow used by the OAuth2 security scheme. Valid values are // "implicit", "password", "application" or "accessCode". // Valid for oauth2. Flow Flow `protobuf:"varint,5,opt,name=Flow,json=flow,proto3,enum=openapiv2.Flow" json:"Flow,omitempty"` // 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=AuthorizationURL,json=authorization_url,proto3" json:"AuthorizationURL,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=TokenURL,json=token_url,proto3" json:"TokenURL,omitempty"` // The available scopes for the OAuth2 security scheme. // Valid for oauth2. Scopes *Scopes `protobuf:"bytes,8,opt,name=Scopes,json=scopes,proto3" json:"Scopes,omitempty"` // 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) Descriptor
deprecated
func (*SecurityScheme) Descriptor() ([]byte, []int)
Deprecated: Use SecurityScheme.ProtoReflect.Descriptor instead.
func (*SecurityScheme) GetAuthorizationURL ¶
func (x *SecurityScheme) GetAuthorizationURL() string
func (*SecurityScheme) GetDescription ¶
func (x *SecurityScheme) GetDescription() string
func (*SecurityScheme) GetFlow ¶
func (x *SecurityScheme) GetFlow() Flow
func (*SecurityScheme) GetIn ¶
func (x *SecurityScheme) GetIn() 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() Type
func (*SecurityScheme) ProtoMessage ¶
func (*SecurityScheme) ProtoMessage()
func (*SecurityScheme) ProtoReflect ¶
func (x *SecurityScheme) ProtoReflect() protoreflect.Message
func (*SecurityScheme) Reset ¶
func (x *SecurityScheme) Reset()
func (*SecurityScheme) String ¶
func (x *SecurityScheme) String() string
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,json=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,json=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,json=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=BasePath,json=base_path,proto3" json:"BasePath,omitempty"` // The transfer protocol of the API. Values MUST be from the list: "http", // "https", "ws", "wss". If the schemes is not included, the default scheme to // be used is the one used to access the OpenAPI definition itself. Schemes []Scheme `protobuf:"varint,5,rep,packed,name=Schemes,json=schemes,proto3,enum=openapiv2.Scheme" json:"Schemes,omitempty"` // A list of MIME types the APIs can consume. This is global to all APIs but // can be overridden on specific API calls. Value MUST be as described under // Mime Types. Consumes []string `protobuf:"bytes,6,rep,name=Consumes,json=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,json=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 `` /* 175-byte string literal not displayed */ // Security scheme definitions that can be used across the specification. SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,11,opt,name=SecurityDefinitions,json=security_definitions,proto3" json:"SecurityDefinitions,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,json=security,proto3" json:"Security,omitempty"` // Additional external documentation. ExternalDocs *ExternalDocumentation `protobuf:"bytes,14,opt,name=ExternalDocs,json=external_docs,proto3" json:"ExternalDocs,omitempty"` // 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/master/LICENSE.txt"; }; }; schemes: HTTPS; consumes: "application/json"; produces: "application/json"; };
func (*Swagger) Descriptor
deprecated
func (*Swagger) GetBasePath ¶
func (*Swagger) GetConsumes ¶
func (*Swagger) GetExternalDocs ¶
func (x *Swagger) GetExternalDocs() *ExternalDocumentation
func (*Swagger) GetProduces ¶
func (*Swagger) GetResponses ¶
func (*Swagger) GetSchemes ¶
func (*Swagger) GetSecurity ¶
func (x *Swagger) GetSecurity() []*SecurityRequirement
func (*Swagger) GetSecurityDefinitions ¶
func (x *Swagger) GetSecurityDefinitions() *SecurityDefinitions
func (*Swagger) GetSwagger ¶
func (*Swagger) ProtoMessage ¶
func (*Swagger) ProtoMessage()
func (*Swagger) ProtoReflect ¶
func (x *Swagger) ProtoReflect() protoreflect.Message
type Tag ¶
type Tag struct { // A short description for the tag. GFM syntax can be used for rich text // representation. Description string `protobuf:"bytes,2,opt,name=Description,json=description,proto3" json:"Description,omitempty"` // Additional external documentation for this tag. ExternalDocs *ExternalDocumentation `protobuf:"bytes,3,opt,name=ExternalDocs,json=external_docs,proto3" json:"ExternalDocs,omitempty"` // 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) Descriptor
deprecated
func (*Tag) GetDescription ¶
func (*Tag) GetExternalDocs ¶
func (x *Tag) GetExternalDocs() *ExternalDocumentation
func (*Tag) ProtoMessage ¶
func (*Tag) ProtoMessage()
func (*Tag) ProtoReflect ¶
func (x *Tag) ProtoReflect() protoreflect.Message
type Type ¶
type Type int32
The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".
func (Type) Descriptor ¶
func (Type) Descriptor() protoreflect.EnumDescriptor
func (Type) EnumDescriptor
deprecated
func (Type) Number ¶
func (x Type) Number() protoreflect.EnumNumber
func (Type) Type ¶
func (Type) Type() protoreflect.EnumType