openapi

package
v1.65.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToolSet added in v1.60.0

func CreateToolSet(ctx context.Context, toolset latest.Toolset, runConfig *config.RuntimeConfig) (tools.ToolSet, error)

CreateToolSet is used by the tools registry.

Types

type Option added in v1.65.0

type Option func(*ToolSet)

Option configures an openapi ToolSet.

func WithAllowPrivateIPs added in v1.65.0

func WithAllowPrivateIPs(allow bool) Option

WithAllowPrivateIPs disables SSRF dial-time protection on both the spec fetch and the generated tools' HTTP calls. Operators opt in via `allow_private_ips: true` when the spec or its servers legitimately target internal services. Tests use this to talk to httptest.NewServer.

func WithTimeout added in v1.65.0

func WithTimeout(d time.Duration) Option

WithTimeout overrides the default 30s HTTP client timeout used both for fetching the spec and for the generated tools' HTTP calls.

type ToolSet added in v1.60.0

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

ToolSet generates HTTP tools from an OpenAPI specification.

func New added in v1.60.0

func New(specURL string, headers map[string]string, opts ...Option) *ToolSet

New creates a new OpenAPI toolset from the given spec URL.

func (*ToolSet) Instructions added in v1.60.0

func (t *ToolSet) Instructions() string

Instructions returns usage instructions for the OpenAPI toolset.

func (*ToolSet) Tools added in v1.60.0

func (t *ToolSet) Tools(ctx context.Context) ([]tools.Tool, error)

Tools fetches and parses the OpenAPI specification, returning a tool for each operation.

Jump to

Keyboard shortcuts

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