arazzo

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package arazzo contains low-level Arazzo models.

Arazzo low models include an *index.SpecIndex in Build signatures to remain compatible with the shared low.Buildable interface and generic extraction pipeline used across low-level model packages.

In current Arazzo parsing paths, no SpecIndex is built and nil is passed for idx (for example via libopenapi.NewArazzoDocument), so GetIndex() will typically return nil unless callers explicitly provide an index.

Index

Constants

View Source
const (
	ArazzoLabel             = "arazzo"
	InfoLabel               = "info"
	SourceDescriptionsLabel = "sourceDescriptions"
	WorkflowsLabel          = "workflows"
	ComponentsLabel         = "components"
	TitleLabel              = "title"
	SummaryLabel            = "summary"
	DescriptionLabel        = "description"
	VersionLabel            = "version"
	NameLabel               = "name"
	URLLabel                = "url"
	TypeLabel               = "type"
	WorkflowIdLabel         = "workflowId"
	StepsLabel              = "steps"
	InputsLabel             = "inputs"
	DependsOnLabel          = "dependsOn"
	SuccessActionsLabel     = "successActions"
	FailureActionsLabel     = "failureActions"
	OutputsLabel            = "outputs"
	ParametersLabel         = "parameters"
	StepIdLabel             = "stepId"
	OperationIdLabel        = "operationId"
	OperationPathLabel      = "operationPath"
	RequestBodyLabel        = "requestBody"
	SuccessCriteriaLabel    = "successCriteria"
	OnSuccessLabel          = "onSuccess"
	OnFailureLabel          = "onFailure"
	InLabel                 = "in"
	ValueLabel              = "value"
	ReferenceLabel          = "reference"
	CriteriaLabel           = "criteria"
	RetryAfterLabel         = "retryAfter"
	RetryLimitLabel         = "retryLimit"
	ContextLabel            = "context"
	ConditionLabel          = "condition"
	ContentTypeLabel        = "contentType"
	PayloadLabel            = "payload"
	ReplacementsLabel       = "replacements"
	TargetLabel             = "target"
)

Constants for labels used to look up values within Arazzo specifications. https://spec.openapis.org/arazzo/v1.0.1

Variables

This section is empty.

Functions

This section is empty.

Types

type Arazzo

type Arazzo struct {
	Arazzo             low.NodeReference[string]
	Info               low.NodeReference[*Info]
	SourceDescriptions low.NodeReference[[]low.ValueReference[*SourceDescription]]
	Workflows          low.NodeReference[[]low.ValueReference[*Workflow]]
	Components         low.NodeReference[*Components]
	Extensions         *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
	KeyNode            *yaml.Node
	RootNode           *yaml.Node

	*low.Reference
	low.NodeMap
	// contains filtered or unexported fields
}

Arazzo represents a low-level Arazzo document. https://spec.openapis.org/arazzo/v1.0.1

func (*Arazzo) Build

func (a *Arazzo) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error

Build will extract all properties of the Arazzo document.

func (*Arazzo) FindExtension

func (a *Arazzo) FindExtension(ext string) *low.ValueReference[*yaml.Node]

FindExtension returns a ValueReference containing the extension value, if found.

func (*Arazzo) GetContext

func (a *Arazzo) GetContext() context.Context

GetContext returns the context.Context instance used when building the Arazzo object.

func (*Arazzo) GetExtensions

GetExtensions returns all Arazzo extensions and satisfies the low.HasExtensions interface.

func (*Arazzo) GetIndex

func (a *Arazzo) GetIndex() *index.SpecIndex

GetIndex returns the index.SpecIndex instance attached to the Arazzo object. For Arazzo low models this is typically nil, because Arazzo parsing does not build a SpecIndex. The index parameter is still required to satisfy the shared low.Buildable interface and generic extractors.

func (*Arazzo) GetKeyNode

func (a *Arazzo) GetKeyNode() *yaml.Node

GetKeyNode returns the key yaml node of the Arazzo object.

