Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateFromBytes ¶
GenerateFromBytes generates a probe Workflow YAML from OpenAPI spec bytes.
Types ¶
type Coverage ¶ added in v1.20.0
type Coverage struct {
Spec string
Operations []OperationCoverage
// OperationsOnly is set for a contract that declares no responses, such
// as a .proto file, whose methods do not say which statuses they end
// with, so that its coverage is told by operations alone.
OperationsOnly bool
}
Coverage is how much of an OpenAPI document the steps of a run checked: each operation the document declares, and each response the operation declares, with the steps whose response was matched to it.
func CountCoverage ¶ added in v1.20.0
CountCoverage counts the steps of r whose response was matched to each operation and response declared in the contract spec names, such as an OpenAPI document or a .proto file. A step counts for the contract when it names the same path, as the step gave it. It is an error when no step of r was checked against spec.
func NewCoverage ¶ added in v1.20.0
NewCoverage counts the steps of r whose response was matched to each operation and response of the OpenAPI document at spec. A step counts for the document when it names the same path, as the step gave it.
type Declared ¶ added in v1.20.0
Declared is an operation a contract declares, with the responses it declares for it, in the order it declares them.
type OperationCoverage ¶ added in v1.20.0
type OperationCoverage struct {
Operation string
Steps int // the steps whose response was matched to the operation
Responses []ResponseCoverage
}
OperationCoverage is one operation of a document, such as GET /users/{id}.
type ResponseCoverage ¶ added in v1.20.0
type ResponseCoverage struct {
Response string
Steps int // the steps whose response was matched to it
}
ResponseCoverage is one response an operation declares, such as 200, 2XX or default.