Open marcingrzejszczak opened 5 years ago
As per our (@marcingrzejszczak and I) discussion yesterday:
Tim: I’d suggest to start with a custom matcher based on SPeL, and make a separate one for groovy? Like you said, it has a lot of security implications. Marcin: I wonder if Spel is actually good enough to do the slurping etc. cause the body would need to be converted to a map or sth for spel to work. otoh we already parse groovy scripts that can contain all sort of crap. Tim: That’s also true 😂 But passing the slurped body to both custom matchers should make your life easier I guess. Marcin: I think that it could be a map - then Spel would work Tim: Let me add these comments to github later today, so others can see our new thoughts :)
With
RequestMatcherExtension
we could consider allowing giving the users the option to pass in their own, custom matching options. Sth like this:the WireMock stub could look like this:
then in the DSL one could call:
To consider: