Giter Site home page Giter Site logo

sngular / api-mock-runner Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 431 KB

Create mocks servers with its schemas from OpenAPI 3.0.0 spec files

Home Page: https://www.npmjs.com/package/@sngular/api-mock-runner

License: Mozilla Public License 2.0

JavaScript 99.71% Shell 0.29%
api microservices mock mock-server mocking openapi

api-mock-runner's Introduction

Welcome to api-mock-runner 👋

Run multiple mock servers from one or more OpenAPI Specification.

Schemas can be provided from a remote origin (https:// or git@) or a local path.

Remote and circular references are allowed.

📘 Usage

You can use api-mock-runner in a three different ways. All of them starts a CLI guided journey:

1. NPX (No installation needed)

npx @sngular/api-mock-runner

2. Globally

sudo npm install --global @sngular/api-mock-runner

To use: type api-mock-runner in the terminal.

3. Current project dev dependency

npm i --save-dev @sngular/api-mock-runner

Manual options

You could avoid CLI interaction by using api-mock-runner with flags. To explore manual options, use -h flag:

npx @sngular/api-mock-runner -h
Usage: api-mock-runner [options]

Options:
  -o, --origin <origin>          path or repo containing schemas
  -s, --schema [schemaPaths...]  path to schemas
  -p, --port [ports...]          port to serve each schema
  -r, --run-config               use saved config
  -h, --help                     display help for command

Response selection

The application will return the first response found in the schema by default. To use another existing response, use prefer header with the content statusCode=XXX in the request.

prefer: statusCode=500

Architectural Decision Record (ADR)

Here you can find architectural decisions records

❤️ Special thanks

We would like to express our special thanks to open-api-mocker, which is used to set up a mock server.

api-mock-runner's People

Contributors

javier-sierra-sngular avatar mhcyr avatar jorgecasar avatar adantoscano avatar semantic-release-bot avatar

Stargazers

 avatar  avatar Jaime Martínez Rincón avatar Saul Blanco Tejero avatar  avatar

Watchers

 avatar Jose E. Garcia Maciñeiras avatar

api-mock-runner's Issues

The automated release is failing 🚨

🚨 The automated release from the main branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/.

If you are using Two Factor Authentication for your account, set its level to "Authorization only" in your account settings. semantic-release cannot publish with the default "
Authorization and writes" level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Good luck with your project ✨

Your semantic-release bot 📦🚀

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.