bundler

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 20 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 bundler combines AsyncAPI 3 documents and their referenced files. Bundling preserves root-local references and fields that require Reference Objects. It does not validate application semantics or expand traits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BundleBytes

func BundleBytes(spec []byte, config *libasyncapi.DocumentConfiguration) ([]byte, error)

BundleBytes inlines external references where AsyncAPI permits an object. Root-local references are preserved. Recursive and reference-only fields use local references. External channels and servers required by root operations are imported at the root when no existing destination is available. On failure no output is returned. Input and configuration are not modified. Output is YAML, including when the input is JSON.

func BundleBytesComposed

func BundleBytesComposed(spec []byte, config *libasyncapi.DocumentConfiguration, composition *BundleCompositionConfig) ([]byte, error)

BundleBytesComposed places external objects in their AsyncAPI component sections and rewrites references to local targets. Reference-only fields keep the channel, message and server locations required by AsyncAPI. Missing root destinations for required external channels and servers are added as aliases.

Types

type BundleCompositionConfig

type BundleCompositionConfig struct {
	// Delimiter separates colliding names. The default is "__".
	Delimiter string
}

BundleCompositionConfig controls component names in composed output.

Jump to

Keyboard shortcuts

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