Versions in this module Expand all Collapse all v0 v0.0.1 May 14, 2026 Changes in this version + var ErrAsyncAPI2NotSupported = errors.New("AsyncAPI 2.x is not supported; use AsyncAPI 3.0 or later") + var ErrInvalidAsyncAPIVersion = errors.New("asyncapi version is not a valid semver string") + var ErrInvalidYAML = errors.New("specification is not valid YAML or JSON") + var ErrNoAsyncAPIVersion = errors.New("asyncapi version field is required") + func DefaultSchemaFormat(asyncapiVersion string) string + func DetectAsyncAPIVersion(spec []byte) (string, error) + func ExtractVersionFromNode(rootNode *yaml.Node) (string, error) + func IsAsyncAPI3(version string) bool + type CircularReferenceError struct + Chain []string + Path string + func NewCircularReferenceError(path string, chain []string) *CircularReferenceError + func (e *CircularReferenceError) Error() string + type Document interface + Errors func() []error + GetSpecInfo func() *SpecInfo + GetVersion func() string + GoLow func() *lowasync.AsyncAPI + Index func() *index.SpecIndex + IsPartial func() bool + Model func() *highasync.AsyncAPI + Render func() ([]byte, error) + Rolodex func() *index.Rolodex + RootNode func() *yaml.Node + Serialize func() ([]byte, error) + func NewDocument(spec []byte) (Document, error) + func NewDocumentWithConfiguration(spec []byte, config *DocumentConfiguration) (Document, error) + type DocumentConfiguration struct + AllowFileReferences bool + AllowRemoteReferences bool + BasePath string + BaseURL *url.URL + ExtractRefsSequentially bool + LocalFS fs.FS + Logger *slog.Logger + RemoteURLHandler func(url string) (*http.Response, error) + SkipCircularReferenceCheck bool + func NewDocumentConfiguration() *DocumentConfiguration + func (c *DocumentConfiguration) ToLibOpenAPIConfig() *datamodel.DocumentConfiguration + type ParseError struct + Column int + Line int + Message string + Path string + func NewParseError(message string, line, column int, path string) *ParseError + func (e *ParseError) Error() string + type ReferenceError struct + Column int + Line int + Message string + Reference string + func NewReferenceError(ref, message string, line, column int) *ReferenceError + func (e *ReferenceError) Error() string + type SpecInfo struct + SpecType string + Version string + VersionParsed *semver.Version + func ParseAsyncAPIVersion(version string) (*SpecInfo, error) + type ValidationError struct + Message string + Path string + func NewValidationError(message, path string) *ValidationError + func (e *ValidationError) Error() string