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. 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.
Types ¶
type BundleCompositionConfig ¶
type BundleCompositionConfig struct {
// Delimiter separates colliding names. The default is "__".
Delimiter string
}
BundleCompositionConfig controls component names in composed output.