An open API service indexing awesome lists of open source software.

https://github.com/xav-b/mockingbird

Realistic and Pareto-ish API mocker
https://github.com/xav-b/mockingbird

api cli mock nodejs tool

Last synced: about 2 months ago
JSON representation

Realistic and Pareto-ish API mocker

Awesome Lists containing this project

README

          













Mockingbird



Mockingbird











Fake it until you make it - Docs.









---

[![Build Status](https://travis-ci.org/xav-b/mockingbird.svg?branch=master)](https://travis-ci.org/xav-b/mockingbird)
[![codecov](https://codecov.io/gh/xav-b/mockingbird/branch/master/graph/badge.svg)](https://codecov.io/gh/xav-b/mockingbird)




## ✨ Highlight

✔️ Declarative API description

✔️ Endpoints as code to fit all use cases

✔️ Generate data - on the fly or beforehand for more control

✔️ Easily switch scenarios to simulate different use cases

✔️ Support swagger to easily share and interact with the API contract

✔️ Emulate complex scenarios:

- request delays
- [todo] authentication

## In a Nutshell

```sh
# all you need is 5min - let's get started
npm install -g @hackliff/mockingbird

mkdir -p nasa/scenarios && cd nasa
```

**Write a scenario**

```
// in ./scenarios/build.js

const success = (req, res) => res.status(204).json({ request_id: Math.random() })

module.exports = { success }
```

**Write some config**

```yaml
title: 'NASA'
storage: 'json'

scenarios:
- name: healthcheck

endpoints:
- description: 'build spaceship'
method: POST
module: ./scenarios/build
uri: /v2/spaceships
scenario: async success
latency: 4000
```

**Serve a full-featured API**: `mockingbird serve --port 4000`

**Profit**: `curl -X POST -d '{ "engine": "nuclear" }' localhost:4000/v2/spaceships`

## Installation

## Usage

### Configuration

### Scenarios

---

## Workflow

### 🚀 Release

We follow a few industry standards.

- Git flow
- Semantic release
- Release notes are only generated for major releases.

### Local issue tracker

_To be progressively migrated to github issues as we release it open
source_

The project manages todos using
[taskbook](https://github.com/klaussinani/taskbook). After installing
dependencies, source `.env` to update its configuration and use the
local database.

Then use it as indicated on the github readme: `npx tb -i`.

---

profile

### 💖 Shameless plug

> Hey nice to meet you, I'm [Xavier](www.xav-b.fr) and I maintain this project.

Buy Me A Coffee
   subscribe










Mockingbird - API mocker

Built by
Xavier Bruhiere and

contributors


with a 💻 and some 🍣






TIC logo