public static class PactDslJsonRootValue.Companion
@JvmStatic @NotNull public PactDslJsonRootValue stringType()
Value that can be any string
@JvmStatic @NotNull public PactDslJsonRootValue stringType(@NotNull java.lang.String example)
Value that can be any string
example - example value to use for generated bodies@JvmStatic @NotNull public PactDslJsonRootValue numberType()
Value that can be any number
@JvmStatic @NotNull public PactDslJsonRootValue numberType(@NotNull java.lang.Number number)
Value that can be any number
number - example number to use for generated bodies@JvmStatic @NotNull public PactDslJsonRootValue integerType()
Value that must be an integer
@JvmStatic @NotNull public PactDslJsonRootValue integerType(long number)
Value that must be an integer
number - example integer value to use for generated bodies@JvmStatic @NotNull public PactDslJsonRootValue integerType(int number)
Value that must be an integer
number - example integer value to use for generated bodies@JvmStatic @NotNull public PactDslJsonRootValue decimalType()
Value that must be a decimal value
@JvmStatic @NotNull public PactDslJsonRootValue decimalType(@NotNull java.math.BigDecimal number)
Value that must be a decimalType value
number - example decimalType value@JvmStatic @NotNull public PactDslJsonRootValue decimalType(double number)
Value that must be a decimalType value
number - example decimalType value@JvmOverloads @JvmStatic @NotNull public PactDslJsonRootValue booleanType(boolean example)
Value that must be a boolean
example - example boolean to use for generated bodies@JvmOverloads @JvmStatic @NotNull public PactDslJsonRootValue booleanType()
Value that must be a boolean
@JvmStatic @NotNull public PactDslJsonRootValue stringMatcher(@NotNull java.lang.String regex, @NotNull java.lang.String value)
Value that must match the regular expression
regex - regular expressionvalue - example value to use for generated bodies@Deprecated @JvmStatic @NotNull public PactDslJsonRootValue stringMatcher(@NotNull java.lang.String regex)
Value that must match the regular expression
regex - regular expression@JvmOverloads @Deprecated @JvmStatic @NotNull public PactDslJsonRootValue timestamp(@NotNull java.lang.String format)
Value that must match the given timestamp format
format - timestamp format@JvmOverloads @Deprecated @JvmStatic @NotNull public PactDslJsonRootValue timestamp()
Value that must match the given timestamp format
@Deprecated @JvmStatic @NotNull public PactDslJsonRootValue timestamp(@NotNull java.lang.String format, @NotNull java.util.Date example)
Value that must match the given timestamp format
format - timestamp formatexample - example date and time to use for generated bodies@JvmOverloads @JvmStatic @NotNull public PactDslJsonRootValue datetime(@NotNull java.lang.String format)
Value that must match the given timestamp format
format - timestamp format@JvmOverloads @JvmStatic @NotNull public PactDslJsonRootValue datetime()
Value that must match the given timestamp format
@JvmStatic @NotNull public PactDslJsonRootValue datetime(@NotNull java.lang.String format, @NotNull java.util.Date example)
Value that must match the given timestamp format
format - timestamp formatexample - example date and time to use for generated bodies@JvmOverloads @JvmStatic @NotNull public PactDslJsonRootValue date(@NotNull java.lang.String format)
Value that must match the provided date format
format - date format to match@JvmOverloads @JvmStatic @NotNull public PactDslJsonRootValue date()
Value that must match the provided date format
@JvmStatic @NotNull public PactDslJsonRootValue date(@NotNull java.lang.String format, @NotNull java.util.Date example)
Value that must match the provided date format
format - date format to matchexample - example date to use for generated values@JvmOverloads @JvmStatic @NotNull public PactDslJsonRootValue time(@NotNull java.lang.String format)
Value that must match the given time format
format - time format to match@JvmOverloads @JvmStatic @NotNull public PactDslJsonRootValue time()
Value that must match the given time format
@JvmStatic @NotNull public PactDslJsonRootValue time(@NotNull java.lang.String format, @NotNull java.util.Date example)
Value that must match the given time format
format - time format to matchexample - example time to use for generated bodies@JvmStatic @NotNull public PactDslJsonRootValue ipAddress()
Value that must be an IP4 address
@JvmStatic @NotNull public PactDslJsonRootValue id()
Value that must be a numeric identifier
@JvmStatic @NotNull public PactDslJsonRootValue id(long id)
Value that must be a numeric identifier
id - example id to use for generated bodies@JvmStatic @NotNull public PactDslJsonRootValue hexValue()
Value that must be encoded as a hexadecimal value
@JvmStatic @NotNull public PactDslJsonRootValue hexValue(@NotNull java.lang.String hexValue)
Value that must be encoded as a hexadecimal value
hexValue - example value to use for generated bodies@JvmStatic @NotNull public PactDslJsonRootValue uuid()
Value that must be encoded as an UUID
@JvmStatic @NotNull public PactDslJsonRootValue uuid(@NotNull java.util.UUID uuid)
Value that must be encoded as an UUID
uuid - example UUID to use for generated bodies@JvmStatic @NotNull public PactDslJsonRootValue uuid(@NotNull java.lang.String uuid)
Value that must be encoded as an UUID
uuid - example UUID to use for generated bodies@JvmStatic @NotNull public PactDslJsonRootValue and(@Nullable java.lang.Object example, @NotNull au.com.dius.pact.core.model.matchingrules.MatchingRule... rules)
Combine all the matchers using AND
example - Attribute example valuerules - Matching rules to apply@JvmStatic @NotNull public PactDslJsonRootValue or(@Nullable java.lang.Object example, @NotNull au.com.dius.pact.core.model.matchingrules.MatchingRule... rules)
Combine all the matchers using OR
example - Attribute namerules - Matching rules to apply@JvmStatic @NotNull public PactDslJsonRootValue valueFromProviderState(@NotNull java.lang.String expression, @Nullable java.lang.Object example)
Adds a value that will have it's value injected from the provider state
expression - Expression to be evaluated from the provider stateexample - Example value to be used in the consumer test@JvmOverloads @JvmStatic @NotNull public PactDslJsonRootValue dateExpression(@NotNull java.lang.String expression, @NotNull java.lang.String format)
Date value generated from an expression.
expression - Date expressionformat - Date format to use@JvmOverloads @JvmStatic @NotNull public PactDslJsonRootValue dateExpression(@NotNull java.lang.String expression)
Date value generated from an expression.
expression - Date expression@JvmOverloads @JvmStatic @NotNull public PactDslJsonRootValue timeExpression(@NotNull java.lang.String expression, @NotNull java.lang.String format)
Time value generated from an expression.
expression - Time expressionformat - Time format to use@JvmOverloads @JvmStatic @NotNull public PactDslJsonRootValue timeExpression(@NotNull java.lang.String expression)
Time value generated from an expression.
expression - Time expression@JvmOverloads @JvmStatic @NotNull public PactDslJsonRootValue datetimeExpression(@NotNull java.lang.String expression, @NotNull java.lang.String format)
Datetime value generated from an expression.
expression - Datetime expressionformat - Datetime format to use@JvmOverloads @JvmStatic @NotNull public PactDslJsonRootValue datetimeExpression(@NotNull java.lang.String expression)
Datetime value generated from an expression.
expression - Datetime expression