Documentation ¶
Overview ¶
Package options is a generated protocol buffer package.
It is generated from these files:
protoc-gen-swagger/options/openapiv2.proto protoc-gen-swagger/options/annotations.proto
It has these top-level messages:
Swagger Operation Info Contact ExternalDocumentation Schema JSONSchema Tag
Index ¶
- Variables
- type Contact
- type ExternalDocumentation
- type Info
- func (*Info) Descriptor() ([]byte, []int)
- func (m *Info) GetContact() *Contact
- func (m *Info) GetDescription() string
- func (m *Info) GetTermsOfService() string
- func (m *Info) GetTitle() string
- func (m *Info) GetVersion() string
- func (*Info) ProtoMessage()
- func (m *Info) Reset()
- func (m *Info) String() string
- type JSONSchema
- func (*JSONSchema) Descriptor() ([]byte, []int)
- func (m *JSONSchema) GetArray() []string
- func (m *JSONSchema) GetDefault() string
- func (m *JSONSchema) GetDescription() string
- func (m *JSONSchema) GetExclusiveMaximum() bool
- func (m *JSONSchema) GetExclusiveMinimum() bool
- func (m *JSONSchema) GetMaxItems() uint64
- func (m *JSONSchema) GetMaxLength() uint64
- func (m *JSONSchema) GetMaxProperties() uint64
- func (m *JSONSchema) GetMaximum() float64
- func (m *JSONSchema) GetMinItems() uint64
- func (m *JSONSchema) GetMinLength() uint64
- func (m *JSONSchema) GetMinProperties() uint64
- func (m *JSONSchema) GetMinimum() float64
- func (m *JSONSchema) GetMultipleOf() float64
- func (m *JSONSchema) GetPattern() string
- func (m *JSONSchema) GetRequired() []string
- func (m *JSONSchema) GetTitle() string
- func (m *JSONSchema) GetType() []JSONSchema_JSONSchemaSimpleTypes
- func (m *JSONSchema) GetUniqueItems() bool
- func (*JSONSchema) ProtoMessage()
- func (m *JSONSchema) Reset()
- func (m *JSONSchema) String() string
- type JSONSchema_JSONSchemaSimpleTypes
- type Operation
- func (*Operation) Descriptor() ([]byte, []int)
- func (m *Operation) GetConsumes() []string
- func (m *Operation) GetDeprecated() bool
- func (m *Operation) GetDescription() string
- func (m *Operation) GetExternalDocs() *ExternalDocumentation
- func (m *Operation) GetOperationId() string
- func (m *Operation) GetProduces() []string
- func (m *Operation) GetSchemes() []string
- func (m *Operation) GetSummary() string
- func (m *Operation) GetTags() []string
- func (*Operation) ProtoMessage()
- func (m *Operation) Reset()
- func (m *Operation) String() string
- type Schema
- func (*Schema) Descriptor() ([]byte, []int)
- func (m *Schema) GetDiscriminator() string
- func (m *Schema) GetExample() *google_protobuf.Any
- func (m *Schema) GetExternalDocs() *ExternalDocumentation
- func (m *Schema) GetJsonSchema() *JSONSchema
- func (m *Schema) GetReadOnly() bool
- func (*Schema) ProtoMessage()
- func (m *Schema) Reset()
- func (m *Schema) String() string
- type Swagger
- func (*Swagger) Descriptor() ([]byte, []int)
- func (m *Swagger) GetBasePath() string
- func (m *Swagger) GetConsumes() []string
- func (m *Swagger) GetExternalDocs() *ExternalDocumentation
- func (m *Swagger) GetHost() string
- func (m *Swagger) GetInfo() *Info
- func (m *Swagger) GetProduces() []string
- func (m *Swagger) GetSchemes() []Swagger_SwaggerScheme
- func (m *Swagger) GetSwagger() string
- func (*Swagger) ProtoMessage()
- func (m *Swagger) Reset()
- func (m *Swagger) String() string
- type Swagger_SwaggerScheme
- type Tag
Constants ¶
This section is empty.
Variables ¶
var E_Openapiv2Operation = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf1.MethodOptions)(nil), ExtensionType: (*Operation)(nil), Field: 1042, Name: "grpc.gateway.protoc_gen_swagger.options.openapiv2_operation", Tag: "bytes,1042,opt,name=openapiv2_operation,json=openapiv2Operation", Filename: "protoc-gen-swagger/options/annotations.proto", }
var E_Openapiv2Schema = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf1.MessageOptions)(nil), ExtensionType: (*Schema)(nil), Field: 1042, Name: "grpc.gateway.protoc_gen_swagger.options.openapiv2_schema", Tag: "bytes,1042,opt,name=openapiv2_schema,json=openapiv2Schema", Filename: "protoc-gen-swagger/options/annotations.proto", }
var E_Openapiv2Swagger = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf1.FileOptions)(nil), ExtensionType: (*Swagger)(nil), Field: 1042, Name: "grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger", Tag: "bytes,1042,opt,name=openapiv2_swagger,json=openapiv2Swagger", Filename: "protoc-gen-swagger/options/annotations.proto", }
var E_Openapiv2Tag = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf1.ServiceOptions)(nil), ExtensionType: (*Tag)(nil), Field: 1042, Name: "grpc.gateway.protoc_gen_swagger.options.openapiv2_tag", Tag: "bytes,1042,opt,name=openapiv2_tag,json=openapiv2Tag", Filename: "protoc-gen-swagger/options/annotations.proto", }
var JSONSchema_JSONSchemaSimpleTypes_name = map[int32]string{
0: "UNKNOWN",
1: "ARRAY",
2: "BOOLEAN",
3: "INTEGER",
4: "NULL",
5: "NUMBER",
6: "OBJECT",
7: "STRING",
}
var JSONSchema_JSONSchemaSimpleTypes_value = map[string]int32{
"UNKNOWN": 0,
"ARRAY": 1,
"BOOLEAN": 2,
"INTEGER": 3,
"NULL": 4,
"NUMBER": 5,
"OBJECT": 6,
"STRING": 7,
}
var Swagger_SwaggerScheme_name = map[int32]string{
0: "UNKNOWN",
1: "HTTP",
2: "HTTPS",
3: "WS",
4: "WSS",
}
var Swagger_SwaggerScheme_value = map[string]int32{
"UNKNOWN": 0,
"HTTP": 1,
"HTTPS": 2,
"WS": 3,
"WSS": 4,
}
Functions ¶
This section is empty.
Types ¶
type Contact ¶
type Contact struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"` Email string `protobuf:"bytes,3,opt,name=email" json:"email,omitempty"` }
`Contact` is a representation of OpenAPI v2 specification's Contact object.
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
TODO(ivucica): document fields
func (*Contact) Descriptor ¶
func (*Contact) ProtoMessage ¶
func (*Contact) ProtoMessage()
type ExternalDocumentation ¶
type ExternalDocumentation struct { Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"` Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"` }
`ExternalDocumentation` is a representation of OpenAPI v2 specification's ExternalDocumentation object.
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
TODO(ivucica): document fields
func (*ExternalDocumentation) Descriptor ¶
func (*ExternalDocumentation) Descriptor() ([]byte, []int)
func (*ExternalDocumentation) GetDescription ¶
func (m *ExternalDocumentation) GetDescription() string
func (*ExternalDocumentation) GetUrl ¶
func (m *ExternalDocumentation) GetUrl() string
func (*ExternalDocumentation) ProtoMessage ¶
func (*ExternalDocumentation) ProtoMessage()
func (*ExternalDocumentation) Reset ¶
func (m *ExternalDocumentation) Reset()
func (*ExternalDocumentation) String ¶
func (m *ExternalDocumentation) String() string
type Info ¶
type Info struct { Title string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"` Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` TermsOfService string `protobuf:"bytes,3,opt,name=terms_of_service,json=termsOfService" json:"terms_of_service,omitempty"` Contact *Contact `protobuf:"bytes,4,opt,name=contact" json:"contact,omitempty"` Version string `protobuf:"bytes,6,opt,name=version" json:"version,omitempty"` }
`Info` is a representation of OpenAPI v2 specification's Info object.
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject
TODO(ivucica): document fields
func (*Info) Descriptor ¶
func (*Info) GetContact ¶
func (*Info) GetDescription ¶
func (*Info) GetTermsOfService ¶
func (*Info) GetVersion ¶
func (*Info) ProtoMessage ¶
func (*Info) ProtoMessage()
type JSONSchema ¶
type JSONSchema struct { Title string `protobuf:"bytes,5,opt,name=title" json:"title,omitempty"` Description string `protobuf:"bytes,6,opt,name=description" json:"description,omitempty"` Default string `protobuf:"bytes,7,opt,name=default" json:"default,omitempty"` MultipleOf float64 `protobuf:"fixed64,10,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"` Maximum float64 `protobuf:"fixed64,11,opt,name=maximum" json:"maximum,omitempty"` ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"` Minimum float64 `protobuf:"fixed64,13,opt,name=minimum" json:"minimum,omitempty"` ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"` MaxLength uint64 `protobuf:"varint,15,opt,name=max_length,json=maxLength" json:"max_length,omitempty"` MinLength uint64 `protobuf:"varint,16,opt,name=min_length,json=minLength" json:"min_length,omitempty"` Pattern string `protobuf:"bytes,17,opt,name=pattern" json:"pattern,omitempty"` MaxItems uint64 `protobuf:"varint,20,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` MinItems uint64 `protobuf:"varint,21,opt,name=min_items,json=minItems" json:"min_items,omitempty"` UniqueItems bool `protobuf:"varint,22,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"` MaxProperties uint64 `protobuf:"varint,24,opt,name=max_properties,json=maxProperties" json:"max_properties,omitempty"` MinProperties uint64 `protobuf:"varint,25,opt,name=min_properties,json=minProperties" json:"min_properties,omitempty"` Required []string `protobuf:"bytes,26,rep,name=required" json:"required,omitempty"` // Items in 'array' must be unique. Array []string `protobuf:"bytes,34,rep,name=array" json:"array,omitempty"` Type []JSONSchema_JSONSchemaSimpleTypes `` /* 141-byte string literal not displayed */ }
`JSONSchema` represents properties from JSON Schema taken, and as used, in the OpenAPI v2 spec.
This includes changes made by OpenAPI v2.
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
See also: https://cswr.github.io/JsonSchema/spec/basic_types/, https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
TODO(ivucica): document fields
func (*JSONSchema) Descriptor ¶
func (*JSONSchema) Descriptor() ([]byte, []int)
func (*JSONSchema) GetArray ¶
func (m *JSONSchema) GetArray() []string
func (*JSONSchema) GetDefault ¶
func (m *JSONSchema) GetDefault() string
func (*JSONSchema) GetDescription ¶
func (m *JSONSchema) GetDescription() string
func (*JSONSchema) GetExclusiveMaximum ¶
func (m *JSONSchema) GetExclusiveMaximum() bool
func (*JSONSchema) GetExclusiveMinimum ¶
func (m *JSONSchema) GetExclusiveMinimum() bool
func (*JSONSchema) GetMaxItems ¶
func (m *JSONSchema) GetMaxItems() uint64
func (*JSONSchema) GetMaxLength ¶
func (m *JSONSchema) GetMaxLength() uint64
func (*JSONSchema) GetMaxProperties ¶
func (m *JSONSchema) GetMaxProperties() uint64
func (*JSONSchema) GetMaximum ¶
func (m *JSONSchema) GetMaximum() float64
func (*JSONSchema) GetMinItems ¶
func (m *JSONSchema) GetMinItems() uint64
func (*JSONSchema) GetMinLength ¶
func (m *JSONSchema) GetMinLength() uint64
func (*JSONSchema) GetMinProperties ¶
func (m *JSONSchema) GetMinProperties() uint64
func (*JSONSchema) GetMinimum ¶
func (m *JSONSchema) GetMinimum() float64
func (*JSONSchema) GetMultipleOf ¶
func (m *JSONSchema) GetMultipleOf() float64
func (*JSONSchema) GetPattern ¶
func (m *JSONSchema) GetPattern() string
func (*JSONSchema) GetRequired ¶
func (m *JSONSchema) GetRequired() []string
func (*JSONSchema) GetTitle ¶
func (m *JSONSchema) GetTitle() string
func (*JSONSchema) GetType ¶
func (m *JSONSchema) GetType() []JSONSchema_JSONSchemaSimpleTypes
func (*JSONSchema) GetUniqueItems ¶
func (m *JSONSchema) GetUniqueItems() bool
func (*JSONSchema) ProtoMessage ¶
func (*JSONSchema) ProtoMessage()
func (*JSONSchema) Reset ¶
func (m *JSONSchema) Reset()
func (*JSONSchema) String ¶
func (m *JSONSchema) String() string
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) EnumDescriptor ¶
func (JSONSchema_JSONSchemaSimpleTypes) EnumDescriptor() ([]byte, []int)
func (JSONSchema_JSONSchemaSimpleTypes) String ¶
func (x JSONSchema_JSONSchemaSimpleTypes) String() string
type Operation ¶
type Operation struct { Tags []string `protobuf:"bytes,1,rep,name=tags" json:"tags,omitempty"` Summary string `protobuf:"bytes,2,opt,name=summary" json:"summary,omitempty"` Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` ExternalDocs *ExternalDocumentation `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"` OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId" json:"operation_id,omitempty"` Consumes []string `protobuf:"bytes,6,rep,name=consumes" json:"consumes,omitempty"` Produces []string `protobuf:"bytes,7,rep,name=produces" json:"produces,omitempty"` Schemes []string `protobuf:"bytes,10,rep,name=schemes" json:"schemes,omitempty"` Deprecated bool `protobuf:"varint,11,opt,name=deprecated" json:"deprecated,omitempty"` }
`Operation` is a representation of OpenAPI v2 specification's Operation object.
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject
TODO(ivucica): document fields
func (*Operation) Descriptor ¶
func (*Operation) GetConsumes ¶
func (*Operation) GetDeprecated ¶
func (*Operation) GetDescription ¶
func (*Operation) GetExternalDocs ¶
func (m *Operation) GetExternalDocs() *ExternalDocumentation
func (*Operation) GetOperationId ¶
func (*Operation) GetProduces ¶
func (*Operation) GetSchemes ¶
func (*Operation) GetSummary ¶
func (*Operation) ProtoMessage ¶
func (*Operation) ProtoMessage()
type Schema ¶
type Schema struct { JsonSchema *JSONSchema `protobuf:"bytes,1,opt,name=json_schema,json=jsonSchema" json:"json_schema,omitempty"` Discriminator string `protobuf:"bytes,2,opt,name=discriminator" json:"discriminator,omitempty"` ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly" json:"read_only,omitempty"` ExternalDocs *ExternalDocumentation `protobuf:"bytes,5,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"` Example *google_protobuf.Any `protobuf:"bytes,6,opt,name=example" json:"example,omitempty"` }
`Schema` is a representation of OpenAPI v2 specification's Schema object.
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
TODO(ivucica): document fields
func (*Schema) Descriptor ¶
func (*Schema) GetDiscriminator ¶
func (*Schema) GetExample ¶
func (m *Schema) GetExample() *google_protobuf.Any
func (*Schema) GetExternalDocs ¶
func (m *Schema) GetExternalDocs() *ExternalDocumentation
func (*Schema) GetJsonSchema ¶
func (m *Schema) GetJsonSchema() *JSONSchema
func (*Schema) GetReadOnly ¶
func (*Schema) ProtoMessage ¶
func (*Schema) ProtoMessage()
type Swagger ¶
type Swagger struct { Swagger string `protobuf:"bytes,1,opt,name=swagger" json:"swagger,omitempty"` Info *Info `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` Host string `protobuf:"bytes,3,opt,name=host" json:"host,omitempty"` BasePath string `protobuf:"bytes,4,opt,name=base_path,json=basePath" json:"base_path,omitempty"` Schemes []Swagger_SwaggerScheme `` /* 135-byte string literal not displayed */ Consumes []string `protobuf:"bytes,6,rep,name=consumes" json:"consumes,omitempty"` Produces []string `protobuf:"bytes,7,rep,name=produces" json:"produces,omitempty"` ExternalDocs *ExternalDocumentation `protobuf:"bytes,14,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"` }
`Swagger` is a representation of OpenAPI v2 specification's Swagger object.
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
TODO(ivucica): document fields
func (*Swagger) Descriptor ¶
func (*Swagger) GetBasePath ¶
func (*Swagger) GetConsumes ¶
func (*Swagger) GetExternalDocs ¶
func (m *Swagger) GetExternalDocs() *ExternalDocumentation
func (*Swagger) GetProduces ¶
func (*Swagger) GetSchemes ¶
func (m *Swagger) GetSchemes() []Swagger_SwaggerScheme
func (*Swagger) GetSwagger ¶
func (*Swagger) ProtoMessage ¶
func (*Swagger) ProtoMessage()
type Swagger_SwaggerScheme ¶
type Swagger_SwaggerScheme int32
const ( Swagger_UNKNOWN Swagger_SwaggerScheme = 0 Swagger_HTTP Swagger_SwaggerScheme = 1 Swagger_HTTPS Swagger_SwaggerScheme = 2 Swagger_WS Swagger_SwaggerScheme = 3 Swagger_WSS Swagger_SwaggerScheme = 4 )
func (Swagger_SwaggerScheme) EnumDescriptor ¶
func (Swagger_SwaggerScheme) EnumDescriptor() ([]byte, []int)
func (Swagger_SwaggerScheme) String ¶
func (x Swagger_SwaggerScheme) String() string
type Tag ¶
type Tag struct { // TODO(ivucica): Description should be extracted from comments on the proto // service object. Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` ExternalDocs *ExternalDocumentation `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"` }
`Tag` is a representation of OpenAPI v2 specification's Tag object.
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
TODO(ivucica): document fields
func (*Tag) Descriptor ¶
func (*Tag) GetDescription ¶
func (*Tag) GetExternalDocs ¶
func (m *Tag) GetExternalDocs() *ExternalDocumentation
func (*Tag) ProtoMessage ¶
func (*Tag) ProtoMessage()