public class PactDslJsonBody
extends DslPart
DSL to define a JSON Object
DATE_2000, HEXADECIMAL, IP_ADDRESS, UUID_REGEX, closed, generators, matchers, parent, rootName, rootPath| Constructor and Description |
|---|
PactDslJsonBody()
Constructs a new body as a root
|
PactDslJsonBody()
Constructs a new body as a child
|
PactDslJsonBody()
Constructs a new body as a child as a copy of an existing one
|
| Modifier and Type | Method and Description |
|---|---|
PactDslJsonBody |
and()
Combine all the matchers using AND
|
PactDslJsonArray |
array()
Attribute that is an array
|
PactDslJsonArray |
array() |
PactDslJsonBody |
arrayLike()
Attribute that is an array where each item must match the following example
|
PactDslJsonBody |
arrayLike() |
PactDslJsonBody |
booleanType()
Attribute that must be a boolean
|
PactDslJsonBody |
booleanType()
Attributes that must be a boolean
|
PactDslJsonBody |
booleanType()
Attribute that must be a boolean
|
PactDslJsonBody |
booleanValue()
Attribute that must be the specified boolean
|
DslPart |
close() |
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()
Attribute that must be formatted as an ISO date
|
PactDslJsonBody |
date()
Attribute that must match the provided date format
|
PactDslJsonBody |
date()
Attribute that must match the provided date format
|
PactDslJsonBody |
date()
Attribute that must match the provided date format
|
PactDslJsonBody |
dateExpression()
Adds a date attribute formatted as an ISO date with the value generated by the date expression
|
PactDslJsonBody |
dateExpression()
Adds a date attribute with the value generated by the date expression
|
PactDslJsonBody |
datetimeExpression()
Adds a datetime attribute formatted as an ISO datetime with the value generated by the expression
|
PactDslJsonBody |
datetimeExpression()
Adds a datetime attribute with the value generated by the expression
|
PactDslJsonBody |
decimalType()
Attribute that must be a decimal value
|
PactDslJsonBody |
decimalType()
Attributes that must be a decimal values
|
PactDslJsonBody |
decimalType()
Attribute that must be a decimalType value
|
PactDslJsonBody |
decimalType()
Attribute that must be a decimalType value
|
PactDslJsonArray |
eachArrayLike() |
PactDslJsonArray |
eachArrayLike() |
PactDslJsonArray |
eachArrayLike() |
PactDslJsonArray |
eachArrayLike() |
PactDslJsonArray |
eachArrayWithMaxLike() |
PactDslJsonArray |
eachArrayWithMaxLike() |
PactDslJsonArray |
eachArrayWithMaxLike() |
PactDslJsonArray |
eachArrayWithMaxLike() |
PactDslJsonArray |
eachArrayWithMinLike() |
PactDslJsonArray |
eachArrayWithMinLike() |
PactDslJsonArray |
eachArrayWithMinLike() |
PactDslJsonArray |
eachArrayWithMinLike() |
PactDslJsonArray |
eachArrayWithMinMaxLike() |
PactDslJsonArray |
eachArrayWithMinMaxLike() |
PactDslJsonArray |
eachArrayWithMinMaxLike() |
PactDslJsonArray |
eachArrayWithMinMaxLike() |
PactDslJsonBody |
eachKeyLike()
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()
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()
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()
Attribute that is an array where each item must match the following example
|
PactDslJsonBody |
eachLike() |
PactDslJsonBody |
eachLike()
Attribute that is an array where each item must match the following example
|
PactDslJsonBody |
eachLike() |
PactDslJsonBody |
eachLike()
Attribute that is an array of values that are not objects where each item must match the following example
|
PactDslJsonBody |
eachLike()
Attribute that is an array of values that are not objects where each item must match the following example
|
PactDslJsonBody |
equalTo()
Attribute that must be equal to the provided value.
|
java.lang.Object |
getBody() |
PactDslJsonBody |
guid()
Attribute that must be encoded as a GUID
|
PactDslJsonBody |
guid()
Attribute that must be encoded as a GUID
|
PactDslJsonBody |
guid()
Attribute that must be encoded as a GUID
|
PactDslJsonBody |
hexValue()
Attribute that must be encoded as a hexadecimal value
|
PactDslJsonBody |
hexValue()
Attribute that must be encoded as a hexadecimal value
|
PactDslJsonBody |
id()
Attribute named 'id' that must be a numeric identifier
|
PactDslJsonBody |
id()
Attribute that must be a numeric identifier
|
PactDslJsonBody |
id()
Attribute that must be a numeric identifier
|
PactDslJsonBody |
includesStr()
Attribute that must include the provided string value
|
PactDslJsonBody |
integerType()
Attribute that must be an integer
|
PactDslJsonBody |
integerType()
Attributes that must be an integer
|
PactDslJsonBody |
integerType()
Attribute that must be an integer
|
PactDslJsonBody |
integerType()
Attribute that must be an integer
|
PactDslJsonBody |
ipAddress()
Attribute that must be an IP4 address
|
PactDslJsonBody |
matchUrl()
Matches a URL that is composed of a base path and a sequence of path expressions
|
PactDslJsonBody |
maxArrayLike()
Attribute that is an array with a maximum size where each item must match the following example
|
PactDslJsonBody |
maxArrayLike() |
PactDslJsonBody |
maxArrayLike()
Attribute that is an array with a maximum size where each item must match the following example
|
PactDslJsonBody |
maxArrayLike() |
PactDslJsonBody |
maxArrayLike()
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()
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()
Attribute that is an array with a minimum size where each item must match the following example
|
PactDslJsonBody |
minArrayLike() |
PactDslJsonBody |
minArrayLike()
Attribute that is an array with a minimum size where each item must match the following example
|
PactDslJsonBody |
minArrayLike() |
PactDslJsonBody |
minArrayLike()
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()
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() |
PactDslJsonBody |
minMaxArrayLike() |
PactDslJsonBody |
minMaxArrayLike() |
PactDslJsonBody |
minMaxArrayLike() |
PactDslJsonBody |
minMaxArrayLike()
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()
Sets the field to a null value
|
PactDslJsonBody |
numberType()
Attribute that can be any number
|
PactDslJsonBody |
numberType()
Attributes that can be any number
|
PactDslJsonBody |
numberType()
Attribute that can be any number
|
PactDslJsonBody |
numberValue()
Attribute that must be the specified number
|
PactDslJsonBody |
object()
Attribute that is a JSON object
|
PactDslJsonBody |
object() |
PactDslJsonBody |
object()
Attribute that is a JSON object defined from a DSL part
|
PactDslJsonBody |
or()
Combine all the matchers using OR
|
void |
putArray() |
void |
putObject() |
PactDslJsonBody |
realType()
Attribute that must be a real value
|
PactDslJsonBody |
realType()
Attribute that must be a real value
|
PactDslJsonBody |
stringMatcher()
Attribute that must match the regular expression
|
PactDslJsonBody |
stringMatcher()
Attribute that must match the regular expression
|
PactDslJsonBody |
stringType()
Attribute that can be any string
|
PactDslJsonBody |
stringType()
Attributes that can be any string
|
PactDslJsonBody |
stringType()
Attribute that can be any string
|
PactDslJsonBody |
stringValue()
Attribute that must be the specified value
|
PactDslJsonBody |
time()
Attribute named 'time' that must be an ISO formatted time
|
PactDslJsonBody |
time()
Attribute that must be an ISO formatted time
|
PactDslJsonBody |
time()
Attribute that must match the given time format
|
PactDslJsonBody |
time()
Attribute that must match the given time format
|
PactDslJsonBody |
time()
Attribute that must match the given time format
|
PactDslJsonBody |
timeExpression()
Adds a time attribute formatted as an ISO time with the value generated by the time expression
|
PactDslJsonBody |
timeExpression()
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()
Attribute that must be an ISO formatted timestamp
|
PactDslJsonBody |
timestamp()
Attribute that must match the given timestamp format
|
PactDslJsonBody |
timestamp()
Attribute that must match the given timestamp format
|
PactDslJsonBody |
timestamp()
Attribute that must match the given timestamp format
|
PactDslJsonBody |
timestamp()
Attribute that must match the given timestamp format
|
PactDslJsonBody |
timestamp()
Attribute that must match the given timestamp format
|
java.lang.String |
toString() |
PactDslJsonBody |
uuid()
Attribute that must be encoded as an UUID
|
PactDslJsonBody |
uuid()
Attribute that must be encoded as an UUID
|
PactDslJsonBody |
uuid()
Attribute that must be encoded as an UUID
|
PactDslJsonBody |
valueFromProviderState()
Adds an attribute that will have it's value injected from the provider state
|
array, array, arrayLike, arrayLike, asArray, asBody, close, closeArray, closeObject, eachArrayLike, eachArrayLike, eachArrayLike, eachArrayLike, eachArrayWithMaxLike, eachArrayWithMaxLike, eachArrayWithMaxLike, eachArrayWithMaxLike, eachArrayWithMinLike, eachArrayWithMinLike, eachArrayWithMinLike, eachArrayWithMinLike, eachArrayWithMinMaxLike, eachArrayWithMinMaxLike, eachArrayWithMinMaxLike, eachArrayWithMinMaxLike, eachLike, eachLike, eachLike, eachLike, getBody, getGenerators, getMatchers, getParent, includesMatcher, matchDate, matchMax, matchMin, matchMinMax, matchTime, matchTimestamp, maxArrayLike, maxArrayLike, maxArrayLike, maxArrayLike, minArrayLike, minArrayLike, minArrayLike, minArrayLike, minMaxArrayLike, minMaxArrayLike, minMaxArrayLike, minMaxArrayLike, object, object, putArray, putObject, regexp, setGenerators, setMatcherspublic PactDslJsonBody()
Constructs a new body as a root
public PactDslJsonBody()
Constructs a new body as a child
public PactDslJsonBody()
Constructs a new body as a child as a copy of an existing one
public java.lang.String toString()
public void putObject()
public void putArray()
public java.lang.Object getBody()
public PactDslJsonBody stringValue()
Attribute that must be the specified value
public PactDslJsonBody numberValue()
Attribute that must be the specified number
public PactDslJsonBody booleanValue()
Attribute that must be the specified boolean
public PactDslJsonBody stringType()
Attribute that can be any string
public PactDslJsonBody stringType()
Attributes that can be any string
public PactDslJsonBody stringType()
Attribute that can be any string
public PactDslJsonBody numberType()
Attribute that can be any number
public PactDslJsonBody numberType()
Attributes that can be any number
public PactDslJsonBody numberType()
Attribute that can be any number
public PactDslJsonBody integerType()
Attribute that must be an integer
public PactDslJsonBody integerType()
Attributes that must be an integer
public PactDslJsonBody integerType()
Attribute that must be an integer
public PactDslJsonBody integerType()
Attribute that must be an integer
public PactDslJsonBody realType()
Attribute that must be a real value
public PactDslJsonBody realType()
Attribute that must be a real value
public PactDslJsonBody decimalType()
Attribute that must be a decimal value
public PactDslJsonBody decimalType()
Attributes that must be a decimal values
public PactDslJsonBody decimalType()
Attribute that must be a decimalType value
public PactDslJsonBody decimalType()
Attribute that must be a decimalType value
public PactDslJsonBody booleanType()
Attribute that must be a boolean
public PactDslJsonBody booleanType()
Attributes that must be a boolean
public PactDslJsonBody booleanType()
Attribute that must be a boolean
public PactDslJsonBody stringMatcher()
Attribute that must match the regular expression
public PactDslJsonBody stringMatcher()
Attribute that must match the regular expression
public PactDslJsonBody timestamp()
Attribute named 'timestamp' that must be an ISO formatted timestamp
public PactDslJsonBody timestamp()
Attribute that must be an ISO formatted timestamp
public PactDslJsonBody timestamp()
Attribute that must match the given timestamp format
public PactDslJsonBody timestamp()
Attribute that must match the given timestamp format
public PactDslJsonBody timestamp()
Attribute that must match the given timestamp format
public PactDslJsonBody timestamp()
Attribute that must match the given timestamp format
public PactDslJsonBody timestamp()
Attribute that must match the given timestamp format
public PactDslJsonBody date()
Attribute named 'date' that must be formatted as an ISO date
public PactDslJsonBody date()
Attribute that must be formatted as an ISO date
public PactDslJsonBody date()
Attribute that must match the provided date format
public PactDslJsonBody date()
Attribute that must match the provided date format
public PactDslJsonBody date()
Attribute that must match the provided date format
public PactDslJsonBody time()
Attribute named 'time' that must be an ISO formatted time
public PactDslJsonBody time()
Attribute that must be an ISO formatted time
public PactDslJsonBody time()
Attribute that must match the given time format
public PactDslJsonBody time()
Attribute that must match the given time format
public PactDslJsonBody time()
Attribute that must match the given time format
public PactDslJsonBody ipAddress()
Attribute that must be an IP4 address
public PactDslJsonBody object()
Attribute that is a JSON object
public PactDslJsonBody object()
public PactDslJsonBody object()
Attribute that is a JSON object defined from a DSL part
public DslPart closeObject()
Closes the current JSON object
public DslPart close()
public PactDslJsonArray array()
Attribute that is an array
public PactDslJsonArray array()
public DslPart closeArray()
Closes the current array
public PactDslJsonBody arrayLike()
Attribute that is an array where each item must match the following example
public PactDslJsonBody arrayLike()
public PactDslJsonBody eachLike()
Attribute that is an array where each item must match the following example
public PactDslJsonBody eachLike()
public PactDslJsonBody eachLike()
Attribute that is an array where each item must match the following example
public PactDslJsonBody eachLike()
public PactDslJsonBody eachLike()
Attribute that is an array of values that are not objects where each item must match the following example
public PactDslJsonBody eachLike()
Attribute that is an array of values that are not objects where each item must match the following example
public PactDslJsonBody minArrayLike()
Attribute that is an array with a minimum size where each item must match the following example
public PactDslJsonBody minArrayLike()
public PactDslJsonBody minArrayLike()
Attribute that is an array with a minimum size where each item must match the following example
public PactDslJsonBody minArrayLike()
public PactDslJsonBody minArrayLike()
Attribute that is an array of values with a minimum size that are not objects where each item must match the following example
public PactDslJsonBody minArrayLike()
Attribute that is an array of values with a minimum size that are not objects where each item must match the following example
public PactDslJsonBody maxArrayLike()
Attribute that is an array with a maximum size where each item must match the following example
public PactDslJsonBody maxArrayLike()
public PactDslJsonBody maxArrayLike()
Attribute that is an array with a maximum size where each item must match the following example
public PactDslJsonBody maxArrayLike()
public PactDslJsonBody maxArrayLike()
Attribute that is an array of values with a maximum size that are not objects where each item must match the following example
public PactDslJsonBody maxArrayLike()
Attribute that is an array of values with a maximum size that are not objects where each item must match the following example
public PactDslJsonBody id()
Attribute named 'id' that must be a numeric identifier
public PactDslJsonBody id()
Attribute that must be a numeric identifier
public PactDslJsonBody id()
Attribute that must be a numeric identifier
public PactDslJsonBody hexValue()
Attribute that must be encoded as a hexadecimal value
public PactDslJsonBody hexValue()
Attribute that must be encoded as a hexadecimal value
public PactDslJsonBody guid()
Attribute that must be encoded as a GUID
public PactDslJsonBody guid()
Attribute that must be encoded as a GUID
public PactDslJsonBody guid()
Attribute that must be encoded as a GUID
public PactDslJsonBody uuid()
Attribute that must be encoded as an UUID
public PactDslJsonBody uuid()
Attribute that must be encoded as an UUID
public PactDslJsonBody uuid()
Attribute that must be encoded as an UUID
public PactDslJsonBody nullValue()
Sets the field to a null value
public PactDslJsonArray eachArrayLike()
public PactDslJsonArray eachArrayLike()
public PactDslJsonArray eachArrayLike()
public PactDslJsonArray eachArrayLike()
public PactDslJsonArray eachArrayWithMaxLike()
public PactDslJsonArray eachArrayWithMaxLike()
public PactDslJsonArray eachArrayWithMaxLike()
public PactDslJsonArray eachArrayWithMaxLike()
public PactDslJsonArray eachArrayWithMinLike()
public PactDslJsonArray eachArrayWithMinLike()
public PactDslJsonArray eachArrayWithMinLike()
public PactDslJsonArray eachArrayWithMinLike()
public PactDslJsonBody eachKeyMappedToAnArrayLike()
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.
public PactDslJsonBody eachKeyLike()
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.
public PactDslJsonBody eachKeyLike()
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.
public PactDslJsonBody includesStr()
Attribute that must include the provided string value
public PactDslJsonBody equalTo()
Attribute that must be equal to the provided value.
public PactDslJsonBody and()
Combine all the matchers using AND
public PactDslJsonBody or()
Combine all the matchers using OR
public PactDslJsonBody matchUrl()
Matches a URL that is composed of a base path and a sequence of path expressions
public PactDslJsonBody minMaxArrayLike()
public PactDslJsonBody minMaxArrayLike()
public PactDslJsonBody minMaxArrayLike()
public PactDslJsonBody minMaxArrayLike()
public PactDslJsonArray eachArrayWithMinMaxLike()
public PactDslJsonArray eachArrayWithMinMaxLike()
public PactDslJsonArray eachArrayWithMinMaxLike()
public PactDslJsonArray eachArrayWithMinMaxLike()
public PactDslJsonBody minMaxArrayLike()
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
public PactDslJsonBody valueFromProviderState()
Adds an attribute that will have it's value injected from the provider state
public PactDslJsonBody dateExpression()
Adds a date attribute formatted as an ISO date with the value generated by the date expression
public PactDslJsonBody dateExpression()
Adds a date attribute with the value generated by the date expression
public PactDslJsonBody timeExpression()
Adds a time attribute formatted as an ISO time with the value generated by the time expression
public PactDslJsonBody timeExpression()
Adds a time attribute with the value generated by the time expression
public PactDslJsonBody datetimeExpression()
Adds a datetime attribute formatted as an ISO datetime with the value generated by the expression
public PactDslJsonBody datetimeExpression()
Adds a datetime attribute with the value generated by the expression