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

Add the ability to edit a stub in an existing imposter #9

Closed
4385708alex91 opened this issue Jul 17, 2024 · 4 comments
Closed

Add the ability to edit a stub in an existing imposter #9

4385708alex91 opened this issue Jul 17, 2024 · 4 comments

Comments

@4385708alex91
Copy link

https://www.mbtest.org/docs/api/overview#add-stub
POST /imposters/:port/stubs

https://www.mbtest.org/docs/api/overview#change-stub
PUT /imposters/:port/stubs/:stubIndex

https://www.mbtest.org/docs/api/overview#delete-stub
DELETE /imposters/:port/stubs/:stubIndex

@demyan112rv
Copy link
Owner

@4385708alex91 please use the last tag https://github.com/demyan112rv/mountebank-api-php/releases/tag/1.9.0

I have no way to test this code now. If you find any problem, feel free to let me know.

@4385708alex91
Copy link
Author

@demyan112rv Unfortunately there is a bug in the getStubsUrl method; you need to use the imposter port instead of the Mountebank port.
Now a line like http://sl-autotests-01:2525/imposters/2525/stubs is being generated and it should be http://sl-autotests-01:2525/imposters/$imposter->getPort()/stubs

@demyan112rv demyan112rv reopened this Jul 18, 2024
@demyan112rv
Copy link
Owner

@4385708alex91 thanks for test. Fixed. I made the stub methods more flexible with the ability to pass a port.
Please try to use tag https://github.com/demyan112rv/mountebank-api-php/releases/tag/1.10.1

@4385708alex91
Copy link
Author

I checked, everything works fine. Many thanks for the help

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

2 participants