Skip to main content

Crate roas_arazzo_executor

Crate roas_arazzo_executor 

Source
Expand description

Executes OpenAPI Arazzo workflows.

An Arazzo description is a program: ordered steps that call API operations, assert on the responses, name outputs, and branch on success or failure. roas-arazzo parses and validates one; this crate runs it.

let options = Options::new().workflow("buyPet");
let report = execute(&description, &options, &mut client)?;
println!("{report}");

§No IO of its own

The engine decides what to send and asks a client to send it, so the same engine runs under a blocking client, an async one, or a fake that never touches a network. Implement HttpClient (or AsyncHttpClient), or enable the reqwest feature for ready-made ones.

Source descriptions are loaded the same way: fetching them is IO, so the caller supplies the parsed documents through Options::source.

§What it does not do yet

AsyncAPI steps (channelPath / action), XPath criteria and selectors, inputs schema validation, and parallel dependsOn execution. Each is reported where it is met rather than passed over, so a run never looks successful because something was skipped.

Modules§

testing
A client that answers from a script.

Structs§

Client
An HTTP client for the executor.
ClientError
Whatever went wrong carrying a request out.
CriterionOutcome
One criterion, and whether it held.
ExecutionReport
What a run did.
HttpRequest
A request a step wants performed.
HttpResponse
What a client got back.
Options
Everything a run needs besides the description itself.
Run
A workflow run, one request at a time.
StepRecord
One attempt at one step.

Enums§

CriterionError
Why a criterion could not be decided.
ExecutionError
Why a run could not continue.
ExpressionError
Why an expression could not be turned into a value.
Outcome
How a workflow finished.
Performed
What a step did — Arazzo has two kinds, and they leave different traces.
Progress
What the engine wants next.
SelectError
Why a value could not be produced.

Traits§

AsyncHttpClient
Performs a request without blocking the thread.
HttpClient
Performs a request and waits for the answer.

Functions§

execute
Run a workflow, performing every request with client.
execute_async
Run a workflow, performing every request with an async client.
execute_v1_0
Run an Arazzo v1.0 description, upconverting it to v1.1 first.

Type Aliases§

SendFuture
The future an AsyncHttpClient returns from send.
SleepFuture
The future an AsyncHttpClient returns from sleep.