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

Enable using a Wiremock Standalone-like directory structure #104

Open
shirblc opened this issue Jul 9, 2024 · 0 comments
Open

Enable using a Wiremock Standalone-like directory structure #104

shirblc opened this issue Jul 9, 2024 · 0 comments

Comments

@shirblc
Copy link

shirblc commented Jul 9, 2024

Proposal

Hi! Thank you for developing Wiremock and the Python SDK - Wiremock has been an absolute game changer!

The project I'm working on is a Python project that utilises Wiremock Standalone to handle some APIs outside the scope of the project. Right now, the project uses a separate Docker image to run Wiremock, which works but isn't particularly convenient, especially when it comes to contacting the Wiremock admin routes. That said, it does at least allow us to keep all the test data in JSON files, which are contained in a separate directory from the tests.

I've been looking into migrating to the Python SDK, but as far as I can see, there's no way to provide python-wiremock with a directory of JSON mappings to use. The closest thing I could find was the WireMockContainer's with_file method, but it seems to require reading each of the files in. Seeing as the container class copies everything into the container as JSON anyway, it seems like a long and unnecessary process to read all the files in only to have them outputted back to JSON again.

Having the ability to provide the Wiremock container a path to all the stubs would make migrations between the Standalone version and the Python version considerably smoother and easier to perform. Plus, it would make it considerably easier to share stubs with teams using a different language or the standalone version as JSON is used across the board by virtually all languages.

Would be happy to create a PR to sort that if you think it's a good idea 🙂

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant