gstroup / apimocker

node.js module to run a simple http server for mock service responses.
MIT License
280 stars 81 forks source link

Add support for flexible 'templateSwitch' request/response substitution #50

Closed ferrerod closed 8 years ago

ferrerod commented 8 years ago

borrowing heavily from the 'switch' code, and the template concept I've enhanced this to support GET and POST support including POST BODY parameter matching with JSONPath.

gstroup commented 8 years ago

Thanks for the PR. Looks like a pretty big addition. I'll take a look. Also, please ensure that all the tests are passing, and add a few tests for your new feature. Thanks!

ferrerod commented 8 years ago

I'll have a look at failing tests. Thanks

ferrerod commented 8 years ago

fixed tests and synced with master

ferrerod commented 8 years ago

Hi gstroup: let me know if you would like more information on my PR. Adds support for templating including POST body content.

gstroup commented 8 years ago

Sorry, I haven't had much time to maintain this project lately. Your PR looks good. Only thing is that there are no tests. Could you possibly add a few basic tests?? Then I will merge it in. Let me know if you have questions. Thanks again!

ferrerod commented 8 years ago

👍 tests added. Let me know if this looks adequate. Thanks.

gstroup commented 8 years ago

Great! Thanks for adding some tests. This makes me feel better. And you fixed a bug too! 👍 I will merge and push a new version to npm.