Expand description
The document, reduced to the facts a CLI and a typed caller both need.
Document::load takes the two files an adopter ships — the vendor’s OpenAPI
document and their Overlay of corrections — and hands back a list of
Operations with every $ref already resolved. Nothing from openapiv3
escapes this module: after load returns, the parsed document is dropped.
Reducing a document is bless-time work, not startup work, and the document
feature is what says so in the manifest. A bless step enables it, calls
Document::load once and Document::to_blob on the result; the binary it
produces leaves it off, calls Document::from_blob, and has no reader
compiled into it to read YAML with. The two are the same reduction by
construction — there is one load — and a test holds the shipped blob to
the shipped document to prove the pair was written by the same run.
Structs§
- Document
- Every operation the document describes, in document order, plus the server it describes them against.
- Drift
Error - A generated inventory and the document it was generated from disagree.
- Field
- One scalar property of a flat JSON body.
- Gate
- One named hazard an operation stands behind, spelled as a long flag.
- Operation
- One operation: one subcommand under one group, one request.
- Param
- One parameter the document declares.
Enums§
- Body
- What the operation wants in the request body — and therefore which flags the subcommand grows. Each variant is exactly one flag set, so a body can never offer a flag that the request builder then ignores.
- Document
Error - The bytes a bless step wrote are not a reduction this crate can read.
- Effect
- Whether the CLI must hold this operation behind
--commit. - Join
- How the values of a list parameter reach the request.
- Load
Error - Reducing an OpenAPI document to
Operations failed. - Location
- Where a parameter goes in the request.
- Shape
- What one parameter is worth on a command line.
- Unsupported
- Why a parameter carries no flag.
Constants§
- COMMIT
- The write gate.
- FIELD_
PART - One text part of a multipart body.
- FILE_
PART - One file part of a multipart body.
- JSON_
BODY - Whole-body flag, for every operation that takes JSON.
- RAW_
BODY - Whole-body flag, for a media type this CLI does not assemble.