openapiimport

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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