-
Hi there, I have a question regarding the mock templates. Is there a way to add a fallback mock if the context expression returns a null / blank value? e.g. for mocking a POST response we use the {
"id": "af64322f-8726-4252-af37-c1bd5d3db41d",
"trip_id": "4d67459c-af07-40bb-bb12-178dbb88e09f",
"passenger_name": "john",
"has_bicycle": ,
"has_dog": ,
"links": {
"self": "https://api.example.com/bookings/af64322f-8726-4252-af37-c1bd5d3db41d"
}
} Notice the empty values in front of My question is thus: is there a way to write a “fallback” expression something like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @paulRbr Thanks for raising the discussion - that's a fair point and we don't have any fallback for null/blank values as of today. That would be an interesting enhancement! Would you mind creating an issue in https://github.com/microcks/microcks/issues to track this one? |
Beta Was this translation helpful? Give feedback.
Hi @paulRbr
Thanks for raising the discussion - that's a fair point and we don't have any fallback for null/blank values as of today. That would be an interesting enhancement! Would you mind creating an issue in https://github.com/microcks/microcks/issues to track this one?