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