public static class PactDslRootValue.Companion
@JvmStatic @NotNull public PactDslRootValue stringType()
Value that can be any string
@JvmStatic @NotNull public PactDslRootValue stringType(@NotNull java.lang.String example)
Value that can be any string
example - example value to use for generated bodies@JvmStatic @NotNull public PactDslRootValue numberType()
Value that can be any number
@JvmStatic @NotNull public PactDslRootValue numberType(@NotNull java.lang.Number number)
Value that can be any number
number - example number to use for generated bodies@JvmStatic @NotNull public PactDslRootValue integerType()
Value that must be an integer
@JvmStatic @NotNull public PactDslRootValue integerType(long number)
Value that must be an integer
number - example integer value to use for generated bodies@JvmStatic @NotNull public PactDslRootValue integerType(int number)
Value that must be an integer
number - example integer value to use for generated bodies@JvmStatic @NotNull public PactDslRootValue decimalType()
Value that must be a decimal value
@JvmStatic @NotNull public PactDslRootValue decimalType(@NotNull java.math.BigDecimal number)
Value that must be a decimalType value
number - example decimalType value@JvmStatic @NotNull public PactDslRootValue decimalType(double number)
Value that must be a decimalType value
number - example decimalType value@JvmOverloads @JvmStatic @NotNull public PactDslRootValue booleanType(boolean example)
Value that must be a boolean
example - example boolean to use for generated bodies@JvmOverloads @JvmStatic @NotNull public PactDslRootValue booleanType()
Value that must be a boolean
@JvmStatic @NotNull public PactDslRootValue 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@JvmOverloads @JvmStatic @NotNull public PactDslRootValue timestamp(@NotNull java.lang.String format)
Value that must match the given timestamp format
format - timestamp format@JvmOverloads @JvmStatic @NotNull public PactDslRootValue timestamp()
Value that must match the given timestamp format
@JvmStatic @NotNull public PactDslRootValue 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 PactDslRootValue date(@NotNull java.lang.String format)
Value that must match the provided date format
format - date format to match@JvmOverloads @JvmStatic @NotNull public PactDslRootValue date()
Value that must match the provided date format
@JvmStatic @NotNull public PactDslRootValue 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 PactDslRootValue time(@NotNull java.lang.String format)
Value that must match the given time format
format - time format to match@JvmOverloads @JvmStatic @NotNull public PactDslRootValue time()
Value that must match the given time format
@JvmStatic @NotNull public PactDslRootValue 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 PactDslRootValue ipAddress()
Value that must be an IP4 address
@JvmStatic @NotNull public PactDslRootValue id()
Value that must be a numeric identifier
@JvmStatic @NotNull public PactDslRootValue id(long id)
Value that must be a numeric identifier
id - example id to use for generated bodies@JvmStatic @NotNull public PactDslRootValue hexValue()
Value that must be encoded as a hexadecimal value
@JvmStatic @NotNull public PactDslRootValue 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 PactDslRootValue uuid()
Value that must be encoded as an UUID
@JvmStatic @NotNull public PactDslRootValue 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 PactDslRootValue 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 PactDslRootValue 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 PactDslRootValue 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 PactDslRootValue 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