Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference a file as the response body instead of inline JSON #59

Open
harrymt opened this issue Aug 5, 2019 · 0 comments
Open

Reference a file as the response body instead of inline JSON #59

harrymt opened this issue Aug 5, 2019 · 0 comments

Comments

@harrymt
Copy link

harrymt commented Aug 5, 2019

We want to return large data sets in our application and have trouble editing the inline JSON inside of the YAML config file.

Can mockingjay-server include an optional reference to a separate JSON file in an endpoint that means we can edit the JSON in a JSON formatted file, instead of editing inline JSON in a YAML file.

e.g. the config could look like this

- name: My endpoint
  request:
    uri: /api/count
    method: POST
    headers:
      content-type: application/json
    body: '{
      "data": [],
    }'
  response:
    code: 200
    # Replace the `body` property with a reference to a JSON file
    bodyAsFile: './my-endpoint-response.json'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant