specversion

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package specversion provides helpers for version-aware validation of Arazzo documents.

The Arazzo document version is threaded through validation via an oas3.ParentDocumentVersion context object, which allows nested objects (including those in the criterion package) to apply version specific rules without importing the root arazzo package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpressionOptions

func ExpressionOptions(o *validation.Options) []expression.ValidateOption

ExpressionOptions returns the runtime expression validation options appropriate for the Arazzo document version being validated.

func FromOptions

func FromOptions(o *validation.Options) *version.Version

FromOptions returns the Arazzo document version from the validation options, or nil if it is not available or cannot be parsed.

func IsAtLeast11

func IsAtLeast11(o *validation.Options) bool

IsAtLeast11 returns true if the Arazzo document being validated declares version 1.1 or later.

func Parse

func Parse(v string) (*version.Version, error)

Parse parses an Arazzo version string, ignoring any prerelease suffix (e.g. `1.1.0-rc1`).

func Requires11Error

func Requires11Error(feature string) error

Requires11Error returns the error used when an Arazzo 1.1 feature is used in a document that declares an earlier version.

Types

This section is empty.

Jump to

Keyboard shortcuts

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