Expand description
Typed contracts for OpenAPI-derived mock scenarios.
Poolster keeps mock behaviour on an operation’s x-poolster-mock extension. The
extension is intentionally small and transport-neutral, so a generated
MSW handler, a standalone HTTP fixture, and a hosted mock environment can
all make the same request/response decision.
Structs§
- Mock
Request Match - Exact request predicates for a mock scenario.
- Mock
Response - The response emitted when a
MockRequestMatchsucceeds. - Mock
Scenario - One named mock scenario declared on an API operation.
Functions§
- extract_
mock_ scenarios - Extracts every valid
x-poolster-mockscenario from an API. - extract_
operation_ mock_ scenarios - Extracts and validates mock scenarios for one operation.
- mock_
scenario_ matches - Returns whether a scenario applies to one incoming HTTP request.