mrak/stubby4net — pull request #4 by gregkowalski (2014-08-08 00:10:00+00:00)
Title: [gk] - adding endpoint invocation tracking and querying admin resource

Hi Eric,

First off, just want to thank you for creating stub.by - it's a great tool and it has been proving itself very useful at our company. We have many teams working on applications that integrate with other teams' apps using RESTful services so you can imagine how much value your tool has added, especially in our dev and testing automation environments.

There is a feature that we would find useful, which I wasn't able to find in the existing stubby implementation. This feature is the ability to validate data that gets sent to stubby, and the ability to track (and query) all invocations that were performed against stubby.

This pull request implements that feature, and we basically keep a track of an Invocation object every time a stub is invoked. You can have a look at the Invocation class below but it's very similar to the Endpoint class. These invocations are then kept in memory, in a dictionary of dictionaries of lists (just for the purposes of indexing and performance) and can be queried through the admin interface at the /invocations/ path.

We have an internal NuGet server where I will share this code with the rest of our organization but I thought you may be interested in having a look at this as well. Let me know what you think, if you'd be interested in including these changes in your project, and if so, if there's more work you'd expect before you accept the pull request and add this feature to NuGet.

Either way, thank you once again, you're making lives easier, at least at our company :)

Greg