Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azagniotov/39c9367ed2cbc85a35f2e8d6cd46a586 to your computer and use it in GitHub Desktop.
Save azagniotov/39c9367ed2cbc85a35f2e8d6cd46a586 to your computer and use it in GitHub Desktop.
include-reservation-service-stubs.yaml
- request:
method: GET
url: /api/v1/reservations/1
# When sequenced responses is configured, on each incoming request to the same URI,
# a subsequent response in the list will be sent to the client. The sequenced
# responses play in a cycle (loop). In other words: after the response sequence plays
# through, the cycle restarts on the next incoming request
#
# https://github.com/azagniotov/stubby4j#response-object-properties
response:
- status: 200
headers:
content-type: application/json
file: json/reservation.service.expected.success.response.json
- status: 400
headers:
content-type: application/json
file: json/reservation.service.expected.failure.response.json
- status: 403
headers:
content-type: application/json
file: json/reservation.service.unexpected.failure.response.json
- status: 500
headers:
content-type: application/json
body: >
{"code": 500, "message": "Internal Server Error"}
- status: 200
# HttpUtils creates ApacheHttpTransport with read timeout of 1000 milliseconds
latency: 1500
headers:
content-type: application/json
file: json/reservation.service.expected.success.response.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment