Categorygithub.com/markamdev/ramock
repository
0.0.0-20250114201850-773eb4e22fb6
Repository: https://github.com/markamdev/ramock.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

ramock

REST API mock service

Simple application for temporary mocking of REST API service that is either not available or not implemented yet.

ramock listens for API calls on selected port and returns pre-defined (via config file) http status codes and response body (if given).

If RAMOCK_STRICT_PATHS variable is set to false (or just not set at all) then ramock accepts calls on any endpoint returning HTTP OK (200). For HTTP methods that expects to return body in response (i.e. GET) content of request body is returned.

ramock always provide at least /health endpoint that accepts GET method and returns HTTP OK. If for some reason another response from /health is needed (i.e. to test orchestrator behavior) then endpoint has to be overwritten in config file.

Environment variables

Variable nameRequired (Y/N)Default valueDescription
RAMOCK_LISTEN_PORTYApplication listening port
RAMOCK_STRICT_PATHSNfalseAccept only calls to defined endpoints

API configuration file format

...