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.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

OpenAPI Mocker

Build Status Coverage Status

An API mocker based in the OpenAPI 3.0 specification.

Installation and usage

Using npm

npm i -g open-api-mocker

open-api-mocker -s my-schema.json -w

open-api-mocker --help # To prompt every available setting.

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`

Capabilities

  • Read yaml and json OpenAPI 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 27 Mar 2020

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