# ramlmock

> A HTTP server that produces mock/example data specified by a RAML document.

Latest version **1.0.2** (published 2015-03-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install ramlmock
pnpm add ramlmock
yarn add ramlmock
bun add ramlmock
```

Provides the command `ramlmock`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-03-12 |
| First published | 2015-03-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tharsan Bhuvanendran |
| Maintainers | thizzle |

## Links

- npm: https://www.npmjs.com/package/ramlmock
- Repository: git@github.com:thizzle/ramlmock
- Homepage: https://github.com/thizzle/ramlmock
- Issues: https://github.com/thizzle/ramlmock/issues
- npm.io page: https://npm.io/package/ramlmock

## Dependencies (4)

- [morgan](https://npm.io/package/morgan.md) ^1.5.1
- [express](https://npm.io/package/express.md) ^4.12.2
- [minimist](https://npm.io/package/minimist.md) ^1.1.1
- [raml-parser](https://npm.io/package/raml-parser.md) ^0.8.10

## Recent versions

- 1.0.2 (latest) — 2015-03-12
- 1.0.1 — 2015-03-11
- 1.0.0 — 2015-03-11

## README

# ramlmock

A HTTP server that produces mock/example data specified by a RAML document.

Install ramlmock into the system `$ npm i -g ramlmock`, and then run `$ ramlmock` to see usage instructions.

The program accepts a single argument: the path to a RAML document. It passes this filename into [raml-parser](https://www.npmjs.com/package/raml-parser) to generate an AST of the API resources.

While iterating through each API resource identified in the RAML document, it will create [Express](http://expressjs.com/) routes, and start-up a HTTP web server that will respond to any routes described by the RAML specification, with the example representations specified by the RAML specification.

Optionally, each HTTP request may specify the `X-Mock-Result` header to indicate which response code is desired as the response. If the status code specified in this header is not specified by the RAML document, the server will return a 400 error with a plain-text message.

---
_Source: https://npm.io/package/ramlmock · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
