openapi-cop-mock-server 1.0.0
Install from the command line:
Learn more about npm packages
$ npm install @exxeta/openapi-cop-mock-server@1.0.0
Install via package.json:
"@exxeta/openapi-cop-mock-server": "1.0.0"
About this version
Mock server that based on openapi-backend express-ts-mock example. It mocks responses using the examples defined in the OpenAPI document.
npm install
# Quickly start the mock given a OpenAPI document
npm run dev-start -- "../test/schemas/v3/3-parameters.yaml"
Try the endpoints:
curl -i http://localhost:8889/pets
curl -i http://localhost:8889/pets/1
curl -i -X POST -d {} http://localhost:8889/pets
curl -i -X POST -d '{"data": "sent"}' -H "Content-Type:application/json" http://localhost:8889/pets