pub fn render_mock_server_binary() -> StringExpand description
Generate the src/main.rs for the standalone mock server binary.
The binary:
- Reads all
*.jsonfixture files from a fixtures directory (default../../fixtures). - For each fixture that has a
mock_responsefield, registers a route at/fixtures/{fixture_id}returning the configured status/body/SSE chunks. - Binds to
127.0.0.1:0(random port), printsMOCK_SERVER_URL=http://...to stdout, then waits until stdin is closed for clean teardown.
This binary is intended for cross-language e2e suites (WASM, Node) that spawn it as a child process and read the URL from its stdout.