func (*Arazzo) GetRootNode

func (a *Arazzo) GetRootNode() *yaml.Node

GetRootNode returns the root yaml node of the Arazzo object.

func (*Arazzo) Hash

func (a *Arazzo) Hash() uint64

Hash will return a consistent hash of the Arazzo object.

type Components

Components represents a low-level Arazzo Components Object. https://spec.openapis.org/arazzo/v1.0.1#components-object

func (*Components) Build

func (c *Components) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error

Build will extract all properties of the Components object.

func (*Components) FindExtension

func (c *Components) FindExtension(ext string) *low.ValueReference[*yaml.Node]

FindExtension returns a ValueReference containing the extension value, if found.

func (*Components) GetContext

func (c *Components) GetContext() context.Context

GetContext returns the context.Context instance used when building the Components object.

func (*Components) GetExtensions

GetExtensions returns all Components extensions and satisfies the low.HasExtensions interface.

func (*Components) GetIndex

func (c *Components) GetIndex() *index.SpecIndex

GetIndex returns the index.SpecIndex instance attached to the Components object. For Arazzo low models this is typically nil, because Arazzo parsing does not build a SpecIndex. The index parameter is still required to satisfy the shared low.Buildable interface and generic extractors.

func (*Components) GetKeyNode

func (c *Components) GetKeyNode() *yaml.Node

GetKeyNode returns the key yaml node of the Components object.

func (*Components) GetRootNode

func (c *Components) GetRootNode() *yaml.Node

GetRootNode returns the root yaml node of the Components object.

func (*Components) Hash

func (c *Components) Hash() uint64

Hash will return a consistent hash of the Components object.

type Criterion

type Criterion struct {
	Context    low.NodeReference[string]
	Condition  low.NodeReference[string]
	Type       low.NodeReference[*yaml.Node]
	Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
	KeyNode    *yaml.Node
	RootNode   *yaml.Node

	*low.Reference
	low.NodeMap
	// contains filtered or unexported fields
}

Criterion represents a low-level Arazzo Criterion Object. https://spec.openapis.org/arazzo/v1.0.1#criterion-object

func (*Criterion) Build

func (c *Criterion) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error

Build will extract all properties of the Criterion object. The Type field is a union: it can be a scalar string ("simple", "regex") or a mapping node (CriterionExpressionType). We store it as a raw *yaml.Node for the high-level to interpret.

func (*Criterion) FindExtension

func (c *Criterion) FindExtension(ext string) *low.ValueReference[*yaml.Node]

FindExtension returns a ValueReference containing the extension value, if found.

func (*Criterion) GetContext

func (c *Criterion) GetContext() context.Context

GetContext returns the context.Context instance used when building the Criterion object.

func (*Criterion) GetExtensions

GetExtensions returns all Criterion extensions and satisfies the low.HasExtensions interface.

func (*Criterion) GetIndex

func (c *Criterion) GetIndex() *index.SpecIndex

GetIndex returns the index.SpecIndex instance attached to the Criterion object. For Arazzo low models this is typically nil, because Arazzo parsing does not build a SpecIndex. The index parameter is still required to satisfy the shared low.Buildable interface and generic extractors.

func (*Criterion) GetKeyNode

func (c *Criterion) GetKeyNode() *yaml.Node

GetKeyNode returns the key yaml node of the Criterion object.

func (*Criterion) GetRootNode

func (c *Criterion) GetRootNode() *yaml.Node

GetRootNode returns the root yaml node of the Criterion object.

func (*Criterion) Hash

func (c *Criterion) Hash() uint64

Hash will return a consistent hash of the Criterion object.

type CriterionExpressionType

type CriterionExpressionType struct {
	Type       low.NodeReference[string]
	Version    low.NodeReference[string]
	Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
	KeyNode    *yaml.Node
	RootNode   *yaml.Node

	*low.Reference
	low.NodeMap
	// contains filtered or unexported fields
}

