DEV CommunityWednesday · July 15, 2026FREE

I built a blazing-fast OpenAPI mock server in Rust — starts in milliseconds, zero config, dynamic fake data

rustopenapimock-serverapideveloper-tools

The author created mock-cli, a single static binary written in Rust that reads any OpenAPI 3 specification (YAML or JSON) and serves schema-aware, dynamic fake data over HTTP. It requires no runtime, no container, and no config file. Cold start is in the low milliseconds, avoiding JVM warmup, Node module resolution, or Docker pull. Unlike static stubs, every request produces different fake data that honors the schema: format: email gives a realistic email, format: uuid gives a v4 UUID, enum picks a valid value, required fields are always present, and minItems/maxItems are respected. The server is also path-aware: if a route like /pets/{petId} has a petId field in the response schema, the value from the URL is injected into the response. The tool can be installed via npm as @mock-cli/server or used as a native Rust binary from the GitHub repository.

// why it matters

Developers can instantly mock APIs without slow boot times or configuration, speeding up frontend and integration work.

Sources

Primary · DEV Community
▸ Read original at dev.to

Like this? Get the next digest.