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

Feature request: load multiple data files #69

Open
gurobokum opened this issue Aug 11, 2017 · 5 comments
Open

Feature request: load multiple data files #69

gurobokum opened this issue Aug 11, 2017 · 5 comments

Comments

@gurobokum
Copy link

  • Point multiple files from cli
    stubby -d stubs/file1.yml,stubs/file2.yml
  • Use glob
    stubby -d stubs/*.yml
    stubby -d stubs/**/*.yml
@mrak
Copy link
Owner

mrak commented Aug 14, 2017

You can do this now on the CLI with cat:

stubby -d <(cat stubs/*.yml)

With fish:

stubby -d (cat stubs/*.yml | psub)

See #29

@mrak mrak closed this as completed Aug 14, 2017
@gurobokum
Copy link
Author

gurobokum commented Aug 31, 2017

There is one disadvantage that I noticed to work with bash process substitution - watch mode, stubby watches fd and adding new stubs requires restart stubby manually
@mrak

@mrak mrak reopened this Sep 1, 2017
@gurobokum
Copy link
Author

Also there is the problem with loading files as response

request:
  url: /my/url
response:
  file: my_file

so if file loads as -d path_to_file.yml then everything works
but if loads with bash process substitution response_file is not return

@atwright147
Copy link

An alternative would be to implement !include. Similar to this: https://home-assistant.io/docs/configuration/splitting_configuration/

@PhilipeGatis
Copy link

PhilipeGatis commented Sep 27, 2021

you can use merge-yaml and run this command" merge-yaml -i endpoints/*.yaml -o endpoints.yaml && stubby -d endpoints.yaml

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

4 participants