CriterionExpressionType represents a low-level Arazzo Criterion Expression Type Object. https://spec.openapis.org/arazzo/v1.0.1#criterion-expression-type-object

func (*CriterionExpressionType) Build

func (c *CriterionExpressionType) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error

Build will extract all properties of the CriterionExpressionType object.

func (*CriterionExpressionType) FindExtension

func (c *CriterionExpressionType) FindExtension(ext string) *low.ValueReference[*yaml.Node]

FindExtension returns a ValueReference containing the extension value, if found.

func (*CriterionExpressionType) GetContext

func (c *CriterionExpressionType) GetContext() context.Context

GetContext returns the context.Context instance used when building the CriterionExpressionType object.

func (*CriterionExpressionType) GetExtensions

GetExtensions returns all CriterionExpressionType extensions and satisfies the low.HasExtensions interface.

func (*CriterionExpressionType) GetIndex

func (c *CriterionExpressionType) GetIndex() *index.SpecIndex

GetIndex returns the index.SpecIndex instance attached to the CriterionExpressionType object. For Arazzo low models this is typically nil, because Arazzo parsing does not build a SpecIndex. The index parameter is still required to satisfy the shared low.Buildable interface and generic extractors.

func (*CriterionExpressionType) GetKeyNode

func (c *CriterionExpressionType) GetKeyNode() *yaml.Node

GetKeyNode returns the key yaml node of the CriterionExpressionType object.

func (*CriterionExpressionType) GetRootNode

func (c *CriterionExpressionType) GetRootNode() *yaml.Node

GetRootNode returns the root yaml node of the CriterionExpressionType object.

func (*CriterionExpressionType) Hash

func (c *CriterionExpressionType) Hash() uint64

Hash will return a consistent hash of the CriterionExpressionType object.

type FailureAction

type FailureAction struct {
	Name         low.NodeReference[string]
	Type         low.NodeReference[string]
	WorkflowId   low.NodeReference[string]
	StepId       low.NodeReference[string]
	RetryAfter   low.NodeReference[float64]
	RetryLimit   low.NodeReference[int64]
	Criteria     low.NodeReference[[]low.ValueReference[*Criterion]]
	ComponentRef low.NodeReference[string]
	Extensions   *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
	KeyNode      *yaml.Node
	RootNode     *yaml.Node

	*low.Reference
	low.NodeMap
	// contains filtered or unexported fields
}

FailureAction represents a low-level Arazzo Failure Action Object. A failure action can be a full definition or a Reusable Object with a $components reference. https://spec.openapis.org/arazzo/v1.0.1#failure-action-object

func (*FailureAction) Build

func (f *FailureAction) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error

Build will extract all properties of the FailureAction object.

func (*FailureAction) FindExtension

func (f *FailureAction) FindExtension(ext string) *low.ValueReference[*yaml.Node]

FindExtension returns a ValueReference containing the extension value, if found.

func (*FailureAction) GetContext

func (f *FailureAction) GetContext() context.Context

GetContext returns the context.Context instance used when building the FailureAction object.

func (*FailureAction) GetExtensions

GetExtensions returns all FailureAction extensions and satisfies the low.HasExtensions interface.

func (*FailureAction) GetIndex

func (f *FailureAction) GetIndex() *index.SpecIndex

GetIndex returns the index.SpecIndex instance attached to the FailureAction object. For Arazzo low models this is typically nil, because Arazzo parsing does not build a SpecIndex. The index parameter is still required to satisfy the shared low.Buildable interface and generic extractors.

func (*FailureAction) GetKeyNode

func (f *FailureAction) GetKeyNode() *yaml.Node

GetKeyNode returns the key yaml node of the FailureAction object.

func (*FailureAction) GetRootNode

func (f *FailureAction) GetRootNode() *yaml.Node

GetRootNode returns the root yaml node of the FailureAction object.

func (*FailureAction) Hash

func (f *FailureAction) Hash() uint64

Hash will return a consistent hash of the FailureAction object.

func (*FailureAction) IsReusable

func (f *FailureAction) IsReusable() bool

IsReusable returns true if this failure action is a Reusable Object (has a reference field).

type Info

type Info struct {
	Title       low.NodeReference[string]
	Summary     low.NodeReference[string]
	Description low.NodeReference[string]
	Version     low.NodeReference[string]
	Extensions  *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
	KeyNode     *yaml.Node
	RootNode    *yaml.Node

	*low.Reference
	low.NodeMap
	// contains filtered or unexported fields
}

Info represents a low-level Arazzo Info Object. https://spec.openapis.org/arazzo/v1.0.1#info-object

func (*Info) Build

func (i *Info) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error

Build will extract all properties of the Info object.

func (*Info) FindExtension

func (i *Info) FindExtension(ext string) *low.ValueReference[*yaml.Node]

FindExtension returns a ValueReference containing the extension value, if found.

func (*Info) GetContext

func (i *Info) GetContext() context.Context

GetContext returns the context.Context instance used when building the Info object.

func (*Info) GetExtensions

func (i *Info) GetExtensions() *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]

GetExtensions returns all Info extensions and satisfies the low.HasExtensions interface.

func (*Info) GetIndex

func (i *Info) GetIndex() *index.SpecIndex

GetIndex returns the index.SpecIndex instance attached to the Info object. For Arazzo low models this is typically nil, because Arazzo parsing does not build a SpecIndex. The index parameter is still required to satisfy the shared low.Buildable interface and generic extractors.

func (*Info) GetKeyNode

func (i *Info) GetKeyNode() *yaml.Node

GetKeyNode returns the key yaml node of the Info object.

func (*Info) GetRootNode

func (i *Info) GetRootNode() *yaml.Node

GetRootNode returns the root yaml node of the Info object.

func (*Info) Hash

func (i *Info) Hash() uint64

Hash will return a consistent hash of the Info object.

type Parameter

type Parameter struct {
	Name         low.NodeReference[string]
	In           low.NodeReference[string]
	Value        low.NodeReference[*yaml.Node]
	ComponentRef low.NodeReference[string]
	Extensions   *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
	KeyNode      *yaml.Node
	RootNode     *yaml.Node

	*low.Reference
	low.NodeMap
	// contains filtered or unexported fields
}

Parameter represents a low-level Arazzo Parameter Object. A parameter can be a full parameter definition or a Reusable Object with a $components reference. https://spec.openapis.org/arazzo/v1.0.1#parameter-object

func (*Parameter) Build

func (p *Parameter) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error

Build will extract all properties of the Parameter object.

func (*Parameter) FindExtension

func (p *Parameter) FindExtension(ext string) *low.ValueReference[*yaml.Node]

FindExtension returns a ValueReference containing the extension value, if found.

func (*Parameter) GetContext

func (p *Parameter) GetContext() context.Context

GetContext returns the context.Context instance used when building the Parameter object.

func (*Parameter) GetExtensions

GetExtensions returns all Parameter extensions and satisfies the low.HasExtensions interface.

func (*Parameter) GetIndex

func (p *Parameter) GetIndex() *index.SpecIndex

GetIndex returns the index.SpecIndex instance attached to the Parameter object. For Arazzo low models this is typically nil, because Arazzo parsing does not build a SpecIndex. The index parameter is still required to satisfy the shared low.Buildable interface and generic extractors.

func (*Parameter) GetKeyNode

func (p *Parameter) GetKeyNode() *yaml.Node

GetKeyNode returns the key yaml node of the Parameter object.

func (*Parameter) GetRootNode

func (p *Parameter) GetRootNode() *yaml.Node

GetRootNode returns the root yaml node of the Parameter object.

func (*Parameter) Hash

func (p *Parameter) Hash() uint64

Hash will return a consistent hash of the Parameter object.

func (*Parameter) IsReusable

func (p *Parameter) IsReusable() bool

IsReusable returns true if this parameter is a Reusable Object (has a reference field).

type PayloadReplacement

