specversion

package
v1.28.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 6 Imported by: 0 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 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