1.1.0 • Published 1 year ago

@exxeta/openapi-cop-mock-server v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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