type PayloadReplacement struct {
	Target     low.NodeReference[string]
	Value      low.NodeReference[*yaml.Node]
	Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
	KeyNode    *yaml.Node
	RootNode   *yaml.Node

	*low.Reference
	low.NodeMap
	// contains filtered or unexported fields
}

PayloadReplacement represents a low-level Arazzo Payload Replacement Object. https://spec.openapis.org/arazzo/v1.0.1#payload-replacement-object

func (*PayloadReplacement) Build

func (p *PayloadReplacement) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error

Build will extract all properties of the PayloadReplacement object.

func (*PayloadReplacement) FindExtension

func (p *PayloadReplacement) FindExtension(ext string) *low.ValueReference[*yaml.Node]

FindExtension returns a ValueReference containing the extension value, if found.

func (*PayloadReplacement) GetContext

func (p *PayloadReplacement) GetContext() context.Context

GetContext returns the context.Context instance used when building the PayloadReplacement object.

func (*PayloadReplacement) GetExtensions

GetExtensions returns all PayloadReplacement extensions and satisfies the low.HasExtensions interface.

func (*PayloadReplacement) GetIndex

func (p *PayloadReplacement) GetIndex() *index.SpecIndex

GetIndex returns the index.SpecIndex instance attached to the PayloadReplacement object. For Arazzo low models this is typically nil, because Arazzo parsing does not build a SpecIndex. The index parameter is still required to satisfy the shared low.Buildable interface and generic extractors.

func (*PayloadReplacement) GetKeyNode

func (p *PayloadReplacement) GetKeyNode() *yaml.Node

GetKeyNode returns the key yaml node of the PayloadReplacement object.

func (*PayloadReplacement) GetRootNode

func (p *PayloadReplacement) GetRootNode() *yaml.Node

GetRootNode returns the root yaml node of the PayloadReplacement object.

func (*PayloadReplacement) Hash

func (p *PayloadReplacement) Hash() uint64

Hash will return a consistent hash of the PayloadReplacement object.

type RequestBody

type RequestBody struct {
	ContentType  low.NodeReference[string]
	Payload      low.NodeReference[*yaml.Node]
	Replacements low.NodeReference[[]low.ValueReference[*PayloadReplacement]]
	Extensions   *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
	KeyNode      *yaml.Node
	RootNode     *yaml.Node

	*low.Reference
	low.NodeMap
	// contains filtered or unexported fields
}

RequestBody represents a low-level Arazzo Request Body Object. https://spec.openapis.org/arazzo/v1.0.1#request-body-object

func (*RequestBody) Build

func (r *RequestBody) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error

Build will extract all properties of the RequestBody object.

func (*RequestBody) FindExtension

func (r *RequestBody) FindExtension(ext string) *low.ValueReference[*yaml.Node]

FindExtension returns a ValueReference containing the extension value, if found.

func (*RequestBody) GetContext

func (r *RequestBody) GetContext() context.Context

GetContext returns the context.Context instance used when building the RequestBody object.

func (*RequestBody) GetExtensions

GetExtensions returns all RequestBody extensions and satisfies the low.HasExtensions interface.

func (*RequestBody) GetIndex

func (r *RequestBody) GetIndex() *index.SpecIndex

GetIndex returns the index.SpecIndex instance attached to the RequestBody object. For Arazzo low models this is typically nil, because Arazzo parsing does not build a SpecIndex. The index parameter is still required to satisfy the shared low.Buildable interface and generic extractors.

func (*RequestBody) GetKeyNode

func (r *RequestBody) GetKeyNode() *yaml.Node

GetKeyNode returns the key yaml node of the RequestBody object.

func (*RequestBody) GetRootNode

func (r *RequestBody) GetRootNode() *yaml.Node

GetRootNode returns the root yaml node of the RequestBody object.

func (*RequestBody) Hash

func (r *RequestBody) Hash() uint64

Hash will return a consistent hash of the RequestBody object.

type SourceDescription

