Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

open-api-mocker

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

open-api-mocker

A mock server based in Open API Specification

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9K
decreased by-2.35%
Maintainers
1
Weekly downloads
 
Created
Source

Open API Mocker

Build Status Coverage Status

An API mocker based in the Open API 3.0 specification.

Installation

Using npm

npm i -g open-api-mocker

Using docker

docker run -v "$PWD/myschema.json:/app/schema.json" -p "5000:5000" jormaechea/open-api-mocker

Or to run an specific version

docker run -v "$PWD/myschema.json:/app/schema.json" -p "5000:5000" jormaechea/open-api-mocker:X.Y.Z`

You can set any parameter when running inside a docker container

docker run -v "$PWD/myschema.json:/app/schema.json" -p "3000:3000" jormaechea/open-api-mocker:X.Y.Z -s /app/schema.json -p 3000`

Usage

Just run open-api-mocker --help in your console, and every available setting will be prompted.

Capabilities

  • Read yaml and json open api v3 schemas.
  • Port binding selection
  • Request parameters validation
  • Request body validation
  • Response body and headers generation based on examples or schemas
  • Response selection based using Prefer: statusCode=XXX request header.
  • Request and response logging
  • Servers basepath support
  • API Authentication

Tests

Simply run npm t

Contributing

Issues and PRs are welcome.

Keywords

FAQs

Package last updated on 30 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc