public class PactDslJsonBody extends DslPart
closed, DATE_2000, generators, HEXADECIMAL, IP_ADDRESS, matchers, parent, rootName, rootPath, UUID_REGEX| Constructor and Description |
|---|
PactDslJsonBody()
Constructs a new body as a root
|
PactDslJsonBody(java.lang.String rootPath,
java.lang.String rootName,
DslPart parent)
Constructs a new body as a child
|
PactDslJsonBody(java.lang.String rootPath,
java.lang.String rootName,
DslPart parent,
PactDslJsonBody body)
Constructs a new body as a child as a copy of an existing one
|
| Modifier and Type | Method and Description |
|---|---|
PactDslJsonBody |
and(java.lang.String name,
java.lang.Object value,
au.com.dius.pact.core.model.matchingrules.MatchingRule... rules)
Combine all the matchers using AND
|
PactDslJsonArray |
array()
Element as an array
|
PactDslJsonArray |
array(java.lang.String name)
Attribute that is an array
|
PactDslJsonBody |
booleanType(java.lang.String... names)
Attributes that must be a boolean
|
PactDslJsonBody |
booleanType(java.lang.String name)
Attribute that must be a boolean
|
PactDslJsonBody |
booleanType(java.lang.String name,
java.lang.Boolean example)
Attribute that must be a boolean
|
PactDslJsonBody |
booleanValue(java.lang.String name,
java.lang.Boolean value)
Attribute that must be the specified boolean
|
DslPart |
close()
This closes off the object graph build from the DSL in case any close[Object|Array] methods have not been called.
|
DslPart |
closeArray()
Closes the current array
|
DslPart |
closeObject()
Closes the current JSON object
|
PactDslJsonBody |
date()
Attribute named 'date' that must be formatted as an ISO date
|
PactDslJsonBody |
date(java.lang.String name)
Attribute that must be formatted as an ISO date
|
PactDslJsonBody |
date(java.lang.String name,
java.lang.String format)
Attribute that must match the provided date format
|
PactDslJsonBody |
date(java.lang.String name,
java.lang.String format,
java.util.Date example)
Attribute that must match the provided date format
|
PactDslJsonBody |
date(java.lang.String name,
java.lang.String format,
java.util.Date example,
java.util.TimeZone timeZone)
Attribute that must match the provided date format
|
PactDslJsonBody |
dateExpression(java.lang.String name,
java.lang.String expression)
Adds a date attribute formatted as an ISO date with the value generated by the date expression
|
PactDslJsonBody |
dateExpression(java.lang.String name,
java.lang.String expression,
java.lang.String format)
Adds a date attribute with the value generated by the date expression
|
PactDslJsonBody |
datetime(java.lang.String name)
Attribute that must be an ISO formatted datetime
|
PactDslJsonBody |
datetime(java.lang.String name,
java.lang.String format)
Attribute that must match the given datetime format
|
PactDslJsonBody |
datetime(java.lang.String name,
java.lang.String format,
java.util.Date example)
Attribute that must match the given datetime format
|
PactDslJsonBody |
datetime(java.lang.String name,
java.lang.String format,
java.util.Date example,
java.util.TimeZone timeZone)
Attribute that must match the given datetime format
|
PactDslJsonBody |
datetime(java.lang.String name,
java.lang.String format,
java.time.Instant example)
Attribute that must match the given datetime format
|
PactDslJsonBody |
datetime(java.lang.String name,
java.lang.String format,
java.time.Instant example,
java.util.TimeZone timeZone)
Attribute that must match the given datetime format
|
PactDslJsonBody |
datetimeExpression(java.lang.String name,
java.lang.String expression)
Adds a datetime attribute formatted as an ISO datetime with the value generated by the expression
|
PactDslJsonBody |
datetimeExpression(java.lang.String name,
java.lang.String expression,
java.lang.String format)
Adds a datetime attribute with the value generated by the expression
|
PactDslJsonBody |
decimalType(java.lang.String... names)
Attributes that must be a decimal values
|
PactDslJsonBody |
decimalType(java.lang.String name)
Attribute that must be a decimal value
|
PactDslJsonBody |
decimalType(java.lang.String name,
java.math.BigDecimal number)
Attribute that must be a decimalType value
|
PactDslJsonBody |
decimalType(java.lang.String name,
java.lang.Double number)
Attribute that must be a decimalType value
|
PactDslJsonArray |
eachArrayLike()
Array element where each element of the array is an array and must match the following object
|
PactDslJsonArray |
eachArrayLike(int numberExamples)
Array element where each element of the array is an array and must match the following object
|
PactDslJsonArray |
eachArrayLike(java.lang.String name)
Array field where each element is an array and must match the following object
|
PactDslJsonArray |
eachArrayLike(java.lang.String name,
int numberExamples)
Array field where each element is an array and must match the following object
|
PactDslJsonArray |
eachArrayWithMaxLike(java.lang.Integer size)
Array element where each element of the array is an array and must match the following object
|
PactDslJsonArray |
eachArrayWithMaxLike(int numberExamples,
java.lang.Integer size)
Array element where each element of the array is an array and must match the following object
|
PactDslJsonArray |
eachArrayWithMaxLike(java.lang.String name,
java.lang.Integer size)
Array field where each element is an array and must match the following object
|
PactDslJsonArray |
eachArrayWithMaxLike(java.lang.String name,
int numberExamples,
java.lang.Integer size)
Array field where each element is an array and must match the following object
|
PactDslJsonArray |
eachArrayWithMinLike(java.lang.Integer size)
Array element where each element of the array is an array and must match the following object
|
PactDslJsonArray |
eachArrayWithMinLike(int numberExamples,
java.lang.Integer size)
Array element where each element of the array is an array and must match the following object
|
PactDslJsonArray |
eachArrayWithMinLike(java.lang.String name,
java.lang.Integer size)
Array field where each element is an array and must match the following object
|
PactDslJsonArray |
eachArrayWithMinLike(java.lang.String name,
int numberExamples,
java.lang.Integer size)
Array field where each element is an array and must match the following object
|
PactDslJsonArray |
eachArrayWithMinMaxLike(java.lang.Integer minSize,
java.lang.Integer maxSize)
Array element where each element of the array is an array and must match the following object
|
PactDslJsonArray |
eachArrayWithMinMaxLike(int numberExamples,
java.lang.Integer minSize,
java.lang.Integer maxSize)
Array element where each element of the array is an array and must match the following object
|
PactDslJsonArray |
eachArrayWithMinMaxLike(java.lang.String name,
java.lang.Integer minSize,
java.lang.Integer maxSize)
Array field where each element is an array and must match the following object
|
PactDslJsonArray |
eachArrayWithMinMaxLike(java.lang.String name,
int numberExamples,
java.lang.Integer minSize,
java.lang.Integer maxSize)
Array field where each element is an array and must match the following object
|
PactDslJsonBody |
eachKeyLike(java.lang.String exampleKey)
Accepts any key, and each key is mapped to a map that must match the following object definition
Note: this needs the Java system property "pact.matching.wildcard" set to value "true" when the pact file is verified.
|
PactDslJsonBody |
eachKeyLike(java.lang.String exampleKey,
PactDslJsonRootValue value)
Accepts any key, and each key is mapped to a map that must match the provided object definition
Note: this needs the Java system property "pact.matching.wildcard" set to value "true" when the pact file is verified.
|
PactDslJsonBody |
eachKeyMappedToAnArrayLike(java.lang.String exampleKey)
Accepts any key, and each key is mapped to a list of items that must match the following object definition
Note: this needs the Java system property "pact.matching.wildcard" set to value "true" when the pact file is verified.
|
PactDslJsonBody |
eachLike()
Array element where each element of the array must match the following object
|
PactDslJsonArray |
eachLike(DslPart object)
Array element where each element of the array must match the provided object
|
PactDslJsonBody |
eachLike(int numberExamples)
Array element where each element of the array must match the following object
|
PactDslJsonBody |
eachLike(java.lang.String name)
Attribute that is an array where each item must match the following example
|
PactDslJsonBody |
eachLike(java.lang.String name,
DslPart object)
Array field where each element must match the following object
|
PactDslJsonBody |
eachLike(java.lang.String name,
int numberExamples)
Attribute that is an array where each item must match the following example
|
PactDslJsonBody |
eachLike(java.lang.String name,
PactDslJsonRootValue value)
Attribute that is an array of values that are not objects where each item must match the following example
|
PactDslJsonBody |
eachLike(java.lang.String name,
PactDslJsonRootValue value,
int numberExamples)
Attribute that is an array of values that are not objects where each item must match the following example
|
PactDslJsonBody |
equalTo(java.lang.String name,
java.lang.Object value)
Attribute that must be equal to the provided value.
|
java.lang.Object |
getBody() |
PactDslJsonBody |
hexValue(java.lang.String name)
Attribute that must be encoded as a hexadecimal value
|
PactDslJsonBody |
hexValue(java.lang.String name,
java.lang.String hexValue)
Attribute that must be encoded as a hexadecimal value
|
PactDslJsonBody |
id()
Attribute named 'id' that must be a numeric identifier
|
PactDslJsonBody |
id(java.lang.String name)
Attribute that must be a numeric identifier
|
PactDslJsonBody |
id(java.lang.String name,
java.lang.Long id)
Attribute that must be a numeric identifier
|
PactDslJsonBody |
includesStr(java.lang.String name,
java.lang.String value)
Attribute that must include the provided string value
|
PactDslJsonBody |
integerType(java.lang.String... names)
Attributes that must be an integer
|
PactDslJsonBody |
integerType(java.lang.String name)
Attribute that must be an integer
|
PactDslJsonBody |
integerType(java.lang.String name,
java.lang.Integer number)
Attribute that must be an integer
|
PactDslJsonBody |
integerType(java.lang.String name,
java.lang.Long number)
Attribute that must be an integer
|
PactDslJsonBody |
ipAddress(java.lang.String name)
Attribute that must be an IP4 address
|
PactDslJsonBody |
like(java.lang.String name,
java.lang.Object example)
Attribute that must be the same type as the example
|
PactDslJsonBody |
matchUrl(java.lang.String name,
java.lang.String basePath,
java.lang.Object... pathFragments)
Matches a URL that is composed of a base path and a sequence of path expressions
|
PactDslJsonBody |
maxArrayLike(java.lang.Integer size)
Array element with a maximum size and each element of the array must match the following object
|
PactDslJsonArray |
maxArrayLike(java.lang.Integer size,
DslPart object)
Array element with a maximum size and each element of the array must match the provided object
|
PactDslJsonBody |
maxArrayLike(java.lang.Integer size,
int numberExamples)
Array element with a maximum size and each element of the array must match the following object
|
PactDslJsonBody |
maxArrayLike(java.lang.String name,
java.lang.Integer size)
Attribute that is an array with a maximum size where each item must match the following example
|
PactDslJsonBody |
maxArrayLike(java.lang.String name,
java.lang.Integer size,
DslPart object)
Array field with a maximum size and each element must match the provided object
|
PactDslJsonBody |
maxArrayLike(java.lang.String name,
java.lang.Integer size,
int numberExamples)
Attribute that is an array with a maximum size where each item must match the following example
|
PactDslJsonBody |
maxArrayLike(java.lang.String name,
java.lang.Integer size,
PactDslJsonRootValue value)
Attribute that is an array of values with a maximum size that are not objects where each item must match the following example
|
PactDslJsonBody |
maxArrayLike(java.lang.String name,
java.lang.Integer size,
PactDslJsonRootValue value,
int numberExamples)
Attribute that is an array of values with a maximum size that are not objects where each item must match the following example
|
PactDslJsonBody |
minArrayLike(java.lang.Integer size)
Array element with a minumum size and each element of the array must match the following object
|
PactDslJsonArray |
minArrayLike(java.lang.Integer size,
DslPart object)
Array element with a minumum size and each element of the array must match the provided object
|
PactDslJsonBody |
minArrayLike(java.lang.Integer size,
int numberExamples)
Array element with a minumum size and each element of the array must match the following object
|
PactDslJsonBody |
minArrayLike(java.lang.String name,
java.lang.Integer size)
Attribute that is an array with a minimum size where each item must match the following example
|
PactDslJsonBody |
minArrayLike(java.lang.String name,
java.lang.Integer size,
DslPart object)
Array field with a minumum size and each element must match the provided object
|
PactDslJsonBody |
minArrayLike(java.lang.String name,
java.lang.Integer size,
int numberExamples)
Attribute that is an array with a minimum size where each item must match the following example
|
PactDslJsonBody |
minArrayLike(java.lang.String name,
java.lang.Integer size,
PactDslJsonRootValue value)
Attribute that is an array of values with a minimum size that are not objects where each item must match the following example
|
PactDslJsonBody |
minArrayLike(java.lang.String name,
java.lang.Integer size,
PactDslJsonRootValue value,
int numberExamples)
Attribute that is an array of values with a minimum size that are not objects where each item must match the following example
|
PactDslJsonBody |
minMaxArrayLike(java.lang.Integer minSize,
java.lang.Integer maxSize)
Array element with a minimum and maximum size and each element of the array must match the following object
|
PactDslJsonArray |
minMaxArrayLike(java.lang.Integer minSize,
java.lang.Integer maxSize,
DslPart object)
Array element with a minimum and maximum size and each element of the array must match the provided object
|
PactDslJsonBody |
minMaxArrayLike(java.lang.Integer minSize,
java.lang.Integer maxSize,
int numberExamples)
Array element with a minimum and maximum size and each element of the array must match the following object
|
PactDslJsonBody |
minMaxArrayLike(java.lang.String name,
java.lang.Integer minSize,
java.lang.Integer maxSize)
Array field with a minimum and maximum size and each element must match the following object
|
PactDslJsonBody |
minMaxArrayLike(java.lang.String name,
java.lang.Integer minSize,
java.lang.Integer maxSize,
DslPart object)
Array field with a minimum and maximum size and each element must match the provided object
|
PactDslJsonBody |
minMaxArrayLike(java.lang.String name,
java.lang.Integer minSize,
java.lang.Integer maxSize,
int numberExamples)
Array field with a minimum and maximum size and each element must match the following object
|
PactDslJsonBody |
minMaxArrayLike(java.lang.String name,
java.lang.Integer minSize,
java.lang.Integer maxSize,
PactDslJsonRootValue value,
int numberExamples)
Attribute that is an array of values with a minimum and maximum size that are not objects where each item must
match the following example
|
PactDslJsonBody |
nullValue(java.lang.String fieldName)
Sets the field to a null value
|
PactDslJsonBody |
numberType(java.lang.String... names)
Attributes that can be any number
|
PactDslJsonBody |
numberType(java.lang.String name)
Attribute that can be any number
|
PactDslJsonBody |
numberType(java.lang.String name,
java.lang.Number number)
Attribute that can be any number
|
PactDslJsonBody |
numberValue(java.lang.String name,
java.lang.Number value)
Attribute that must be the specified number
|
PactDslJsonBody |
object()
Object element
|
PactDslJsonBody |
object(java.lang.String name)
Attribute that is a JSON object
|
PactDslJsonBody |
object(java.lang.String name,
DslPart value)
Attribute that is a JSON object defined from a DSL part
|
PactDslJsonBody |
or(java.lang.String name,
java.lang.Object value,
au.com.dius.pact.core.model.matchingrules.MatchingRule... rules)
Combine all the matchers using OR
|
protected void |
putArray(DslPart object) |
protected void |
putObject(DslPart object) |
PactDslJsonBody |
stringMatcher(java.lang.String name,
java.lang.String regex)
Attribute that must match the regular expression
|
PactDslJsonBody |
stringMatcher(java.lang.String name,
java.lang.String regex,
java.lang.String value)
Attribute that must match the regular expression
|
PactDslJsonBody |
stringType(java.lang.String... names)
Attributes that can be any string
|
PactDslJsonBody |
stringType(java.lang.String name)
Attribute that can be any string
|
PactDslJsonBody |
stringType(java.lang.String name,
java.lang.String example)
Attribute that can be any string
|
PactDslJsonBody |
stringValue(java.lang.String name,
java.lang.String value)
Attribute that must be the specified value
|
PactDslJsonBody |
time()
Attribute named 'time' that must be an ISO formatted time
|
PactDslJsonBody |
time(java.lang.String name)
Attribute that must be an ISO formatted time
|
PactDslJsonBody |
time(java.lang.String name,
java.lang.String format)
Attribute that must match the given time format
|
PactDslJsonBody |
time(java.lang.String name,
java.lang.String format,
java.util.Date example)
Attribute that must match the given time format
|
PactDslJsonBody |
time(java.lang.String name,
java.lang.String format,
java.util.Date example,
java.util.TimeZone timeZone)
Attribute that must match the given time format
|
PactDslJsonBody |
timeExpression(java.lang.String name,
java.lang.String expression)
Adds a time attribute formatted as an ISO time with the value generated by the time expression
|
PactDslJsonBody |
timeExpression(java.lang.String name,
java.lang.String expression,
java.lang.String format)
Adds a time attribute with the value generated by the time expression
|
PactDslJsonBody |
timestamp()
Attribute named 'timestamp' that must be an ISO formatted timestamp
|
PactDslJsonBody |
timestamp(java.lang.String name)
Deprecated.
Use datetime instead
|
PactDslJsonBody |
timestamp(java.lang.String name,
java.lang.String format)
Deprecated.
use datetime instead
|
PactDslJsonBody |
timestamp(java.lang.String name,
java.lang.String format,
java.util.Date example)
Deprecated.
use datetime instead
|
PactDslJsonBody |
timestamp(java.lang.String name,
java.lang.String format,
java.util.Date example,
java.util.TimeZone timeZone)
Deprecated.
use datetime instead
|
PactDslJsonBody |
timestamp(java.lang.String name,
java.lang.String format,
java.time.Instant example)
Deprecated.
use datetime instead
|
PactDslJsonBody |
timestamp(java.lang.String name,
java.lang.String format,
java.time.Instant example,
java.util.TimeZone timeZone)
Deprecated.
use datetime instead
|
java.lang.String |
toString() |
PactDslJsonBody |
uuid(java.lang.String name)
Attribute that must be encoded as an UUID
|
PactDslJsonBody |
uuid(java.lang.String name,
java.lang.String uuid)
Attribute that must be encoded as an UUID
|
PactDslJsonBody |
uuid(java.lang.String name,
java.util.UUID uuid)
Attribute that must be encoded as an UUID
|
PactDslJsonBody |
valueFromProviderState(java.lang.String name,
java.lang.String expression,
java.lang.Object example)
Adds an attribute that will have it's value injected from the provider state
|
asArray, asBody, getGenerators, getMatchers, getParent, includesMatcher, matchDate, matchMax, matchMin, matchMinMax, matchTime, matchTimestamp, regexp, setGenerators, setMatcherspublic PactDslJsonBody()
public PactDslJsonBody(java.lang.String rootPath,
java.lang.String rootName,
DslPart parent)
rootPath - Path to prefix to this childrootName - Name to associate this object as in the parentparent - Parent to attach topublic PactDslJsonBody(java.lang.String rootPath,
java.lang.String rootName,
DslPart parent,
PactDslJsonBody body)
rootPath - Path to prefix to this childrootName - Name to associate this object as in the parentparent - Parent to attach tobody - Body to copy values frompublic java.lang.String toString()
toString in class java.lang.Objectpublic PactDslJsonBody stringValue(java.lang.String name, java.lang.String value)
name - attribute namevalue - string valuepublic PactDslJsonBody numberValue(java.lang.String name, java.lang.Number value)
name - attribute namevalue - number valuepublic PactDslJsonBody booleanValue(java.lang.String name, java.lang.Boolean value)
name - attribute namevalue - boolean valuepublic PactDslJsonBody like(java.lang.String name, java.lang.Object example)
name - attribute namepublic PactDslJsonBody stringType(java.lang.String name)
name - attribute namepublic PactDslJsonBody stringType(java.lang.String... names)
names - attribute namespublic PactDslJsonBody stringType(java.lang.String name, java.lang.String example)
name - attribute nameexample - example value to use for generated bodiespublic PactDslJsonBody numberType(java.lang.String name)
name - attribute namepublic PactDslJsonBody numberType(java.lang.String... names)
names - attribute namespublic PactDslJsonBody numberType(java.lang.String name, java.lang.Number number)
name - attribute namenumber - example number to use for generated bodiespublic PactDslJsonBody integerType(java.lang.String name)
name - attribute namepublic PactDslJsonBody integerType(java.lang.String... names)
names - attribute namespublic PactDslJsonBody integerType(java.lang.String name, java.lang.Long number)
name - attribute namenumber - example integer value to use for generated bodiespublic PactDslJsonBody integerType(java.lang.String name, java.lang.Integer number)
name - attribute namenumber - example integer value to use for generated bodiespublic PactDslJsonBody decimalType(java.lang.String name)
name - attribute namepublic PactDslJsonBody decimalType(java.lang.String... names)
names - attribute namespublic PactDslJsonBody decimalType(java.lang.String name, java.math.BigDecimal number)
name - attribute namenumber - example decimalType valuepublic PactDslJsonBody decimalType(java.lang.String name, java.lang.Double number)
name - attribute namenumber - example decimalType valuepublic PactDslJsonBody booleanType(java.lang.String name)
name - attribute namepublic PactDslJsonBody booleanType(java.lang.String... names)
names - attribute namespublic PactDslJsonBody booleanType(java.lang.String name, java.lang.Boolean example)
name - attribute nameexample - example boolean to use for generated bodiespublic PactDslJsonBody stringMatcher(java.lang.String name, java.lang.String regex, java.lang.String value)
name - attribute nameregex - regular expressionvalue - example value to use for generated bodiespublic PactDslJsonBody stringMatcher(java.lang.String name, java.lang.String regex)
name - attribute nameregex - regular expressionpublic PactDslJsonBody timestamp()
@Deprecated public PactDslJsonBody timestamp(java.lang.String name)
name - @Deprecated public PactDslJsonBody timestamp(java.lang.String name, java.lang.String format)
name - attribute nameformat - timestamp format@Deprecated public PactDslJsonBody timestamp(java.lang.String name, java.lang.String format, java.util.Date example)
name - attribute nameformat - timestamp formatexample - example date and time to use for generated bodies@Deprecated public PactDslJsonBody timestamp(java.lang.String name, java.lang.String format, java.util.Date example, java.util.TimeZone timeZone)
name - attribute nameformat - timestamp formatexample - example date and time to use for generated bodiestimeZone - time zone used for formatting of example date and time@Deprecated public PactDslJsonBody timestamp(java.lang.String name, java.lang.String format, java.time.Instant example)
name - attribute nameformat - timestamp formatexample - example date and time to use for generated bodies@Deprecated public PactDslJsonBody timestamp(java.lang.String name, java.lang.String format, java.time.Instant example, java.util.TimeZone timeZone)
name - attribute nameformat - timestamp formatexample - example date and time to use for generated bodiestimeZone - time zone used for formatting of example date and timepublic PactDslJsonBody datetime(java.lang.String name)
name - public PactDslJsonBody datetime(java.lang.String name, java.lang.String format)
name - attribute nameformat - datetime formatpublic PactDslJsonBody datetime(java.lang.String name, java.lang.String format, java.util.Date example)
name - attribute nameformat - datetime formatexample - example date and time to use for generated bodiespublic PactDslJsonBody datetime(java.lang.String name, java.lang.String format, java.util.Date example, java.util.TimeZone timeZone)
name - attribute nameformat - datetime formatexample - example date and time to use for generated bodiestimeZone - time zone used for formatting of example date and timepublic PactDslJsonBody datetime(java.lang.String name, java.lang.String format, java.time.Instant example)
name - attribute nameformat - datetime formatexample - example date and time to use for generated bodiespublic PactDslJsonBody datetime(java.lang.String name, java.lang.String format, java.time.Instant example, java.util.TimeZone timeZone)
name - attribute nameformat - timestamp formatexample - example date and time to use for generated bodiestimeZone - time zone used for formatting of example date and timepublic PactDslJsonBody date()
public PactDslJsonBody date(java.lang.String name)
name - attribute namepublic PactDslJsonBody date(java.lang.String name, java.lang.String format)
name - attribute dateformat - date format to matchpublic PactDslJsonBody date(java.lang.String name, java.lang.String format, java.util.Date example)
name - attribute dateformat - date format to matchexample - example date to use for generated valuespublic PactDslJsonBody date(java.lang.String name, java.lang.String format, java.util.Date example, java.util.TimeZone timeZone)
name - attribute dateformat - date format to matchexample - example date to use for generated valuestimeZone - time zone used for formatting of example datepublic PactDslJsonBody time()
public PactDslJsonBody time(java.lang.String name)
name - attribute namepublic PactDslJsonBody time(java.lang.String name, java.lang.String format)
name - attribute nameformat - time format to matchpublic PactDslJsonBody time(java.lang.String name, java.lang.String format, java.util.Date example)
name - attribute nameformat - time format to matchexample - example time to use for generated bodiespublic PactDslJsonBody time(java.lang.String name, java.lang.String format, java.util.Date example, java.util.TimeZone timeZone)
name - attribute nameformat - time format to matchexample - example time to use for generated bodiestimeZone - time zone used for formatting of example timepublic PactDslJsonBody ipAddress(java.lang.String name)
name - attribute namepublic PactDslJsonBody object(java.lang.String name)
public PactDslJsonBody object()
DslPartpublic PactDslJsonBody object(java.lang.String name, DslPart value)
name - field namevalue - DSL Part to set the value aspublic DslPart closeObject()
closeObject in class DslPartpublic DslPart close()
DslPartpublic PactDslJsonArray array(java.lang.String name)
public PactDslJsonArray array()
DslPartpublic DslPart closeArray()
closeArray in class DslPartpublic PactDslJsonBody eachLike(java.lang.String name)
public PactDslJsonBody eachLike(java.lang.String name, DslPart object)
DslPartpublic PactDslJsonBody eachLike()
DslPartpublic PactDslJsonArray eachLike(DslPart object)
DslPartpublic PactDslJsonBody eachLike(java.lang.String name, int numberExamples)
public PactDslJsonBody eachLike(int numberExamples)
DslPartpublic PactDslJsonBody eachLike(java.lang.String name, PactDslJsonRootValue value)
name - field namevalue - Value to use to match each itempublic PactDslJsonBody eachLike(java.lang.String name, PactDslJsonRootValue value, int numberExamples)
name - field namevalue - Value to use to match each itemnumberExamples - number of examples to generatepublic PactDslJsonBody minArrayLike(java.lang.String name, java.lang.Integer size)
minArrayLike in class DslPartname - field namesize - minimum size of the arraypublic PactDslJsonBody minArrayLike(java.lang.Integer size)
DslPartminArrayLike in class DslPartsize - minimum sizepublic PactDslJsonBody minArrayLike(java.lang.String name, java.lang.Integer size, DslPart object)
DslPartminArrayLike in class DslPartname - field namesize - minimum sizepublic PactDslJsonArray minArrayLike(java.lang.Integer size, DslPart object)
DslPartminArrayLike in class DslPartsize - minimum sizepublic PactDslJsonBody minArrayLike(java.lang.String name, java.lang.Integer size, int numberExamples)
minArrayLike in class DslPartname - field namesize - minimum size of the arraynumberExamples - number of examples to generatepublic PactDslJsonBody minArrayLike(java.lang.Integer size, int numberExamples)
DslPartminArrayLike in class DslPartsize - minimum sizenumberExamples - number of examples to generatepublic PactDslJsonBody minArrayLike(java.lang.String name, java.lang.Integer size, PactDslJsonRootValue value)
name - field namesize - minimum size of the arrayvalue - Value to use to match each itempublic PactDslJsonBody minArrayLike(java.lang.String name, java.lang.Integer size, PactDslJsonRootValue value, int numberExamples)
name - field namesize - minimum size of the arrayvalue - Value to use to match each itemnumberExamples - number of examples to generatepublic PactDslJsonBody maxArrayLike(java.lang.String name, java.lang.Integer size)
maxArrayLike in class DslPartname - field namesize - maximum size of the arraypublic PactDslJsonBody maxArrayLike(java.lang.Integer size)
DslPartmaxArrayLike in class DslPartsize - minimum sizepublic PactDslJsonBody maxArrayLike(java.lang.String name, java.lang.Integer size, DslPart object)
DslPartmaxArrayLike in class DslPartname - field namesize - maximum sizepublic PactDslJsonArray maxArrayLike(java.lang.Integer size, DslPart object)
DslPartmaxArrayLike in class DslPartsize - minimum sizepublic PactDslJsonBody maxArrayLike(java.lang.String name, java.lang.Integer size, int numberExamples)
maxArrayLike in class DslPartname - field namesize - maximum size of the arraynumberExamples - number of examples to generatepublic PactDslJsonBody maxArrayLike(java.lang.Integer size, int numberExamples)
DslPartmaxArrayLike in class DslPartsize - minimum sizenumberExamples - number of examples to generatepublic PactDslJsonBody maxArrayLike(java.lang.String name, java.lang.Integer size, PactDslJsonRootValue value)
name - field namesize - maximum size of the arrayvalue - Value to use to match each itempublic PactDslJsonBody maxArrayLike(java.lang.String name, java.lang.Integer size, PactDslJsonRootValue value, int numberExamples)
name - field namesize - maximum size of the arrayvalue - Value to use to match each itemnumberExamples - number of examples to generatepublic PactDslJsonBody id()
public PactDslJsonBody id(java.lang.String name)
name - attribute namepublic PactDslJsonBody id(java.lang.String name, java.lang.Long id)
name - attribute nameid - example id to use for generated bodiespublic PactDslJsonBody hexValue(java.lang.String name)
name - attribute namepublic PactDslJsonBody hexValue(java.lang.String name, java.lang.String hexValue)
name - attribute namehexValue - example value to use for generated bodiespublic PactDslJsonBody uuid(java.lang.String name)
name - attribute namepublic PactDslJsonBody uuid(java.lang.String name, java.util.UUID uuid)
name - attribute nameuuid - example UUID to use for generated bodiespublic PactDslJsonBody uuid(java.lang.String name, java.lang.String uuid)
name - attribute nameuuid - example UUID to use for generated bodiespublic PactDslJsonBody nullValue(java.lang.String fieldName)
fieldName - field namepublic PactDslJsonArray eachArrayLike(java.lang.String name)
DslParteachArrayLike in class DslPartname - field namepublic PactDslJsonArray eachArrayLike()
DslParteachArrayLike in class DslPartpublic PactDslJsonArray eachArrayLike(java.lang.String name, int numberExamples)
DslParteachArrayLike in class DslPartname - field namenumberExamples - number of examples to generatepublic PactDslJsonArray eachArrayLike(int numberExamples)
DslParteachArrayLike in class DslPartnumberExamples - number of examples to generatepublic PactDslJsonArray eachArrayWithMaxLike(java.lang.String name, java.lang.Integer size)
DslParteachArrayWithMaxLike in class DslPartname - field namesize - Maximum size of the outer arraypublic PactDslJsonArray eachArrayWithMaxLike(java.lang.Integer size)
DslParteachArrayWithMaxLike in class DslPartsize - Maximum size of the outer arraypublic PactDslJsonArray eachArrayWithMaxLike(java.lang.String name, int numberExamples, java.lang.Integer size)
DslParteachArrayWithMaxLike in class DslPartname - field namenumberExamples - number of examples to generatesize - Maximum size of the outer arraypublic PactDslJsonArray eachArrayWithMaxLike(int numberExamples, java.lang.Integer size)
DslParteachArrayWithMaxLike in class DslPartnumberExamples - number of examples to generatesize - Maximum size of the outer arraypublic PactDslJsonArray eachArrayWithMinLike(java.lang.String name, java.lang.Integer size)
DslParteachArrayWithMinLike in class DslPartname - field namesize - Minimum size of the outer arraypublic PactDslJsonArray eachArrayWithMinLike(java.lang.Integer size)
DslParteachArrayWithMinLike in class DslPartsize - Minimum size of the outer arraypublic PactDslJsonArray eachArrayWithMinLike(java.lang.String name, int numberExamples, java.lang.Integer size)
DslParteachArrayWithMinLike in class DslPartname - field namenumberExamples - number of examples to generatesize - Minimum size of the outer arraypublic PactDslJsonArray eachArrayWithMinLike(int numberExamples, java.lang.Integer size)
DslParteachArrayWithMinLike in class DslPartnumberExamples - number of examples to generatesize - Minimum size of the outer arraypublic PactDslJsonBody eachKeyMappedToAnArrayLike(java.lang.String exampleKey)
exampleKey - Example key to use for generating bodiespublic PactDslJsonBody eachKeyLike(java.lang.String exampleKey)
exampleKey - Example key to use for generating bodiespublic PactDslJsonBody eachKeyLike(java.lang.String exampleKey, PactDslJsonRootValue value)
exampleKey - Example key to use for generating bodiesvalue - Value to use for matching and generated bodiespublic PactDslJsonBody includesStr(java.lang.String name, java.lang.String value)
name - attribute namevalue - Value that must be includedpublic PactDslJsonBody equalTo(java.lang.String name, java.lang.Object value)
name - attribute namevalue - Value that will be used for comparisonspublic PactDslJsonBody and(java.lang.String name, java.lang.Object value, au.com.dius.pact.core.model.matchingrules.MatchingRule... rules)
name - Attribute namevalue - Attribute example valuerules - Matching rules to applypublic PactDslJsonBody or(java.lang.String name, java.lang.Object value, au.com.dius.pact.core.model.matchingrules.MatchingRule... rules)
name - Attribute namevalue - Attribute example valuerules - Matching rules to applypublic PactDslJsonBody matchUrl(java.lang.String name, java.lang.String basePath, java.lang.Object... pathFragments)
name - Attribute namebasePath - The base path for the URL (like "http://localhost:8080/") which will be excluded from the matchingpathFragments - Series of path fragments to match on. These can be strings or regular expressions.public PactDslJsonBody minMaxArrayLike(java.lang.String name, java.lang.Integer minSize, java.lang.Integer maxSize)
DslPartminMaxArrayLike in class DslPartname - field nameminSize - minimum sizemaxSize - maximum sizepublic PactDslJsonBody minMaxArrayLike(java.lang.String name, java.lang.Integer minSize, java.lang.Integer maxSize, DslPart object)
DslPartminMaxArrayLike in class DslPartname - field nameminSize - minimum sizemaxSize - maximum sizepublic PactDslJsonBody minMaxArrayLike(java.lang.Integer minSize, java.lang.Integer maxSize)
DslPartminMaxArrayLike in class DslPartminSize - minimum sizemaxSize - maximum sizepublic PactDslJsonArray minMaxArrayLike(java.lang.Integer minSize, java.lang.Integer maxSize, DslPart object)
DslPartminMaxArrayLike in class DslPartminSize - minimum sizemaxSize - maximum sizepublic PactDslJsonBody minMaxArrayLike(java.lang.String name, java.lang.Integer minSize, java.lang.Integer maxSize, int numberExamples)
DslPartminMaxArrayLike in class DslPartname - field nameminSize - minimum sizemaxSize - maximum sizenumberExamples - number of examples to generatepublic PactDslJsonBody minMaxArrayLike(java.lang.Integer minSize, java.lang.Integer maxSize, int numberExamples)
DslPartminMaxArrayLike in class DslPartminSize - minimum sizemaxSize - maximum sizenumberExamples - number of examples to generatepublic PactDslJsonArray eachArrayWithMinMaxLike(java.lang.String name, java.lang.Integer minSize, java.lang.Integer maxSize)
DslParteachArrayWithMinMaxLike in class DslPartname - field nameminSize - minimum sizemaxSize - maximum sizepublic PactDslJsonArray eachArrayWithMinMaxLike(java.lang.Integer minSize, java.lang.Integer maxSize)
DslParteachArrayWithMinMaxLike in class DslPartminSize - minimum sizemaxSize - maximum sizepublic PactDslJsonArray eachArrayWithMinMaxLike(java.lang.String name, int numberExamples, java.lang.Integer minSize, java.lang.Integer maxSize)
DslParteachArrayWithMinMaxLike in class DslPartname - field namenumberExamples - number of examples to generateminSize - minimum sizemaxSize - maximum sizepublic PactDslJsonArray eachArrayWithMinMaxLike(int numberExamples, java.lang.Integer minSize, java.lang.Integer maxSize)
DslParteachArrayWithMinMaxLike in class DslPartnumberExamples - number of examples to generateminSize - minimum sizemaxSize - maximum sizepublic PactDslJsonBody minMaxArrayLike(java.lang.String name, java.lang.Integer minSize, java.lang.Integer maxSize, PactDslJsonRootValue value, int numberExamples)
name - field nameminSize - minimum sizemaxSize - maximum sizevalue - Value to use to match each itemnumberExamples - number of examples to generatepublic PactDslJsonBody valueFromProviderState(java.lang.String name, java.lang.String expression, java.lang.Object example)
name - Attribute nameexpression - Expression to be evaluated from the provider stateexample - Example value to be used in the consumer testpublic PactDslJsonBody dateExpression(java.lang.String name, java.lang.String expression)
name - Attribute nameexpression - Date expression to use to generate the valuespublic PactDslJsonBody dateExpression(java.lang.String name, java.lang.String expression, java.lang.String format)
name - Attribute nameexpression - Date expression to use to generate the valuesformat - Date format to usepublic PactDslJsonBody timeExpression(java.lang.String name, java.lang.String expression)
name - Attribute nameexpression - Time expression to use to generate the valuespublic PactDslJsonBody timeExpression(java.lang.String name, java.lang.String expression, java.lang.String format)
name - Attribute nameexpression - Time expression to use to generate the valuesformat - Time format to usepublic PactDslJsonBody datetimeExpression(java.lang.String name, java.lang.String expression)
name - Attribute nameexpression - Datetime expression to use to generate the valuespublic PactDslJsonBody datetimeExpression(java.lang.String name, java.lang.String expression, java.lang.String format)
name - Attribute nameexpression - Datetime expression to use to generate the valuesformat - Datetime format to use