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.
- Client
Error - Whatever went wrong carrying a request out.
- Criterion
Outcome - One criterion, and whether it held.
- Execution
Report - What a run did.
- Http
Request - A request a step wants performed.
- Http
Response - What a client got back.
- Options
- Everything a run needs besides the description itself.
- Run
- A workflow run, one request at a time.
- Step
Record - One attempt at one step.
Enums§
- Criterion
Error - Why a criterion could not be decided.
- Execution
Error - Why a run could not continue.
- Expression
Error - 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.
- Select
Error - Why a value could not be produced.
Traits§
- Async
Http Client - Performs a request without blocking the thread.
- Http
Client - 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§
- Send
Future - The future an
AsyncHttpClientreturns fromsend. - Sleep
Future - The future an
AsyncHttpClientreturns fromsleep.