You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
'swith_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
The text was updated successfully, but these errors were encountered: