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 ¶
Parse parses an Arazzo version string, ignoring any prerelease suffix (e.g. `1.1.0-rc1`).
func Requires11Error ¶
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.