Created
May 15, 2021 23:49
-
-
Save mertyildiran/4a7c237bad7070ec277efc8b6af8f21b to your computer and use it in GitHub Desktop.
Mockintosh: mocks for microservice environments - Part 1: Configuration Syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
- port: 8081 | |
endpoints: | |
- path: "/example" | |
response: "hello world" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
- port: 8081 | |
endpoints: | |
- path: "/example" | |
response: | |
headers: | |
Content-Type: "application/json" | |
body: '{"message": "hello world"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
- port: 8081 | |
endpoints: | |
- path: "/example" | |
response: | |
status: 403 | |
headers: | |
Content-Type: "application/json" | |
body: '{"message": "hello world"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
- port: 8081 | |
endpoints: | |
- path: "/reset" | |
response: | |
status: "RST" | |
- path: "/close" | |
response: | |
status: "FIN" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
- port: 8081 | |
endpoints: | |
- path: "/example" | |
status: 403 | |
response: | |
headers: | |
Content-Type: "application/json" | |
body: '{"message": "hello world"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
- port: 8081 | |
endpoints: | |
- path: "/example/{{ id }}" | |
response: "id is {{ id }} and a random integer: {{ random.int 1 100 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
templatingEngine: Jinja2 | |
services: | |
- port: 8081 | |
endpoints: | |
- path: "/example/{{ id }}" | |
response: "id is {{ id }} and a random integer: {{ random.int(1, 100) }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
templatingEngine: Jinja2 | |
services: | |
- port: 8081 | |
endpoints: | |
- path: "/example/{{ id }}" | |
response: "id is {{ id }} and a random integer: {{ random.int 1 100 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
globals: | |
headers: | |
Content-Type: "application/json" | |
services: | |
- port: 8081 | |
endpoints: | |
- path: "/example" | |
response: | |
status: 200 | |
body: '{"message": "hello world"}' | |
- port: 8082 | |
endpoints: | |
- path: "/example2" | |
response: | |
status: 202 | |
body: '{"message": "hello universe"}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment