DEV Community

nabbisen
nabbisen

Posted on • Updated on

I pre-released my project "apimock-rs" (former json-responder) written in Rust

I pre-released my project "json-responder" ☺

GitHub logo nabbisen / apimock-rs

API mock Server generating HTTP/JSON responses written in Rust

apimock-rs

Mocking helper to develop microservices and APIs. hyper-based HTTP server generating REST responses containing JSON ones. Written in Rust.

License

Summary

Aims to help developers to easily get responses from dummy API, especially microservice API, according to several paths Each single executable on Win/Mac/Linux are available, thanks to Rust and their cross-platform support. Releases are "out-of-the-box" coming with default config apimock.toml.

* Renamed from json-responder. Now more than returning JSON data.

Screenshots

Server started to listen:

server starts

curl test result:

server responds

Designed in mind with

  • Performance
    • Fast speed
    • Low memory consumption
  • Easy setup/usage
    • Built as single (and small) executable
    • Integrated configuration
      • No need to write scripts
      • Config-less mode is also supported
  • Cross-platform support

Features

  • GET / POST methods
  • Multiple paths
  • Multiple .json/.json5 files treated as JSON Response
  • Dynamic path resolution with dyn_data_dir
  • Custom responses codes (HTTP 3xx as redirects and 4xx and 5xx as errors)
  • Custom headers and…

It is server written in Rust to generate JSON responses, aiming to help dev to easily get dummy API responses due to several paths.

Designed in mind with: fast speed, low memory consumption, easy usage.

Server startup:

server startup

curl result:

curl result

Top comments (1)

Collapse
 
nabbisen profile image
nabbisen

Renamed to apimock-rs. Now more than returning JSON data.

github.com/nabbisen/apimock-rs