https://github.com/json-schema-faker/json-schema-server
CLI utility for serving JSON-Schema with faking support
https://github.com/json-schema-faker/json-schema-server
Last synced: 13 days ago
JSON representation
CLI utility for serving JSON-Schema with faking support
- Host: GitHub
- URL: https://github.com/json-schema-faker/json-schema-server
- Owner: json-schema-faker
- Created: 2015-08-28T19:58:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T02:26:01.000Z (almost 3 years ago)
- Last Synced: 2025-04-27T00:03:48.385Z (9 months ago)
- Language: JavaScript
- Homepage: http://json-schema-faker.js.org/
- Size: 750 KB
- Stars: 31
- Watchers: 5
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-list - json-schema-server - Schema with faking support | json-schema-faker | 31 | (JavaScript)
README
# JSON-Schema Server
[](https://github.com/json-schema-faker/json-schema-server/actions)
[](http://badge.fury.io/js/json-schema-server)
[](https://codecov.io/gh/json-schema-faker/json-schema-server)
[](https://david-dm.org/json-schema-faker/json-schema-server)
[](https://david-dm.org/json-schema-faker/json-schema-server#info=devDependencies)
Install `json-schema-server` globally:
```bash
$ npm install -g json-schema-server
```
Then starts a server for your JSON-Schema files:
```bash
$ json-schema-server [dir] -p 5000
```
Now you can make requests through the created server:
```bash
$ http http://localhost:5000/path/to/schema
```
The better if you're using [httpie](https://github.com/jakubroztocil/httpie). :beers:
## Options
- `--fakeroot` → BaseURI for references that will fake (default: `http://json-schema.org`).
- `--formats` → CommonJS module-id or path for custom formats.
- `--silent` → Turns off the reporting through the STDOUT.
- `--port` → Custom port for the server (default: `3000`).
If no `dir` is provided `process.cwd()` will be used instead.
Run `json-schema-server -h` to display all usage info
> Try [fake-schema-cli](https://github.com/atomsfat/fake-schema-cli) if you want single-shot calls.