openapi

package
v1.10.9 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadSpecFromURL added in v1.6.6

func LoadSpecFromURL(rawURL string) (map[string]interface{}, string, error)

LoadSpecFromURL fetches the content at the URL and attempts to decode it first as JSON, and if that fails, as YAML. Returns the spec as a map and the normalized URL used.

Types

type OpenApiConverter

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

OpenApiConverter converts an OpenAPI JSON/YAML spec into a UtcpManual.

func NewConverter

func NewConverter(
	openapiSpec map[string]interface{},
	specURL string,
	providerName string,
) *OpenApiConverter

NewConverter creates a new converter. If providerName is empty, it will be derived from spec.info.title.

func NewConverterFromURL added in v1.6.6

func NewConverterFromURL(specURL string, providerName string) (*OpenApiConverter, error)

NewConverterFromURL fetches the spec (YAML or JSON) from the given URL and returns a converter. providerName can be empty to auto-derive from the spec.

func (*OpenApiConverter) Convert

func (c *OpenApiConverter) Convert() UtcpManual

Convert parses the OpenAPI spec and builds a UtcpManual.

Jump to

Keyboard shortcuts

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