@exxeta/openapi-cop-mock-server
v1.1.0
Published
Mock server used to test openapi-cop proxy server.
Downloads
24
Readme
OpenAPI Mock Server
Mock server that based on openapi-backend express-ts-mock example. It mocks responses using the examples defined in the OpenAPI document.
QuickStart
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