generator

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// optional openapi.v3.Service service = 1144;
	E_Service = &file_openapiv3_service_proto_extTypes[0]
)

Extension fields to descriptorpb.ServiceOptions.

View Source
var File_openapiv3_service_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Version         *string
	Title           *string
	Description     *string
	Naming          *string
	FQSchemaNaming  *bool
	EnumType        *string
	CircularDepth   *int
	DefaultResponse *bool
	OutputMode      *string
}

type OpenAPIv3Generator

type OpenAPIv3Generator struct {
	// contains filtered or unexported fields
}

OpenAPIv3Generator holds internal state needed to generate an OpenAPIv3 document for a transcoded Protocol Buffer service.

func NewOpenAPIv3Generator

func NewOpenAPIv3Generator(plugin *protogen.Plugin, conf Configuration, inputFiles []*protogen.File) *OpenAPIv3Generator

NewOpenAPIv3Generator creates a new generator for a protoc plugin invocation.

func (*OpenAPIv3Generator) Run

func (g *OpenAPIv3Generator) Run(outputFile *protogen.GeneratedFile) error

Run runs the generator.

type OpenAPIv3Reflector

type OpenAPIv3Reflector struct {
	// contains filtered or unexported fields
}

func NewOpenAPIv3Reflector

func NewOpenAPIv3Reflector(conf Configuration) *OpenAPIv3Reflector

NewOpenAPIv3Reflector creates a new reflector.

type Service added in v0.7.5

type Service struct {
	Tags                   []string                          `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
	ExternalDocs           *openapiv3.ExternalDocs           `protobuf:"bytes,2,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
	Parameters             []*openapiv3.ParameterOrReference `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty"`
	Security               []*openapiv3.SecurityRequirement  `protobuf:"bytes,4,rep,name=security,proto3" json:"security,omitempty"`
	Servers                []*openapiv3.Server               `protobuf:"bytes,5,rep,name=servers,proto3" json:"servers,omitempty"`
	SpecificationExtension []*openapiv3.NamedAny             `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Service) Descriptor deprecated added in v0.7.5

func (*Service) Descriptor() ([]byte, []int)

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetExternalDocs added in v0.7.5

func (x *Service) GetExternalDocs() *openapiv3.ExternalDocs

func (*Service) GetParameters added in v0.7.5

func (x *Service) GetParameters() []*openapiv3.ParameterOrReference

func (*Service) GetSecurity added in v0.7.5

func (x *Service) GetSecurity() []*openapiv3.SecurityRequirement

func (*Service) GetServers added in v0.7.5

func (x *Service) GetServers() []*openapiv3.Server

func (*Service) GetSpecificationExtension added in v0.7.5

func (x *Service) GetSpecificationExtension() []*openapiv3.NamedAny

func (*Service) GetTags added in v0.7.5

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

func (*Service) ProtoMessage added in v0.7.5

func (*Service) ProtoMessage()

func (*Service) ProtoReflect added in v0.7.5

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

func (*Service) Reset added in v0.7.5

func (x *Service) Reset()

func (*Service) String added in v0.7.5

func (x *Service) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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