Conversation
tommysitu
left a comment
There was a problem hiding this comment.
Could you explain what the use case would be please? Templating function is not supposed for mutating hoverfly data, their main purpose is to generate dynamic response data.
|
Hi Tommy, the main reason to extend the csv capability from read only to read/write is that it gives a much simpler and more natural mechanism to simulate structured data persistence between calls than having to use journal indexing which can be confusing for complex processes. |
|
It is quite unconventional to do so. We can make another api call to add or delete the data instead of displaying it using template function. |
|
I agree it's unconventional, but not necessarily a bad idea. I'm struggling to see how using just api calls we can implement a sandbox environment that needs to simulate a mutable persistent back-end that supports CRUD operations on known data structures. |
|
Can't we write middleware to update CSV and it shows that data instead of templating function. Can you help us understand your use case? |
tommysitu
left a comment
There was a problem hiding this comment.
A small extension for csv templating functions only, with no other functional changes. It offers a simple way to manipulate CSV data sources in the templated response, worth considering for some CSV data source users.
Added 3 templating functions to manipulate csv content.
Docs are also updated