Directories
¶
| Path | Synopsis |
|---|---|
|
Package bind decides which parameters get their value from an earlier response (FR-PARAM-01 rank 1, FR-PARAM-03/05/06) and extracts those values.
|
Package bind decides which parameters get their value from an earlier response (FR-PARAM-01 rank 1, FR-PARAM-03/05/06) and extracts those values. |
|
Package cases derives test cases from the examples of an OpenAPI spec (FR-CASE) and orders them within their resource group.
|
Package cases derives test cases from the examples of an OpenAPI spec (FR-CASE) and orders them within their resource group. |
|
Package compare implements stage 2 (schema) and stage 3 (example) of the response checks (FR-CMP).
|
Package compare implements stage 2 (schema) and stage 3 (example) of the response checks (FR-CMP). |
|
Package deviations loads and applies the file of accepted deviations between spec and API (FR-DEV).
|
Package deviations loads and applies the file of accepted deviations between spec and API (FR-DEV). |
|
Package exec builds HTTP requests from cases and sends them (FR-HTTP).
|
Package exec builds HTTP requests from cases and sends them (FR-HTTP). |
|
gen
|
|
|
apply
Package apply writes examples into an OpenAPI file, at the places apitest reads them: parameter.example, requestBody content[mt].example and the examples of 2xx responses.
|
Package apply writes examples into an OpenAPI file, at the places apitest reads them: parameter.example, requestBody content[mt].example and the examples of 2xx responses. |
|
check
Package check reports what would keep apitest from running a spec: cases that would be NOT_BUILDABLE and examples that violate their schema.
|
Package check reports what would keep apitest from running a spec: cases that would be NOT_BUILDABLE and examples that violate their schema. |
|
defaults
Package defaults reads defaults.json: values that must be used wherever a field or parameter of that name appears, because they have to exist in the test environment.
|
Package defaults reads defaults.json: values that must be used wherever a field or parameter of that name appears, because they have to exist in the test environment. |
|
dict
Package dict is the global dictionary of apitest-gen: one node per DTO field and per parameter, with the constraints from the spec and the example value.
|
Package dict is the global dictionary of apitest-gen: one node per DTO field and per parameter, with the constraints from the spec and the example value. |
|
discover
Package discover fills the source entries of defaults.json from a running environment: {"from": "GET /Planet", "pick": "/0/PlanetCode"} sends that GET and takes the value at "pick".
|
Package discover fills the source entries of defaults.json from a running environment: {"from": "GET /Planet", "pick": "/0/PlanetCode"} sends that GET and takes the value at "pick". |
|
model
Package model detects the resources of a spec: which DTOs describe the same thing (BookRead, BookUpdate → Book), which fields identify a record (the path parameters /Book/id/{id} and /Book/{Code} → Id and Code), which operations list, read, create, update and delete it, which resource another one belongs to (/Book/{Code}/Article → Article below Book) and which fields refer to a record of another resource (Article.BookId).
|
Package model detects the resources of a spec: which DTOs describe the same thing (BookRead, BookUpdate → Book), which fields identify a record (the path parameters /Book/id/{id} and /Book/{Code} → Id and Code), which operations list, read, create, update and delete it, which resource another one belongs to (/Book/{Code}/Article → Article below Book) and which fields refer to a record of another resource (Article.BookId). |
|
record
Package record keeps the examples of a spec in one file, the record file (examples.record.yaml): per tag the requests in the order they run, each with the answer the instance gave.
|
Package record keeps the examples of a spec in one file, the record file (examples.record.yaml): per tag the requests in the order they run, each with the answer the instance gave. |
|
review
Package review evaluates what apitest would report about a spec, the spec findings, cases it could not send and values the generator could not create, and proposes a fix for each: a defaults.json entry where one can solve it, otherwise what to do.
|
Package review evaluates what apitest would report about a spec, the spec findings, cases it could not send and values the generator could not create, and proposes a fix for each: a defaults.json entry where one can solve it, otherwise what to do. |
|
scenario
Package scenario makes the examples of a spec consistent with the data apitest meets at run time.
|
Package scenario makes the examples of a spec consistent with the data apitest meets at run time. |
|
value
Package value generates example values that fit an OpenAPI schema.
|
Package value generates example values that fit an OpenAPI schema. |
|
yamldoc
Package yamldoc edits an OpenAPI file as a YAML node tree, so comments and the order of keys survive.
|
Package yamldoc edits an OpenAPI file as a YAML node tree, so comments and the order of keys survive. |
|
Package params resolves parameter values (FR-PARAM-01/02) and serializes them according to the OpenAPI style rules (FR-PARAM-07).
|
Package params resolves parameter values (FR-PARAM-01/02) and serializes them according to the OpenAPI style rules (FR-PARAM-07). |
|
Package plan orders the cases of a run (FR-ORDER): resource groups follow the dependency graph of their bindings, cases within a group follow their rank (create, read, list, update, 4xx, authentication, delete; the operations of Options.LastInTag after all but the deletes), DELETE cases of groups that others depend on (or of all groups with DeleteLast) run after all groups, in reverse order.
|
Package plan orders the cases of a run (FR-ORDER): resource groups follow the dependency graph of their bindings, cases within a group follow their rank (create, read, list, update, 4xx, authentication, delete; the operations of Options.LastInTag after all but the deletes), DELETE cases of groups that others depend on (or of all groups with DeleteLast) run after all groups, in reverse order. |
|
Package redact removes secrets from everything apitest outputs: report, t.Log/t.Errorf messages and error texts (FR-REP-03, NFR-06).
|
Package redact removes secrets from everything apitest outputs: report, t.Log/t.Errorf messages and error texts (FR-REP-03, NFR-06). |
|
Package regexgen produces strings that match a schema pattern.
|
Package regexgen produces strings that match a schema pattern. |
|
Package report renders the reports (FR-REP): Markdown for pull requests and CI, and a self-contained HTML dashboard; both are written atomically.
|
Package report renders the reports (FR-REP): Markdown for pull requests and CI, and a self-contained HTML dashboard; both are written atomically. |
|
Package selection evaluates "go test -run" and "-skip" patterns the same way the testing package does.
|
Package selection evaluates "go test -run" and "-skip" patterns the same way the testing package does. |
|
Package spec loads an OpenAPI document and exposes its operations in a deterministic order.
|
Package spec loads an OpenAPI document and exposes its operations in a deterministic order. |
|
Package testserver is the "Bookstore" API used by the component tests of apitest.
|
Package testserver is the "Bookstore" API used by the component tests of apitest. |
|
Package token manipulates and inspects tokens for the authentication cases (FR-CASE-10) and the expiry check (FR-AUTH-06).
|
Package token manipulates and inspects tokens for the authentication cases (FR-CASE-10) and the expiry check (FR-AUTH-06). |
Click to show internal directories.
Click to hide internal directories.