type SourceDescription struct {
	Name       low.NodeReference[string]
	URL        low.NodeReference[string]
	Type       low.NodeReference[string]
	Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
	KeyNode    *yaml.Node
	RootNode   *yaml.Node

	*low.Reference
	low.NodeMap
	// contains filtered or unexported fields
}

SourceDescription represents a low-level Arazzo Source Description Object. https://spec.openapis.org/arazzo/v1.0.1#source-description-object

func (*SourceDescription) Build

func (s *SourceDescription) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error

Build will extract all properties of the SourceDescription object.

func (*SourceDescription) FindExtension

func (s *SourceDescription) FindExtension(ext string) *low.ValueReference[*yaml.Node]

FindExtension returns a ValueReference containing the extension value, if found.

func (*SourceDescription) GetContext

func (s *SourceDescription) GetContext() context.Context

GetContext returns the context.Context instance used when building the SourceDescription object.

func (*SourceDescription) GetExtensions

GetExtensions returns all SourceDescription extensions and satisfies the low.HasExtensions interface.

func (*SourceDescription) GetIndex

func (s *SourceDescription) GetIndex() *index.SpecIndex

GetIndex returns the index.SpecIndex instance attached to the SourceDescription object. For Arazzo low models this is typically nil, because Arazzo parsing does not build a SpecIndex. The index parameter is still required to satisfy the shared low.Buildable interface and generic extractors.

func (*SourceDescription) GetKeyNode

func (s *SourceDescription) GetKeyNode() *yaml.Node

GetKeyNode returns the key yaml node of the SourceDescription object.

func (*SourceDescription) GetRootNode

func (s *SourceDescription) GetRootNode() *yaml.Node

GetRootNode returns the root yaml node of the SourceDescription object.

func (*SourceDescription) Hash

func (s *SourceDescription) Hash() uint64

Hash will return a consistent hash of the SourceDescription object.

type Step

type Step struct {
	StepId          low.NodeReference[string]
	Description     low.NodeReference[string]
	OperationId     low.NodeReference[string]
	OperationPath   low.NodeReference[string]
	WorkflowId      low.NodeReference[string]
	Parameters      low.NodeReference[[]low.ValueReference[*Parameter]]
	RequestBody     low.NodeReference[*RequestBody]
	SuccessCriteria low.NodeReference[[]low.ValueReference[*Criterion]]
	OnSuccess       low.NodeReference[[]low.ValueReference[*SuccessAction]]
	OnFailure       low.NodeReference[[]low.ValueReference[*FailureAction]]
	Outputs         low.NodeReference[*orderedmap.Map[low.KeyReference[string], low.ValueReference[string]]]
	Extensions      *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
	KeyNode         *yaml.Node
	RootNode        *yaml.Node

	*low.Reference
	low.NodeMap
	// contains filtered or unexported fields
}

Step represents a low-level Arazzo Step Object. https://spec.openapis.org/arazzo/v1.0.1#step-object

func (*Step) Build

func (s *Step) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error

Build will extract all properties of the Step object.

func (*Step) FindExtension

func (s *Step) FindExtension(ext string) *low.ValueReference[*yaml.Node]

FindExtension returns a ValueReference containing the extension value, if found.

func (*Step) GetContext

func (s *Step) GetContext() context.Context

GetContext returns the context.Context instance used when building the Step object.

func (*Step) GetExtensions

func (s *Step) GetExtensions() *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]

GetExtensions returns all Step extensions and satisfies the low.HasExtensions interface.

func (*Step) GetIndex

func (s *Step) GetIndex() *index.SpecIndex

GetIndex returns the index.SpecIndex instance attached to the Step object. For Arazzo low models this is typically nil, because Arazzo parsing does not build a SpecIndex. The index parameter is still required to satisfy the shared low.Buildable interface and generic extractors.

func (*Step) GetKeyNode

func (s *Step) GetKeyNode() *yaml.Node

GetKeyNode returns the key yaml node of the Step object.

func (*Step) GetRootNode

func (s *Step) GetRootNode() *yaml.Node

