-
Notifications
You must be signed in to change notification settings - Fork 280
Request stash in hooks: Using data from previous responses #108
Comments
This is a great idea--thanks! |
Request stash is a great idea. But I do not think it could fix the issue in #96. |
@rickke Why do you think it's not a usable workaround? |
@netmilk For my understanding, stashing response use after event to get server response from one transaction and modify the request info in another transaction use before event. Is it right? The id mentioned in #96 is from server side and nothing to do with client request. So there is no way to fix it with stashng response. Am I wrong? Thanks |
@rickke You can modify both, the request and the expectation as well in the before hook. But you are right that in blueprint example form #96 there is no previous request, where expected id of the entity can be retrieved from the server for later modification of the expected response. (for example in when creating entity in the collection). So this does not solves #96. Thanks for noticing that! |
Sorry for my confusion but was this ever fixed? |
@pocketmax Do you mean this issue or #96? |
ug, sorry, yeah I mean #96 |
Update fury-adapter-swagger to 0.14
I’d like to present concept of stashing responses. It’s support for full entity life-cycle without use of fixtures accessing directly the database. You can transform a request in hooks with data from some previous response before its execution.
This solves situation where you create an entity, server returns unique ID and you want use this ID as a URI parameter in next action to retrieve the entity.
I've created an example application in CI and a proposal for API in hooks.
The text was updated successfully, but these errors were encountered: