util

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendComponents

func AppendComponents(spec *v3.Document, components *v3.Components)

func AppendStringDedupe

func AppendStringDedupe(strs []string, str string) []string

func BoolPtr

func BoolPtr(b bool) *bool

func FormatComments

func FormatComments(loc protoreflect.SourceLocation) string

func FormatTypeRef

func FormatTypeRef(t string) string

func IsEmpty

func IsEmpty(msg protoreflect.MessageDescriptor) bool

func IsFieldDeprecated

func IsFieldDeprecated(fd protoreflect.FieldDescriptor) *bool

func IsMethodDeprecated

func IsMethodDeprecated(md protoreflect.MethodDescriptor) *bool

func IsWellKnown

func IsWellKnown(msg protoreflect.MessageDescriptor) bool

func MakeFieldName

func MakeFieldName(opts options.Options, fd protoreflect.FieldDescriptor) string

func MakeMediaTypes

func MakeMediaTypes(opts options.Options, s *base.SchemaProxy, isRequest, isStreaming bool) *orderedmap.Map[string, *v3.MediaType]

MakeMediaTypes generates media types with references to the bodies

func MakePath

func MakePath(opts options.Options, main string) string

func MethodToRequestBody

func MethodToRequestBody(opts options.Options, method protoreflect.MethodDescriptor, s *base.SchemaProxy, isStreaming bool) *v3.RequestBody

func Singular

func Singular(plural string) string

Singular returns the singular form of a given plural noun. .

func TypeFieldDescription

func TypeFieldDescription(opts options.Options, tt protoreflect.FieldDescriptor) string

Types

type IDSchema

type IDSchema struct {
	ID     string
	Schema *base.Schema
}

func NewGoogleAny

func NewGoogleAny() *IDSchema

func WellKnownToSchema

func WellKnownToSchema(msg protoreflect.MessageDescriptor) *IDSchema

Jump to

Keyboard shortcuts

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