GetRootNode returns the root yaml node of the Step object.

func (*Step) Hash

func (s *Step) Hash() uint64

Hash will return a consistent hash of the Step object.

type SuccessAction

type SuccessAction struct {
	Name         low.NodeReference[string]
	Type         low.NodeReference[string]
	WorkflowId   low.NodeReference[string]
	StepId       low.NodeReference[string]
	Criteria     low.NodeReference[[]low.ValueReference[*Criterion]]
	ComponentRef low.NodeReference[string]
	Extensions   *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
	KeyNode      *yaml.Node
	RootNode     *yaml.Node

	*low.Reference
	low.NodeMap
	// contains filtered or unexported fields
}

SuccessAction represents a low-level Arazzo Success Action Object. A success action can be a full definition or a Reusable Object with a $components reference. https://spec.openapis.org/arazzo/v1.0.1#success-action-object

func (*SuccessAction) Build

func (s *SuccessAction) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error

Build will extract all properties of the SuccessAction object.

func (*SuccessAction) FindExtension

func (s *SuccessAction) FindExtension(ext string) *low.ValueReference[*yaml.Node]

FindExtension returns a ValueReference containing the extension value, if found.

func (*SuccessAction) GetContext

func (s *SuccessAction) GetContext() context.Context

GetContext returns the context.Context instance used when building the SuccessAction object.

func (*SuccessAction) GetExtensions

GetExtensions returns all SuccessAction extensions and satisfies the low.HasExtensions interface.

func (*SuccessAction) GetIndex

func (s *SuccessAction) GetIndex() *index.SpecIndex

GetIndex returns the index.SpecIndex instance attached to the SuccessAction object. For Arazzo low models this is typically nil, because Arazzo parsing does not build a SpecIndex. The index parameter is still required to satisfy the shared low.Buildable interface and generic extractors.

func (*SuccessAction) GetKeyNode

func (s *SuccessAction) GetKeyNode() *yaml.Node

GetKeyNode returns the key yaml node of the SuccessAction object.

func (*SuccessAction) GetRootNode

func (s *SuccessAction) GetRootNode() *yaml.Node

GetRootNode returns the root yaml node of the SuccessAction object.

func (*SuccessAction) Hash

func (s *SuccessAction) Hash() uint64

Hash will return a consistent hash of the SuccessAction object.

func (*SuccessAction) IsReusable

func (s *SuccessAction) IsReusable() bool

IsReusable returns true if this success action is a Reusable Object (has a reference field).

type Workflow

Workflow represents a low-level Arazzo Workflow Object. https://spec.openapis.org/arazzo/v1.0.1#workflow-object

func (*Workflow) Build

func (w *Workflow) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error

Build will extract all properties of the Workflow object.

func (*Workflow) FindExtension

func (w *Workflow) FindExtension(ext string) *low.ValueReference[*yaml.Node]

FindExtension returns a ValueReference containing the extension value, if found.

func (*Workflow) GetContext

func (w *Workflow) GetContext() context.Context

GetContext returns the context.Context instance used when building the Workflow object.

func (*Workflow) GetExtensions

GetExtensions returns all Workflow extensions and satisfies the low.HasExtensions interface.

func (*Workflow) GetIndex

func (w *Workflow) GetIndex() *index.SpecIndex

GetIndex returns the index.SpecIndex instance attached to the Workflow object. For Arazzo low models this is typically nil, because Arazzo parsing does not build a SpecIndex. The index parameter is still required to satisfy the shared low.Buildable interface and generic extractors.

func (*Workflow) GetKeyNode

func (w *Workflow) GetKeyNode() *yaml.Node

GetKeyNode returns the key yaml node of the Workflow object.

func (*Workflow) GetRootNode

func (w *Workflow) GetRootNode() *yaml.Node

GetRootNode returns the root yaml node of the Workflow object.

func (*Workflow) Hash

func (w *Workflow) Hash() uint64

Hash will return a consistent hash of the Workflow object.

Jump to

Keyboard shortcuts

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