loader

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package loader provides utilities for loading OpenAPI specifications from various sources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

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

Loader wraps the OpenAPI loader with additional functionality.

func New

func New() *Loader

New creates a new loader with default options.

func NewWithOptions

func NewWithOptions(opts Options) *Loader

NewWithOptions creates a new loader with custom options.

func (*Loader) LoadFromData

func (l *Loader) LoadFromData(data []byte) (*openapi3.T, error)

LoadFromData loads an OpenAPI specification from raw data.

func (*Loader) LoadFromFile

func (l *Loader) LoadFromFile(filePath string) (*openapi3.T, error)

LoadFromFile loads an OpenAPI specification from a local file.

func (*Loader) LoadFromSource

func (l *Loader) LoadFromSource(source string) (*openapi3.T, error)

LoadFromSource automatically detects and loads from file or URL.

func (*Loader) LoadFromURL

func (l *Loader) LoadFromURL(urlStr string) (*openapi3.T, error)

LoadFromURL loads an OpenAPI specification from a URL.

type Options

type Options struct {
	AllowExternalRefs bool
	Context           context.Context
}

Options defines loading options.

Jump to

Keyboard shortcuts

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