Expand description
Domain models and YAML configuration loading.
This module defines the shape of a mockd configuration file:
listen: ":8080"
routes:
- method: GET
path: /users/{id}
when:
query:
role: admin
response:
status: 200
body:
id: "{{path.id}}"Structs§
- Config
- Top-level configuration file.
- Request
Match - Rules used to decide whether a
Routematches an incoming request. - Response
Config - How a matched request should be answered.
- Route
- A single mock route.
- Unknown
Method Error - Error returned when a method string cannot be parsed.
Enums§
- Config
Error - Errors that can occur while loading a configuration.
- Method
- Supported HTTP methods.
- Response
Spec - Either a single response or an ordered sequence of responses.