openapiimport

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MaximumDocumentBytes = 5 << 20

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportConfig

type ImportConfig struct {
	ID              string        `json:"id"`
	OriginType      string        `json:"origin_type"`
	SpecURL         string        `json:"spec_url,omitempty"`
	Filename        string        `json:"filename,omitempty"`
	RefreshInterval time.Duration `json:"refresh_interval"`
	OpenAPIVersion  string        `json:"openapi_version"`
	Title           string        `json:"title,omitempty"`
	Version         string        `json:"version,omitempty"`
	Selected        []Selection   `json:"selected"`
}

type Operation

type Operation struct {
	Key               string              `json:"key"`
	Method            string              `json:"method"`
	Path              string              `json:"path"`
	OperationID       string              `json:"operation_id,omitempty"`
	Summary           string              `json:"summary,omitempty"`
	SuggestedToolName string              `json:"suggested_tool_name"`
	Eligible          bool                `json:"eligible"`
	Reason            string              `json:"reason,omitempty"`
	Tool              httptool.ToolConfig `json:"-"`
}

type Preview

type Preview struct {
	OpenAPIVersion string      `json:"openapi_version"`
	Title          string      `json:"title,omitempty"`
	Version        string      `json:"version,omitempty"`
	Servers        []string    `json:"servers"`
	SHA256         string      `json:"sha256"`
	Document       string      `json:"document"`
	Operations     []Operation `json:"operations"`
}

func Parse

func Parse(document []byte) (Preview, error)

type Selection

type Selection struct {
	OperationKey string `json:"operation_key"`
	ToolName     string `json:"tool_name"`
	Enabled      bool   `json:"enabled"`
}

Jump to

Keyboard shortcuts

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