Skip to main content

Module httpmock

Module httpmock 

Source
Expand description

Portable httpmock fixture generation.

The generated YAML is intentionally static: it can be loaded by httpmock’s standalone server, Docker image, or a local Rust test without bringing a JavaScript runtime or a Poolster runtime into the consumer’s test environment. Dynamic, stateful behaviour belongs in a future Poolster-owned mock server; static fixtures are the dependable baseline every SDK can share.

Structs§

HttpmockFixtureConfig
Options for generate_httpmock_fixtures.

Functions§

generate_httpmock_fixtures
Generates one static httpmock YAML document for every operation.
mock_dynamic_response
Returns a happy-path response with a fresh, schema-shaped fallback value. Explicit OpenAPI examples, defaults, constants, and enum values remain authoritative; only unconstrained fields vary with seed.
mock_happy_response
Returns the deterministic happy-path response used by Poolster’s fixture and native mock servers. This keeps Docker-based fixtures and poolster mock serve contract-compatible without requiring an external runtime.