dummy

When our Golang developer, Alexander Melentyev, was working on one of our client’s projects, he had to work on integrations with the partner's API. During the integration, we didn’t want to pull the real API, so there was a need use mock data to test API. The partner had an openAPI specification, on the basis of which it was possible to generate a server using swagger-codegen, but such tools have a nuance—they generate stubs, meaning that if you follow the "handle" from the specification, you will get an empty response, and you will need to write it yourself. Usually, this is time-consuming, and in this case, we didn’t have the necessary time. So the idea came up to launch a server based on the specification, which would give examples described in the specification when going through the "handle".

Run mock server based off an API contract with one command

Dummy is created & supported by Evrone

Features

  • Supports OpenAPI 3.x

Installation

go install github.com/neotoolkit/dummy/cmd/[email protected]

Usage

Dummy can help you run mock server based off an API contract, which helps people see how your API will work before you even have it built. Run it locally with the dummy s command to run your API on a HTTP server you can interact with.

dummy s openapi.yml
dummy s https://raw.githubusercontent.com/neotoolkit/dummy/main/examples/docker/openapi.yml

More usage examples

Documentation

See these docs.

License

MIT License

GitHub

https://github.com/neotoolkit/dummy