googleapi

package
v0.25.7 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSchemas added in v0.25.5

func AddSchemas(opts options.Options, doc *v3.Document)

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.

type Token

type Token struct {
	Type  TokenType
	Value string
}

Token represents a lexical token.

func RunPathPatternLexer

func RunPathPatternLexer(input string) ([]Token, error)

RunPathPatternLexer takes an input string and returns a stream of tokens.

type TokenType

type TokenType string

TokenType represents the possible token types.

const (
	TokenSlash    TokenType = "SLASH"
	TokenColon    TokenType = "COLON"
	TokenLiteral  TokenType = "LITERAL"
	TokenVariable TokenType = "VARIABLE"
	TokenIdent    TokenType = "IDENT"
	TokenEOF      TokenType = "EOF"
)

Jump to

Keyboard shortcuts

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