Skip to content

v0.2.1

Compare
Choose a tag to compare
@ptrthomas ptrthomas released this 27 Feb 14:52
· 4577 commits to master since this release

The main enhancement is the ability to refer to the root doc via $ in validation expressions and enable insane things like this:

Given def temperature = { celsius: 100, fahrenheit: 212 }
Then match temperature contains { fahrenheit: '#? _ == $.celsius * 1.8 + 32' }

Given def json =
"""
{
  "hotels": [
    { "roomInformation": [{ "roomPrice": 618.4 }], "totalPrice": 618.4  },
    { "roomInformation": [{ "roomPrice": 679.79}], "totalPrice": 679.79 }
  ]
}
"""
Then match each json.hotels contains { totalPrice: '#? _ == $.roomInformation[0].roomPrice' }