Documentation
¶
Overview ¶
Package specification implements the repository's executable acceptance contracts. It is used by native tests and the evidence command, never by product requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaseFields ¶
CaseFields enumerates schema-validated declarative inputs plus expected fields. Every input configures Run's fixture or production adapter; expected values reach the assertions reader, which rejects any unhandled expectation.
Types ¶
type Case ¶
type Case struct {
ID string `json:"id"`
Action string `json:"action"`
Operation string `json:"operation,omitempty"`
Arguments []string `json:"arguments,omitempty"`
Format string `json:"format,omitempty"`
Fixture string `json:"fixture,omitempty"`
Count int `json:"count,omitempty"`
FailureStatus int `json:"failureStatus,omitempty"`
FailurePage int `json:"failurePage,omitempty"`
Value string `json:"value,omitempty"`
Malformed bool `json:"malformed,omitempty"`
Want map[string]json.RawMessage `json:"want"`
// contains filtered or unexported fields
}
Each action has a closed schema. Raw want fields are read only by the family checker; its destructive reader detects fields that never reach an assertion.
func (*Case) UnmarshalJSON ¶
type Coverage ¶
type Document ¶
type Document struct {
Schema string `json:"$schema"`
Version int `json:"version"`
Owner string `json:"owner"`
Source struct {
OpenAPI string `json:"openapi"`
Provenance string `json:"provenance"`
} `json:"source"`
Requirements []Requirement `json:"requirements"`
}
func ValidateDocument ¶
type NativeEvent ¶
type Observation ¶
type Provenance ¶
type Repository ¶
type Repository struct {
Root string
Document Document
API *openapi3.T
Router routers.Router
Provenance Provenance
Operations map[string]*openapi3.Operation
}
func Load ¶
func Load(root string) (*Repository, error)
func (*Repository) Requirement ¶
func (r *Repository) Requirement(name string) (Requirement, error)
Click to show internal directories.
Click to hide internal directories.