Crates.io | serverify |
lib.rs | serverify |
version | 0.2.0 |
source | src |
created_at | 2024-11-26 15:52:31.106716 |
updated_at | 2024-11-26 15:52:31.106716 |
description | serverify is stub HTTP server for testing. |
homepage | |
repository | |
max_upload_size | |
id | 1461881 |
size | 141,712 |
serverify is stub HTTP server for testing.
You can define specification of endpoint by YAML and listen as HTTP server.
After listen, you can use serverify's REST API to...
Download executable from releases.
Usage: serverify [OPTIONS] <CONFIG_PATH>
Arguments:
<CONFIG_PATH>
Options:
--port <PORT> [default: 8080]
-h, --help Print help
$ serverify example.yaml
field | type | requied | description |
---|---|---|---|
.paths |
map | :white_check_mark: | key is path of endpoint |
.paths[] |
map | :white_check_mark: | key is HTTP method name such as get |
.paths[].response |
map | :white_check_mark: | response infomation for stub endpoint |
.paths[].status |
int | :white_check_mark: | status code of the response |
.paths[].headers |
map | headers of the response | |
.paths[].body |
string | body of the response |
E.g.
paths:
/hello:
get:
response:
status: 200
headers:
Content-Type: application/json
body: '{"message": "hello"}'