libopenapi

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 26 Imported by: ? 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

Overview

Package libopenapi loads OpenAPI documents with pb33f/libopenapi and converts them into the generator's model.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(doc *v3.Document) *model.Document

Convert copies a libopenapi document into the generator's model.

A schema reached through several $refs is one *model.Schema. The identity is the resolved schema's source node, because libopenapi builds a fresh high-level schema for each proxy.

Types

type Engine

type Engine struct{}

Engine loads documents with libopenapi.

func (Engine) Load

func (Engine) Load(path string, opts engine.LoadOptions) (*model.Document, error)

Load loads the document at path, a file path or an http(s) or file URL, applies any Overlay, and converts it.

func (Engine) LoadData

func (Engine) LoadData(raw []byte, specPath string, opts engine.LoadOptions) (*model.Document, error)

LoadData loads the document in raw as if it were the file at specPath, so relative references resolve against that path's directory. specPath may be empty, in which case they resolve against the working directory.

Jump to

Keyboard shortcuts

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