Documentation
¶
Index ¶
- Variables
- type Arazzo
- func (a *Arazzo) AddOpenAPISourceDocument(docs ...*v3.Document)
- func (a *Arazzo) GetDocumentOrigin() *DocumentOrigin
- func (a *Arazzo) GetOpenAPISourceDocuments() []*v3.Document
- func (a *Arazzo) GetSpecificationVersion() (*SpecificationVersion, error)
- func (a *Arazzo) GoLow() *low.Arazzo
- func (a *Arazzo) GoLowUntyped() any
- func (a *Arazzo) MarshalYAML() (any, error)
- func (a *Arazzo) Render() ([]byte, error)
- type Components
- type Criterion
- type CriterionExpressionType
- type DocumentOrigin
- type ExpressionType
- type FailureAction
- type FeatureFamily
- type Info
- type OutputValue
- func (o *OutputValue) GetExpression() (string, bool)
- func (o *OutputValue) GetSelector() (*Selector, bool)
- func (o *OutputValue) GoLow() *low.OutputValue
- func (o *OutputValue) GoLowUntyped() any
- func (o *OutputValue) IsExpression() bool
- func (o *OutputValue) IsSelector() bool
- func (o *OutputValue) MarshalJSON() ([]byte, error)
- func (o *OutputValue) MarshalYAML() (any, error)
- func (o *OutputValue) Render() ([]byte, error)
- func (o *OutputValue) SetExpression(expression string)
- func (o *OutputValue) SetSelector(selector *Selector)
- type Parameter
- func (p *Parameter) GetSelector() (*Selector, bool)
- func (p *Parameter) GetValueNode() *yaml.Node
- func (p *Parameter) GoLow() *low.Parameter
- func (p *Parameter) GoLowUntyped() any
- func (p *Parameter) IsReusable() bool
- func (p *Parameter) IsRuntimeExpression() bool
- func (p *Parameter) IsSelector() bool
- func (p *Parameter) MarshalYAML() (any, error)
- func (p *Parameter) Render() ([]byte, error)
- type PayloadReplacement
- func (p *PayloadReplacement) GetSelector() (*Selector, bool)
- func (p *PayloadReplacement) GetSelectors() []*Selector
- func (p *PayloadReplacement) GetValueNode() *yaml.Node
- func (p *PayloadReplacement) GoLow() *low.PayloadReplacement
- func (p *PayloadReplacement) GoLowUntyped() any
- func (p *PayloadReplacement) IsRuntimeExpression() bool
- func (p *PayloadReplacement) IsSelector() bool
- func (p *PayloadReplacement) MarshalYAML() (any, error)
- func (p *PayloadReplacement) Render() ([]byte, error)
- type RequestBody
- type Selector
- type SourceDescription
- type SpecificationVersion
- type Step
- type SuccessAction
- type Workflow
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnsupportedVersion = errors.New("unsupported Arazzo specification version")
ErrUnsupportedVersion indicates a malformed or unsupported Arazzo specification version.
Functions ¶
This section is empty.
Types ¶
type Arazzo ¶
type Arazzo struct {
Arazzo string `json:"arazzo,omitempty" yaml:"arazzo,omitempty"`
Self string `json:"$self,omitempty" yaml:"$self,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.1.0
func NewArazzoWithOrigin ¶ added in v0.39.0
func NewArazzoWithOrigin(a *low.Arazzo, origin *DocumentOrigin) *Arazzo
NewArazzoWithOrigin creates a high-level Arazzo instance with immutable origin metadata.
func (*Arazzo) AddOpenAPISourceDocument ¶
AddOpenAPISourceDocument attaches one or more OpenAPI source documents to this Arazzo model. Attached documents are runtime metadata and are not rendered or serialized. It is safe to call concurrently, and concurrently with GetOpenAPISourceDocuments.
func (*Arazzo) GetDocumentOrigin ¶ added in v0.39.0
func (a *Arazzo) GetDocumentOrigin() *DocumentOrigin
GetDocumentOrigin returns a copy of the document's immutable construction metadata.
func (*Arazzo) GetOpenAPISourceDocuments ¶
GetOpenAPISourceDocuments returns attached OpenAPI source documents. The returned slice is a copy, so callers may retain it while more are attached.
func (*Arazzo) GetSpecificationVersion ¶ added in v0.39.0
func (a *Arazzo) GetSpecificationVersion() (*SpecificationVersion, error)
GetSpecificationVersion returns patch-insensitive feature metadata for the authored arazzo field.
func (*Arazzo) GoLow ¶
GoLow returns the low-level Arazzo instance used to create the high-level one.
func (*Arazzo) GoLowUntyped ¶
GoLowUntyped returns the low-level Arazzo instance with no type.
func (*Arazzo) MarshalYAML ¶
MarshalYAML creates a ready to render YAML representation of the Arazzo object.
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 ¶
NewCriterion creates a new high-level Criterion instance from a low-level one.
func (*Criterion) GetEffectiveType ¶
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 ¶
GoLow returns the low-level Criterion instance used to create the high-level one.
func (*Criterion) GoLowUntyped ¶
GoLowUntyped returns the low-level Criterion instance with no type.
func (*Criterion) MarshalYAML ¶
MarshalYAML creates a ready to render YAML representation of the Criterion object.
type CriterionExpressionType ¶
type CriterionExpressionType = ExpressionType
CriterionExpressionType is retained as an alias for source compatibility with Arazzo 1.0 callers.
func NewCriterionExpressionType ¶
func NewCriterionExpressionType(cet *low.CriterionExpressionType) *CriterionExpressionType
NewCriterionExpressionType creates a reusable ExpressionType from the legacy low-level alias.
type DocumentOrigin ¶ added in v0.39.0
type DocumentOrigin struct {
AuthoredSelf string
ResolvedIdentity string
RetrievalURI string
ApplicationBaseURI string
EffectiveBaseURI string
}
DocumentOrigin keeps authored identity separate from retrieval and effective base metadata. The values are runtime metadata and are never rendered into the document.
func ResolveDocumentOrigin ¶ added in v0.39.0
func ResolveDocumentOrigin(authoredSelf, retrievalURI, applicationBaseURI string) (*DocumentOrigin, error)
ResolveDocumentOrigin applies Arazzo base-URI precedence without performing retrieval.
type ExpressionType ¶ added in v0.39.0
type ExpressionType 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
}
ExpressionType represents a high-level Arazzo Expression Type Object. https://spec.openapis.org/arazzo/v1.1.0#expression-type-object
func NewExpressionType ¶ added in v0.39.0
func NewExpressionType(cet *low.ExpressionType) *ExpressionType
NewExpressionType creates a new high-level ExpressionType instance from a low-level one.
func (*ExpressionType) GoLow ¶ added in v0.39.0
func (c *ExpressionType) GoLow() *low.ExpressionType
GoLow returns the low-level CriterionExpressionType instance used to create the high-level one.
func (*ExpressionType) GoLowUntyped ¶ added in v0.39.0
func (c *ExpressionType) GoLowUntyped() any
GoLowUntyped returns the low-level CriterionExpressionType instance with no type.
func (*ExpressionType) MarshalYAML ¶ added in v0.39.0
func (c *ExpressionType) MarshalYAML() (any, error)
MarshalYAML creates a ready to render YAML representation of the CriterionExpressionType object.
func (*ExpressionType) Render ¶ added in v0.39.0
func (c *ExpressionType) 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"`
Parameters []*Parameter `json:"parameters,omitempty" yaml:"parameters,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.1.0#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 FeatureFamily ¶ added in v0.39.0
type FeatureFamily string
FeatureFamily identifies the patch-insensitive Arazzo feature set.
const ( // FeatureFamily10 identifies the Arazzo 1.0 feature set. FeatureFamily10 FeatureFamily = "1.0" // FeatureFamily11 identifies the Arazzo 1.1 feature set. FeatureFamily11 FeatureFamily = "1.1" )
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 (*Info) GoLowUntyped ¶
GoLowUntyped returns the low-level Info instance with no type.
func (*Info) MarshalYAML ¶
MarshalYAML creates a ready to render YAML representation of the Info object.
type OutputValue ¶ added in v0.39.0
type OutputValue struct {
// contains filtered or unexported fields
}
OutputValue represents a runtime-expression scalar or Selector Object. Exactly one variant must be active when the value is rendered.
Example ¶
package main
import (
"fmt"
arazzo "github.com/pb33f/libopenapi/datamodel/high/arazzo"
"github.com/pb33f/libopenapi/orderedmap"
)
func main() {
outputs := orderedmap.New[string, *arazzo.OutputValue]()
outputs.Set("createdPetId", arazzo.NewExpressionOutputValue("$response.body#/id"))
outputs.Set("email", arazzo.NewSelectorOutputValue(&arazzo.Selector{
Context: "$response.body",
Selector: "$.profile.email",
Type: "jsonpath",
}))
expressionOutput, _ := outputs.Get("createdPetId")
expression, _ := expressionOutput.GetExpression()
selectorOutput, _ := outputs.Get("email")
selector, _ := selectorOutput.GetSelector()
fmt.Println(expression)
fmt.Println(selector.Selector)
}
Output: $response.body#/id $.profile.email
func NewExpressionOutputValue ¶ added in v0.39.0
func NewExpressionOutputValue(expression string) *OutputValue
NewExpressionOutputValue creates a scalar runtime-expression output.
func NewOutputValue ¶ added in v0.39.0
func NewOutputValue(value *low.OutputValue) *OutputValue
NewOutputValue creates a high-level output union from a low-level value.
func NewSelectorOutputValue ¶ added in v0.39.0
func NewSelectorOutputValue(selector *Selector) *OutputValue
NewSelectorOutputValue creates a Selector Object output.
func (*OutputValue) GetExpression ¶ added in v0.39.0
func (o *OutputValue) GetExpression() (string, bool)
GetExpression returns the expression and whether it is the active variant.
func (*OutputValue) GetSelector ¶ added in v0.39.0
func (o *OutputValue) GetSelector() (*Selector, bool)
GetSelector returns the Selector and whether it is the active variant.
func (*OutputValue) GoLow ¶ added in v0.39.0
func (o *OutputValue) GoLow() *low.OutputValue
GoLow returns the low-level output value used to create this model.
func (*OutputValue) GoLowUntyped ¶ added in v0.39.0
func (o *OutputValue) GoLowUntyped() any
GoLowUntyped returns the low-level output value without a concrete type.
func (*OutputValue) IsExpression ¶ added in v0.39.0
func (o *OutputValue) IsExpression() bool
IsExpression reports whether exactly the expression variant is active.
func (*OutputValue) IsSelector ¶ added in v0.39.0
func (o *OutputValue) IsSelector() bool
IsSelector reports whether exactly the selector variant is active.
func (*OutputValue) MarshalJSON ¶ added in v0.39.0
func (o *OutputValue) MarshalJSON() ([]byte, error)
MarshalJSON renders the active output union variant.
func (*OutputValue) MarshalYAML ¶ added in v0.39.0
func (o *OutputValue) MarshalYAML() (any, error)
MarshalYAML renders the active union variant.
func (*OutputValue) Render ¶ added in v0.39.0
func (o *OutputValue) Render() ([]byte, error)
Render returns the active output variant as YAML.
func (*OutputValue) SetExpression ¶ added in v0.39.0
func (o *OutputValue) SetExpression(expression string)
SetExpression switches the output to the runtime-expression variant.
func (*OutputValue) SetSelector ¶ added in v0.39.0
func (o *OutputValue) SetSelector(selector *Selector)
SetSelector switches the output to the Selector Object variant. A nil selector clears the output so it cannot accidentally render as a valid union member.
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.1.0#parameter-object
func NewParameter ¶
NewParameter creates a new high-level Parameter instance from a low-level one.
func (*Parameter) GetSelector ¶ added in v0.39.0
GetSelector returns the typed Selector Object when active.
func (*Parameter) GetValueNode ¶ added in v0.39.0
GetValueNode returns the original parameter value node.
func (*Parameter) GoLow ¶
GoLow returns the low-level Parameter instance used to create the high-level one.
func (*Parameter) GoLowUntyped ¶
GoLowUntyped returns the low-level Parameter instance with no type.
func (*Parameter) IsReusable ¶
IsReusable returns true if this parameter is a Reusable Object (has a reference field).
func (*Parameter) IsRuntimeExpression ¶ added in v0.39.0
IsRuntimeExpression reports whether the parameter value is a runtime-expression scalar.
func (*Parameter) IsSelector ¶ added in v0.39.0
IsSelector reports whether the parameter value is a Selector Object.
func (*Parameter) MarshalYAML ¶
MarshalYAML creates a ready to render YAML representation of the Parameter object.
type PayloadReplacement ¶
type PayloadReplacement struct {
Target string `json:"target,omitempty" yaml:"target,omitempty"`
TargetSelectorType string `json:"-" yaml:"-"`
TargetSelectorExpressionType *ExpressionType `json:"-" yaml:"-"`
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.1.0#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) GetSelector ¶ added in v0.39.0
func (p *PayloadReplacement) GetSelector() (*Selector, bool)
GetSelector returns the typed Selector Object when the value has selector shape.
func (*PayloadReplacement) GetSelectors ¶ added in v0.39.0
func (p *PayloadReplacement) GetSelectors() []*Selector
GetSelectors returns every Selector Object nested in the replacement value.
func (*PayloadReplacement) GetValueNode ¶ added in v0.39.0
func (p *PayloadReplacement) GetValueNode() *yaml.Node
GetValueNode returns the original replacement value node.
func (*PayloadReplacement) GoLow ¶
func (p *PayloadReplacement) GoLow() *low.PayloadReplacement
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) IsRuntimeExpression ¶ added in v0.39.0
func (p *PayloadReplacement) IsRuntimeExpression() bool
IsRuntimeExpression reports whether the replacement value is a runtime-expression scalar.
func (*PayloadReplacement) IsSelector ¶ added in v0.39.0
func (p *PayloadReplacement) IsSelector() bool
IsSelector reports whether the replacement value is a Selector Object.
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.1.0#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) GetSelectors ¶ added in v0.39.0
func (r *RequestBody) GetSelectors() []*Selector
GetSelectors returns every typed Selector Object nested in the request payload. Callers do not need to traverse untyped YAML mappings to discover selectors.
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 Selector ¶ added in v0.39.0
type Selector struct {
Context string `json:"context,omitempty" yaml:"context,omitempty"`
Selector string `json:"selector,omitempty" yaml:"selector,omitempty"`
Type string `json:"-" yaml:"-"`
ExpressionType *ExpressionType `json:"-" yaml:"-"`
Extensions *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
// contains filtered or unexported fields
}
Selector represents a high-level Arazzo Selector Object. https://spec.openapis.org/arazzo/v1.1.0#selector-object
func NewSelector ¶ added in v0.39.0
NewSelector creates a high-level Selector from its low-level model.
func (*Selector) GetEffectiveType ¶ added in v0.39.0
GetEffectiveType returns the scalar type or the type declared by the Expression Type Object.
func (*Selector) GoLow ¶ added in v0.39.0
GoLow returns the low-level Selector used to create this model.
func (*Selector) GoLowUntyped ¶ added in v0.39.0
GoLowUntyped returns the low-level Selector without a concrete type.
func (*Selector) MarshalJSON ¶ added in v0.39.0
MarshalJSON renders the same scalar-or-object type union used by YAML.
func (*Selector) MarshalYAML ¶ added in v0.39.0
MarshalYAML renders the Selector and rejects competing type variants.
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 ¶
func (s *SourceDescription) GoLow() *low.SourceDescription
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 SpecificationVersion ¶ added in v0.39.0
type SpecificationVersion struct {
Authored string
Major int
Minor int
Patch int
Family FeatureFamily
}
SpecificationVersion is the parsed Arazzo specification version, distinct from info.version.
func ParseSpecificationVersion ¶ added in v0.39.0
func ParseSpecificationVersion(authored string) (*SpecificationVersion, error)
ParseSpecificationVersion parses supported 1.0.x and 1.1.x specification versions.
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"`
ChannelPath string `json:"channelPath,omitempty" yaml:"channelPath,omitempty"`
Action string `json:"action,omitempty" yaml:"action,omitempty"`
WorkflowId string `json:"workflowId,omitempty" yaml:"workflowId,omitempty"`
CorrelationId string `json:"correlationId,omitempty" yaml:"correlationId,omitempty"`
Timeout *int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"`
DependsOn []string `json:"dependsOn,omitempty" yaml:"dependsOn,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, *OutputValue] `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.1.0#step-object
func (*Step) GoLowUntyped ¶
GoLowUntyped returns the low-level Step instance with no type.
func (*Step) MarshalYAML ¶
MarshalYAML creates a ready to render YAML representation of the Step object.
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"`
Parameters []*Parameter `json:"parameters,omitempty" yaml:"parameters,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.1.0#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, *OutputValue] `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.1.0#workflow-object
func NewWorkflow ¶
NewWorkflow creates a new high-level Workflow instance from a low-level one.
func (*Workflow) GoLow ¶
GoLow returns the low-level Workflow instance used to create the high-level one.
func (*Workflow) GoLowUntyped ¶
GoLowUntyped returns the low-level Workflow instance with no type.
func (*Workflow) MarshalYAML ¶
MarshalYAML creates a ready to render YAML representation of the Workflow object.