bundler

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidModel = errors.New("invalid model")

ErrInvalidModel is returned when the model is not usable.

Functions

func BundleBytes

func BundleBytes(bytes []byte, configuration *datamodel.DocumentConfiguration) ([]byte, error)

BundleBytes will take a byte slice of an OpenAPI specification and return a bundled version of it. This is useful for when you want to take a specification with external references, and you want to bundle it into a single document.

This function will 'resolve' all references in the specification and return a single document. The resulting document will be a valid OpenAPI specification, containing no references.

Circular references will not be resolved and will be skipped.

func BundleDocument

func BundleDocument(model *v3.Document) ([]byte, error)

BundleDocument will take a v3.Document and return a bundled version of it. This is useful for when you want to take a document that has been built from a specification with external references, and you want to bundle it into a single document.

This function will 'resolve' all references in the specification and return a single document. The resulting document will be a valid OpenAPI specification, containing no references.

Circular references will not be resolved and will be skipped.

Types

This section is empty.

Jump to

Keyboard shortcuts

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