Documentation
¶
Index ¶
- Variables
- type FieldOptions
- type MessageOptions
- type MethodOptions
- func (*MethodOptions) Descriptor() ([]byte, []int)deprecated
- func (x *MethodOptions) GetHidden() bool
- func (x *MethodOptions) GetSummary() string
- func (x *MethodOptions) GetTag() string
- func (x *MethodOptions) GetTagGroup() string
- func (*MethodOptions) ProtoMessage()
- func (x *MethodOptions) ProtoReflect() protoreflect.Message
- func (x *MethodOptions) Reset()
- func (x *MethodOptions) String() string
- type ServiceOptions
- func (*ServiceOptions) Descriptor() ([]byte, []int)deprecated
- func (x *ServiceOptions) GetHidden() bool
- func (x *ServiceOptions) GetTag() string
- func (x *ServiceOptions) GetTagGroup() string
- func (*ServiceOptions) ProtoMessage()
- func (x *ServiceOptions) ProtoReflect() protoreflect.Message
- func (x *ServiceOptions) Reset()
- func (x *ServiceOptions) String() string
Constants ¶
This section is empty.
Variables ¶
var (
// optional platform.openapi.v1.FieldOptions field = 50100;
E_Field = &file_platform_openapi_v1_options_proto_extTypes[2]
)
Extension fields to descriptorpb.FieldOptions.
var (
// optional platform.openapi.v1.MessageOptions message = 50100;
E_Message = &file_platform_openapi_v1_options_proto_extTypes[3]
)
Extension fields to descriptorpb.MessageOptions.
var (
// optional platform.openapi.v1.MethodOptions method = 50100;
E_Method = &file_platform_openapi_v1_options_proto_extTypes[1]
)
Extension fields to descriptorpb.MethodOptions.
var (
// optional platform.openapi.v1.ServiceOptions service = 50100;
E_Service = &file_platform_openapi_v1_options_proto_extTypes[0]
)
Extension fields to descriptorpb.ServiceOptions.
var File_platform_openapi_v1_options_proto protoreflect.FileDescriptor
var Proto string
Proto is the source of the options: the platform writes it into a project as <proto_dir>/platform/openapi/v1/options.proto when the project uses the platform's OpenAPI generator, so the descriptors of both are the same file.
Functions ¶
This section is empty.
Types ¶
type FieldOptions ¶
type FieldOptions struct {
// example is a value of the field as JSON: "\"Latte\"" for a string, 42, true.
Example string `protobuf:"bytes,1,opt,name=example,proto3" json:"example,omitempty"`
// contains filtered or unexported fields
}
FieldOptions describe a field.
string name = 2 [(platform.openapi.v1.field) = {example: "\"Latte\""}];
func (*FieldOptions) Descriptor
deprecated
func (*FieldOptions) Descriptor() ([]byte, []int)
Deprecated: Use FieldOptions.ProtoReflect.Descriptor instead.
func (*FieldOptions) GetExample ¶
func (x *FieldOptions) GetExample() string
func (*FieldOptions) ProtoMessage ¶
func (*FieldOptions) ProtoMessage()
func (*FieldOptions) ProtoReflect ¶
func (x *FieldOptions) ProtoReflect() protoreflect.Message
func (*FieldOptions) Reset ¶
func (x *FieldOptions) Reset()
func (*FieldOptions) String ¶
func (x *FieldOptions) String() string
type MessageOptions ¶
type MessageOptions struct {
// example is a value of the message as JSON.
Example string `protobuf:"bytes,1,opt,name=example,proto3" json:"example,omitempty"`
// contains filtered or unexported fields
}
MessageOptions describe a message.
func (*MessageOptions) Descriptor
deprecated
func (*MessageOptions) Descriptor() ([]byte, []int)
Deprecated: Use MessageOptions.ProtoReflect.Descriptor instead.
func (*MessageOptions) GetExample ¶
func (x *MessageOptions) GetExample() string
func (*MessageOptions) ProtoMessage ¶
func (*MessageOptions) ProtoMessage()
func (*MessageOptions) ProtoReflect ¶
func (x *MessageOptions) ProtoReflect() protoreflect.Message
func (*MessageOptions) Reset ¶
func (x *MessageOptions) Reset()
func (*MessageOptions) String ¶
func (x *MessageOptions) String() string
type MethodOptions ¶
type MethodOptions struct {
// tag is the section of the method; the tag of the service when empty.
Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
// tag_group is the group of that section.
TagGroup string `protobuf:"bytes,2,opt,name=tag_group,json=tagGroup,proto3" json:"tag_group,omitempty"`
// summary is the title of the method; the first paragraph of its comment when empty.
Summary string `protobuf:"bytes,3,opt,name=summary,proto3" json:"summary,omitempty"`
// hidden leaves the method out of the description.
Hidden bool `protobuf:"varint,4,opt,name=hidden,proto3" json:"hidden,omitempty"`
// contains filtered or unexported fields
}
MethodOptions describe one method.
rpc GetMenu(GetMenuRequest) returns (Menu) {
option (platform.openapi.v1.method) = {tag: "Menu", summary: "The menu of a branch"};
}
func (*MethodOptions) Descriptor
deprecated
func (*MethodOptions) Descriptor() ([]byte, []int)
Deprecated: Use MethodOptions.ProtoReflect.Descriptor instead.
func (*MethodOptions) GetHidden ¶
func (x *MethodOptions) GetHidden() bool
func (*MethodOptions) GetSummary ¶
func (x *MethodOptions) GetSummary() string
func (*MethodOptions) GetTag ¶
func (x *MethodOptions) GetTag() string
func (*MethodOptions) GetTagGroup ¶
func (x *MethodOptions) GetTagGroup() string
func (*MethodOptions) ProtoMessage ¶
func (*MethodOptions) ProtoMessage()
func (*MethodOptions) ProtoReflect ¶
func (x *MethodOptions) ProtoReflect() protoreflect.Message
func (*MethodOptions) Reset ¶
func (x *MethodOptions) Reset()
func (*MethodOptions) String ¶
func (x *MethodOptions) String() string
type ServiceOptions ¶
type ServiceOptions struct {
// tag is the section of the methods of the service; the name of the service when
// empty. Its description comes from the comment of the service or from
// api/openapi/base.yaml.
Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
// tag_group puts the section into a group of the sidebar (x-tagGroups, shown by
// Scalar and Redoc).
TagGroup string `protobuf:"bytes,2,opt,name=tag_group,json=tagGroup,proto3" json:"tag_group,omitempty"`
// hidden leaves the service out of the description.
Hidden bool `protobuf:"varint,3,opt,name=hidden,proto3" json:"hidden,omitempty"`
// contains filtered or unexported fields
}
ServiceOptions describe the section of a service.
service MenuService {
option (platform.openapi.v1.service) = {tag: "Menu", tag_group: "Public API"};
}
func (*ServiceOptions) Descriptor
deprecated
func (*ServiceOptions) Descriptor() ([]byte, []int)
Deprecated: Use ServiceOptions.ProtoReflect.Descriptor instead.
func (*ServiceOptions) GetHidden ¶
func (x *ServiceOptions) GetHidden() bool
func (*ServiceOptions) GetTag ¶
func (x *ServiceOptions) GetTag() string
func (*ServiceOptions) GetTagGroup ¶
func (x *ServiceOptions) GetTagGroup() string
func (*ServiceOptions) ProtoMessage ¶
func (*ServiceOptions) ProtoMessage()
func (*ServiceOptions) ProtoReflect ¶
func (x *ServiceOptions) ProtoReflect() protoreflect.Message
func (*ServiceOptions) Reset ¶
func (x *ServiceOptions) Reset()
func (*ServiceOptions) String ¶
func (x *ServiceOptions) String() string