Help us shape the future of Go! Take the 2026 Go Developer Survey

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: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arazzo

type Arazzo struct {
	Arazzo             string                              `json:"arazzo,omitempty" yaml:"arazzo,omitempty"`
	Info               *Info                               `json:"info,omitempty" yaml:"info,omitempty"`
	SourceDescriptions []*SourceDescription                `json:"sourceDescriptions,omitempty" yaml:"sourceDescriptions,omitempty"`
	Workflows          []*Workflow                         `json:"workflows,omitempty" yaml:"workflows,omitempty"`
	Components         *Components                         `json:"components,omitempty" yaml:"components,omitempty"`
	Extensions         *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

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

func NewArazzo

func NewArazzo(a *low.Arazzo) *Arazzo

NewArazzo creates a new high-level Arazzo instance from a low-level one.

func (*Arazzo) AddOpenAPISourceDocument

func (a *Arazzo) AddOpenAPISourceDocument(docs ...*v3.Document)

AddOpenAPISourceDocument attaches one or more OpenAPI source documents to this Arazzo model. Attached documents are runtime metadata and are not rendered or serialized.

func (*Arazzo) GetOpenAPISourceDocuments

func (a *Arazzo) GetOpenAPISourceDocuments() []*v3.Document

GetOpenAPISourceDocuments returns attached OpenAPI source documents.

func (*Arazzo) GoLow

func (a *Arazzo) GoLow() *low.Arazzo

GoLow returns the low-level Arazzo instance used to create the high-level one.

func (*Arazzo) GoLowUntyped

func (a *Arazzo) GoLowUntyped() any

GoLowUntyped returns the low-level Arazzo instance with no type.

func (*Arazzo) MarshalYAML

func (a *Arazzo) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the Arazzo object.

func (*Arazzo) Render

func (a *Arazzo) Render() ([]byte, error)

Render returns a YAML representation of the Arazzo object as a byte slice.

type Components

type Components struct {
	Inputs         *orderedmap.Map[string, *yaml.Node]     `json:"inputs,omitempty" yaml:"inputs,omitempty"`
	Parameters     *orderedmap.Map[string, *Parameter]     `json:"parameters,omitempty" yaml:"parameters,omitempty"`
	SuccessActions *orderedmap.Map[string, *SuccessAction] `json:"successActions,omitempty" yaml:"successActions,omitempty"`
	FailureActions *orderedmap.Map[string, *FailureAction] `json:"failureActions,omitempty" yaml:"failureActions,omitempty"`
	Extensions     *orderedmap.Map[string, *yaml.Node]     `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

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

func NewComponents

func NewComponents(comp *low.Components) *Components

NewComponents creates a new high-level Components instance from a low-level one.

func (*Components) GoLow

func (c *Components) GoLow() *low.Components

GoLow returns the low-level Components instance used to create the high-level one.

func (*Components) GoLowUntyped

func (c *Components) GoLowUntyped() any

GoLowUntyped returns the low-level Components instance with no type.

func (*Components) MarshalYAML

func (c *Components) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the Components object.

func (*Components) Render

func (c *Components) Render() ([]byte, error)

Render returns a YAML representation of the Components object as a byte slice.

type Criterion

type Criterion struct {
	Context        string                              `json:"context,omitempty" yaml:"context,omitempty"`
	Condition      string                              `json:"condition,omitempty" yaml:"condition,omitempty"`
	Type           string                              `json:"-" yaml:"-"`
	ExpressionType *CriterionExpressionType            `json:"-" yaml:"-"`
	Extensions     *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

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

func NewCriterion

func NewCriterion(criterion *low.Criterion) *Criterion

NewCriterion creates a new high-level Criterion instance from a low-level one.

func (*Criterion) GetEffectiveType

func (c *Criterion) GetEffectiveType() string

GetEffectiveType returns the effective criterion type. Returns "simple" when Type is empty, the string value when set as a scalar, or ExpressionType.Type when the type field is an object.

func (*Criterion) GoLow

func (c *Criterion) GoLow() *low.Criterion

GoLow returns the low-level Criterion instance used to create the high-level one.

func (*Criterion) GoLowUntyped

func (c *Criterion) GoLowUntyped() any

GoLowUntyped returns the low-level Criterion instance with no type.

func (*Criterion) MarshalYAML

func (c *Criterion) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the Criterion object.

func (*Criterion) Render

func (c *Criterion) Render() ([]byte, error)

Render returns a YAML representation of the Criterion object as a byte slice.

type CriterionExpressionType

type CriterionExpressionType struct {
	Type       string                              `json:"type,omitempty" yaml:"type,omitempty"`
	Version    string                              `json:"version,omitempty" yaml:"version,omitempty"`
	Extensions *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

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

func NewCriterionExpressionType

func NewCriterionExpressionType(cet *low.CriterionExpressionType) *CriterionExpressionType

NewCriterionExpressionType creates a new high-level CriterionExpressionType instance from a low-level one.

func (*CriterionExpressionType) GoLow

GoLow returns the low-level CriterionExpressionType instance used to create the high-level one.

func (*CriterionExpressionType) GoLowUntyped

func (c *CriterionExpressionType) GoLowUntyped() any

GoLowUntyped returns the low-level CriterionExpressionType instance with no type.

func (*CriterionExpressionType) MarshalYAML

func (c *CriterionExpressionType) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the CriterionExpressionType object.

func (*CriterionExpressionType) Render

func (c *CriterionExpressionType) Render() ([]byte, error)

Render returns a YAML representation of the CriterionExpressionType object as a byte slice.

type FailureAction

type FailureAction struct {
	Name       string                              `json:"name,omitempty" yaml:"name,omitempty"`
	Type       string                              `json:"type,omitempty" yaml:"type,omitempty"`
	WorkflowId string                              `json:"workflowId,omitempty" yaml:"workflowId,omitempty"`
	StepId     string                              `json:"stepId,omitempty" yaml:"stepId,omitempty"`
	RetryAfter *float64                            `json:"retryAfter,omitempty" yaml:"retryAfter,omitempty"`
	RetryLimit *int64                              `json:"retryLimit,omitempty" yaml:"retryLimit,omitempty"`
	Criteria   []*Criterion                        `json:"criteria,omitempty" yaml:"criteria,omitempty"`
	Reference  string                              `json:"reference,omitempty" yaml:"reference,omitempty"`
	Extensions *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

FailureAction represents a high-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 NewFailureAction

func NewFailureAction(fa *low.FailureAction) *FailureAction

NewFailureAction creates a new high-level FailureAction instance from a low-level one.

func (*FailureAction) GoLow

func (f *FailureAction) GoLow() *low.FailureAction

GoLow returns the low-level FailureAction instance used to create the high-level one.

func (*FailureAction) GoLowUntyped

func (f *FailureAction) GoLowUntyped() any

GoLowUntyped returns the low-level FailureAction instance with no type.

func (*FailureAction) IsReusable

func (f *FailureAction) IsReusable() bool

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

func (*FailureAction) MarshalYAML

func (f *FailureAction) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the FailureAction object.

func (*FailureAction) Render

func (f *FailureAction) Render() ([]byte, error)

Render returns a YAML representation of the FailureAction object as a byte slice.

type Info

type Info struct {
	Title       string                              `json:"title,omitempty" yaml:"title,omitempty"`
	Summary     string                              `json:"summary,omitempty" yaml:"summary,omitempty"`
	Description string                              `json:"description,omitempty" yaml:"description,omitempty"`
	Version     string                              `json:"version,omitempty" yaml:"version,omitempty"`
	Extensions  *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

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

func NewInfo

func NewInfo(info *low.Info) *Info

NewInfo creates a new high-level Info instance from a low-level one.

func (*Info) GoLow

func (i *Info) GoLow() *low.Info

GoLow returns the low-level Info instance used to create the high-level one.

func (*Info) GoLowUntyped

func (i *Info) GoLowUntyped() any

GoLowUntyped returns the low-level Info instance with no type.

func (*Info) MarshalYAML

func (i *Info) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the Info object.

func (*Info) Render

func (i *Info) Render() ([]byte, error)

Render returns a YAML representation of the Info object as a byte slice.

type Parameter

type Parameter struct {
	Name       string                              `json:"name,omitempty" yaml:"name,omitempty"`
	In         string                              `json:"in,omitempty" yaml:"in,omitempty"`
	Value      *yaml.Node                          `json:"value,omitempty" yaml:"value,omitempty"`
	Reference  string                              `json:"reference,omitempty" yaml:"reference,omitempty"`
	Extensions *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

Parameter represents a high-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 NewParameter

func NewParameter(param *low.Parameter) *Parameter

NewParameter creates a new high-level Parameter instance from a low-level one.

func (*Parameter) GoLow

func (p *Parameter) GoLow() *low.Parameter

GoLow returns the low-level Parameter instance used to create the high-level one.

func (*Parameter) GoLowUntyped

func (p *Parameter) GoLowUntyped() any

GoLowUntyped returns the low-level Parameter instance with no type.

func (*Parameter) IsReusable

func (p *Parameter) IsReusable() bool

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

func (*Parameter) MarshalYAML

func (p *Parameter) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the Parameter object.

func (*Parameter) Render

func (p *Parameter) Render() ([]byte, error)

Render returns a YAML representation of the Parameter object as a byte slice.

type PayloadReplacement

type PayloadReplacement struct {
	Target     string                              `json:"target,omitempty" yaml:"target,omitempty"`
	Value      *yaml.Node                          `json:"value,omitempty" yaml:"value,omitempty"`
	Extensions *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

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

func NewPayloadReplacement

func NewPayloadReplacement(pr *low.PayloadReplacement) *PayloadReplacement

NewPayloadReplacement creates a new high-level PayloadReplacement instance from a low-level one.

func (*PayloadReplacement) GoLow

GoLow returns the low-level PayloadReplacement instance used to create the high-level one.

func (*PayloadReplacement) GoLowUntyped

func (p *PayloadReplacement) GoLowUntyped() any

GoLowUntyped returns the low-level PayloadReplacement instance with no type.

func (*PayloadReplacement) MarshalYAML

func (p *PayloadReplacement) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the PayloadReplacement object.

func (*PayloadReplacement) Render

func (p *PayloadReplacement) Render() ([]byte, error)

Render returns a YAML representation of the PayloadReplacement object as a byte slice.

type RequestBody

type RequestBody struct {
	ContentType  string                              `json:"contentType,omitempty" yaml:"contentType,omitempty"`
	Payload      *yaml.Node                          `json:"payload,omitempty" yaml:"payload,omitempty"`
	Replacements []*PayloadReplacement               `json:"replacements,omitempty" yaml:"replacements,omitempty"`
	Extensions   *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

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

func NewRequestBody

func NewRequestBody(rb *low.RequestBody) *RequestBody

NewRequestBody creates a new high-level RequestBody instance from a low-level one.

func (*RequestBody) GoLow

func (r *RequestBody) GoLow() *low.RequestBody

GoLow returns the low-level RequestBody instance used to create the high-level one.

func (*RequestBody) GoLowUntyped

func (r *RequestBody) GoLowUntyped() any

GoLowUntyped returns the low-level RequestBody instance with no type.

func (*RequestBody) MarshalYAML

func (r *RequestBody) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the RequestBody object.

func (*RequestBody) Render

func (r *RequestBody) Render() ([]byte, error)

Render returns a YAML representation of the RequestBody object as a byte slice.

type SourceDescription

type SourceDescription struct {
	Name       string                              `json:"name,omitempty" yaml:"name,omitempty"`
	URL        string                              `json:"url,omitempty" yaml:"url,omitempty"`
	Type       string                              `json:"type,omitempty" yaml:"type,omitempty"`
	Extensions *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

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

func NewSourceDescription

func NewSourceDescription(sd *low.SourceDescription) *SourceDescription

NewSourceDescription creates a new high-level SourceDescription instance from a low-level one.

func (*SourceDescription) GoLow

GoLow returns the low-level SourceDescription instance used to create the high-level one.

func (*SourceDescription) GoLowUntyped

func (s *SourceDescription) GoLowUntyped() any

GoLowUntyped returns the low-level SourceDescription instance with no type.

func (*SourceDescription) MarshalYAML

func (s *SourceDescription) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the SourceDescription object.

func (*SourceDescription) Render

func (s *SourceDescription) Render() ([]byte, error)

Render returns a YAML representation of the SourceDescription object as a byte slice.

type Step

type Step struct {
	StepId          string                              `json:"stepId,omitempty" yaml:"stepId,omitempty"`
	Description     string                              `json:"description,omitempty" yaml:"description,omitempty"`
	OperationId     string                              `json:"operationId,omitempty" yaml:"operationId,omitempty"`
	OperationPath   string                              `json:"operationPath,omitempty" yaml:"operationPath,omitempty"`
	WorkflowId      string                              `json:"workflowId,omitempty" yaml:"workflowId,omitempty"`
	Parameters      []*Parameter                        `json:"parameters,omitempty" yaml:"parameters,omitempty"`
	RequestBody     *RequestBody                        `json:"requestBody,omitempty" yaml:"requestBody,omitempty"`
	SuccessCriteria []*Criterion                        `json:"successCriteria,omitempty" yaml:"successCriteria,omitempty"`
	OnSuccess       []*SuccessAction                    `json:"onSuccess,omitempty" yaml:"onSuccess,omitempty"`
	OnFailure       []*FailureAction                    `json:"onFailure,omitempty" yaml:"onFailure,omitempty"`
	Outputs         *orderedmap.Map[string, string]     `json:"outputs,omitempty" yaml:"outputs,omitempty"`
	Extensions      *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

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

func NewStep

func NewStep(step *low.Step) *Step

NewStep creates a new high-level Step instance from a low-level one.

func (*Step) GoLow

func (s *Step) GoLow() *low.Step

GoLow returns the low-level Step instance used to create the high-level one.

func (*Step) GoLowUntyped

func (s *Step) GoLowUntyped() any

GoLowUntyped returns the low-level Step instance with no type.

func (*Step) MarshalYAML

func (s *Step) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the Step object.

func (*Step) Render

func (s *Step) Render() ([]byte, error)

Render returns a YAML representation of the Step object as a byte slice.

type SuccessAction

type SuccessAction struct {
	Name       string                              `json:"name,omitempty" yaml:"name,omitempty"`
	Type       string                              `json:"type,omitempty" yaml:"type,omitempty"`
	WorkflowId string                              `json:"workflowId,omitempty" yaml:"workflowId,omitempty"`
	StepId     string                              `json:"stepId,omitempty" yaml:"stepId,omitempty"`
	Criteria   []*Criterion                        `json:"criteria,omitempty" yaml:"criteria,omitempty"`
	Reference  string                              `json:"reference,omitempty" yaml:"reference,omitempty"`
	Extensions *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

SuccessAction represents a high-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 NewSuccessAction

func NewSuccessAction(sa *low.SuccessAction) *SuccessAction

NewSuccessAction creates a new high-level SuccessAction instance from a low-level one.

func (*SuccessAction) GoLow

func (s *SuccessAction) GoLow() *low.SuccessAction

GoLow returns the low-level SuccessAction instance used to create the high-level one.

func (*SuccessAction) GoLowUntyped

func (s *SuccessAction) GoLowUntyped() any

GoLowUntyped returns the low-level SuccessAction instance with no type.

func (*SuccessAction) IsReusable

func (s *SuccessAction) IsReusable() bool

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

func (*SuccessAction) MarshalYAML

func (s *SuccessAction) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the SuccessAction object.

func (*SuccessAction) Render

func (s *SuccessAction) Render() ([]byte, error)

Render returns a YAML representation of the SuccessAction object as a byte slice.

type Workflow

type Workflow struct {
	WorkflowId     string                              `json:"workflowId,omitempty" yaml:"workflowId,omitempty"`
	Summary        string                              `json:"summary,omitempty" yaml:"summary,omitempty"`
	Description    string                              `json:"description,omitempty" yaml:"description,omitempty"`
	Inputs         *yaml.Node                          `json:"inputs,omitempty" yaml:"inputs,omitempty"`
	DependsOn      []string                            `json:"dependsOn,omitempty" yaml:"dependsOn,omitempty"`
	Steps          []*Step                             `json:"steps,omitempty" yaml:"steps,omitempty"`
	SuccessActions []*SuccessAction                    `json:"successActions,omitempty" yaml:"successActions,omitempty"`
	FailureActions []*FailureAction                    `json:"failureActions,omitempty" yaml:"failureActions,omitempty"`
	Outputs        *orderedmap.Map[string, string]     `json:"outputs,omitempty" yaml:"outputs,omitempty"`
	Parameters     []*Parameter                        `json:"parameters,omitempty" yaml:"parameters,omitempty"`
	Extensions     *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

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

func NewWorkflow

func NewWorkflow(wf *low.Workflow) *Workflow

NewWorkflow creates a new high-level Workflow instance from a low-level one.

func (*Workflow) GoLow

func (w *Workflow) GoLow() *low.Workflow

GoLow returns the low-level Workflow instance used to create the high-level one.

func (*Workflow) GoLowUntyped

func (w *Workflow) GoLowUntyped() any

GoLowUntyped returns the low-level Workflow instance with no type.

func (*Workflow) MarshalYAML

func (w *Workflow) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the Workflow object.

func (*Workflow) Render

func (w *Workflow) Render() ([]byte, error)

Render returns a YAML representation of the Workflow object as a byte slice.

Jump to

Keyboard shortcuts

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