| RandomInt |
min, max |
Generates a random integer value between min and max values |
{ "type": "RandomInt", "min": 0, "max": 2147483647 } |
| RandomDecimal |
digits |
Generates a random decimal value (BigDecimal) with the provided number of digits |
{ "type": "RandomDecimal", "digits": 6 } |
| RandomHexadecimal |
digits |
Generates a random hexadecimal value (String) with the provided number of digits |
{ "type": "RandomHexadecimal", "digits": 8 } |
| RandomString |
size |
Generates a random string value of the provided size characters |
{ "type": "RandomString", "size": 20 } |
| Regex |
regex |
Generates a random string value from the provided regular expression |
{ "type": "Regex", "regex": "\\d{1,8}" } |
| Uuid |
|
Generates a random UUID value (simple format) |
{ "type": "Uuid" } |
| Date |
format (Optional) |
Generates a Date value from the current date either in ISO format or using the provided format string |
{ "type": "Date", "format": "MM/dd/yyyy" } |
| Time |
format (Optional) |
Generates a Time value from the current time either in ISO format or using the provided format string |
{ "type": "Time", "format": "HH:mm" } |
| DateTime |
format (Optional) |
Generates a Date and Time (timestamp) value from the current date and time either in ISO format or using the provided format string |
{ "type": "DateTime", "format": "yyyy/MM/dd - HH:mm:ss.S" } |
| Boolean |
|
Generates a random boolean value |
{ "type": "RandomBoolean" } |
We would like to implement Pact V3 Specification support for Pact Ruby
Current status
Required V3 Features
Implementation notes
Validation
V3 Related Issues
provider_state(v3) #168V3 Generators
minandmaxvalues{ "type": "RandomInt", "min": 0, "max": 2147483647 }{ "type": "RandomDecimal", "digits": 6 }{ "type": "RandomHexadecimal", "digits": 8 }{ "type": "RandomString", "size": 20 }{ "type": "Regex", "regex": "\\d{1,8}" }{ "type": "Uuid" }{ "type": "Date", "format": "MM/dd/yyyy" }{ "type": "Time", "format": "HH:mm" }{ "type": "DateTime", "format": "yyyy/MM/dd - HH:mm:ss.S" }{ "type": "RandomBoolean" }V3 Matchers
{ "match": "include", "value": "substr" }{ "match": "integer" }{ "match": "decimal" }{ "match": "number" }{ "match": "datetime", "format": "yyyy-MM-dd HH:ss:mm" }{ "match": "time", "format": "HH:ss:mm" }{ "match": "date", "format": "yyyy-MM-dd" }{ "match": "null" }{ "match": "boolean" }trueandfalse){ "match": "contentType", "value": "image/jpeg" }{ "match": "values" }