Documentation
¶
Index ¶
- func AppendComponents(spec *v3.Document, components *v3.Components)
- func AppendStringDedupe(strs []string, str string) []string
- func BoolPtr(b bool) *bool
- func ConvertNodeV3toV4(n *yamlv3.Node) *yaml.Node
- func FormatComments(loc protoreflect.SourceLocation) string
- func FormatOperationComments(loc protoreflect.SourceLocation) (summary string, description string)
- func FormatTypeRef(t string) string
- func IsEmpty(msg protoreflect.MessageDescriptor) bool
- func IsFieldDeprecated(fd protoreflect.FieldDescriptor) *bool
- func IsMethodDeprecated(md protoreflect.MethodDescriptor) *bool
- func IsWellKnown(msg protoreflect.MessageDescriptor) bool
- func MakeFieldName(opts options.Options, fd protoreflect.FieldDescriptor) string
- func MakeMediaTypes(opts options.Options, s *base.SchemaProxy, isRequest, isStreaming bool) *orderedmap.Map[string, *v3.MediaType]
- func MakePath(opts options.Options, main string) string
- func MergeOrAppendParameter(existingParams []*v3.Parameter, newParam *v3.Parameter) []*v3.Parameter
- func MergeParameters(existingParams []*v3.Parameter, newParams []*v3.Parameter) []*v3.Parameter
- func MethodToRequestBody(opts options.Options, method protoreflect.MethodDescriptor, ...) *v3.RequestBody
- func ResolveSchemaRef(ref string) string
- func Singular(plural string) string
- func TypeFieldDescription(opts options.Options, tt protoreflect.FieldDescriptor) string
- type IDSchema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendComponents ¶ added in v0.9.1
func AppendComponents(spec *v3.Document, components *v3.Components)
func AppendStringDedupe ¶ added in v0.14.1
func FormatComments ¶
func FormatComments(loc protoreflect.SourceLocation) string
func FormatOperationComments ¶ added in v0.16.2
func FormatOperationComments(loc protoreflect.SourceLocation) (summary string, description string)
func FormatTypeRef ¶
func IsEmpty ¶
func IsEmpty(msg protoreflect.MessageDescriptor) bool
func IsFieldDeprecated ¶ added in v0.16.0
func IsFieldDeprecated(fd protoreflect.FieldDescriptor) *bool
func IsMethodDeprecated ¶
func IsMethodDeprecated(md protoreflect.MethodDescriptor) *bool
func IsWellKnown ¶
func IsWellKnown(msg protoreflect.MessageDescriptor) bool
func MakeFieldName ¶ added in v0.11.0
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 MergeOrAppendParameter ¶ added in v0.24.0
MergeOrAppendParameter merges or appends a parameter to a list of parameters.
func MergeParameters ¶ added in v0.25.2
MergeParameters merges new parameters into existing parameters. It uses a map to efficiently check for duplicates and merge properties.
func MethodToRequestBody ¶
func MethodToRequestBody(opts options.Options, method protoreflect.MethodDescriptor, s *base.SchemaProxy, isStreaming bool) *v3.RequestBody
func ResolveSchemaRef ¶ added in v0.23.0
ResolveSchemaRef takes a reference string and determines if it is a fully qualified protobuf message name. If so, it converts it to a valid OpenAPI schema reference. Otherwise, it returns the original string.
func TypeFieldDescription ¶ added in v0.14.0
func TypeFieldDescription(opts options.Options, tt protoreflect.FieldDescriptor) string
Types ¶
type IDSchema ¶
func NewGoogleAny ¶
func NewGoogleAny() *IDSchema
func WellKnownToSchema ¶ added in v0.9.1
func WellKnownToSchema(msg protoreflect.MessageDescriptor) *IDSchema
Click to show internal directories.
Click to hide internal directories.