Documentation
¶
Index ¶
- func AddSchemas(opts options.Options, doc *v3.Document)
- func CollectResources(fd protoreflect.FileDescriptor, resMap map[string]string)
- func IsFieldRequired(desc protoreflect.FieldDescriptor) *bool
- func SchemaWithPropertyAnnotations(opts options.Options, schema *base.Schema, desc protoreflect.FieldDescriptor) *base.Schema
- type PathItemsResult
- type Token
- type TokenType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSchemas ¶ added in v0.25.5
AddSchemas adds google.rpc.Status and google.protobuf.Any schemas to the OpenAPI document components when WithGoogleErrorDetail is enabled. This gives REST client generators typed error handling for google.api.http-annotated methods.
func CollectResources ¶ added in v0.25.7
func CollectResources(fd protoreflect.FileDescriptor, resMap map[string]string)
func IsFieldRequired ¶ added in v0.24.0
func IsFieldRequired(desc protoreflect.FieldDescriptor) *bool
IsFieldRequired determines if a parameter should be required based on field behavior annotations. Returns:
- *bool(true) if field has REQUIRED behavior
- *bool(false) if field has OPTIONAL behavior (and not REQUIRED)
- nil if field has neither, allowing other factors to determine required status
func SchemaWithPropertyAnnotations ¶ added in v0.13.0
func SchemaWithPropertyAnnotations(opts options.Options, schema *base.Schema, desc protoreflect.FieldDescriptor) *base.Schema
Types ¶
type PathItemsResult ¶ added in v0.25.4
type PathItemsResult struct {
PathItems *orderedmap.Map[string, *v3.PathItem]
DeferredParams *orderedmap.Map[string, []*v3.Parameter]
}
PathItemsResult holds path items and any parameters whose default descriptions should only be applied after all annotation processing (e.g. gnostic) has had a chance to set descriptions first.
func MakePathItems ¶
func MakePathItems(opts options.Options, md protoreflect.MethodDescriptor) (*PathItemsResult, bool)
type Token ¶
Token represents a lexical token.
func RunPathPatternLexer ¶
RunPathPatternLexer takes an input string and returns a stream of tokens.
Click to show internal directories.
Click to hide internal directories.