Config Schema

Monster Mock provides a nice UI interface to configure all your mocks, but you always can define them as a code.

Mocks schema

This is the current mock config schema:

{
	"description": "Some text that describes the intended usage of the current configuration",
	"request": {
		"host": "example.com",
		"method": "GET|POST|PUT|PATCH|...",
		"path": "/your/path/:variable",
		"queryStringParameters": {
			"name": ["value"],
			"name": ["value", "value"]
		},
		"headers": {
			"name": ["value"]
		},
		"cookies": {
			"name": "value"
		},
		"body": "Expected Body"
	},
	"response": {
		"statusCode": "int (2xx,4xx,5xx,xxx)",
		"headers": {
			"name": ["value"]
		},
		"cookies": {
			"name": "value"
		},
		"body": "Response body"
	},
	"control": {
		"scenario": {
			"name": "string (scenario name)",
			"requiredState": [
				"not_started (default state)",
				"another_state_name"
			],
			"newState": "new_stat_neme"
		},
		"proxyBaseURL": "string (original URL endpoint)",
		"delay": "int (response delay in seconds)",
		"crazy": "bool (return random 5xx)",
		"priority": "int (matching priority)",
		"webHookURL" : "string (URL endpoint)"
	}
}