I released json-responder 1.1.0.
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.
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:
curl
test result:
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…
This release contains new feature to resolve path dynamically when dyn_data_dir
is activated.
It means the server automatically returns .json
/ .json5
responses under dyn_data_dir
.
Supposed that there is:
json-responder-data (as `dyn_data_dir`)
├── a
│ └── b
│ └── c.json5
└── a.json
the responses at requests are:
request path | response content |
---|---|
/a | a.json |
/a/b | (HTTP 404) |
/a/b/c | c.json5 |
Now you don't have to write in config all paths you want to use in API tests ☺
Top comments (1)
Renamed to apimock-rs. Now more than returning JSON data.
github.com/nabbisen/apimock-rs