From df95514016c042e89378e4a186087d7c1e553752 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Mon, 20 Mar 2017 17:20:17 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- spring-cloud-contract.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/spring-cloud-contract.html b/spring-cloud-contract.html index 0143e26e76..b9693593b6 100644 --- a/spring-cloud-contract.html +++ b/spring-cloud-contract.html @@ -6765,6 +6765,13 @@ protected static final Pattern UUID = Pattern.compile('[a-z0-9]{8}-[a-z0-9]{4}-[ protected static final Pattern ANY_DATE = Pattern.compile('(\\d\\d\\d\\d)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])') protected static final Pattern ANY_DATE_TIME = Pattern.compile('([0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])') protected static final Pattern ANY_TIME = Pattern.compile('(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])') +protected static final Pattern NON_EMPTY = Pattern.compile(/.+/) +protected static final Pattern NON_BLANK = Pattern.compile(/.*(\S+|\R).*|!^\R*$/) +protected static final Pattern ISO8601_WITH_OFFSET = Pattern.compile(/([0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\.\d{3})?(Z|[+-][01]\d:[0-5]\d)/) + +protected static Pattern anyOf(String... values){ + return Pattern.compile(values.collect({"^$it\$"}).join("|")) +} String onlyAlphaUnicode() { return ONLY_ALPHA_UNICODE.pattern() @@ -6808,6 +6815,18 @@ String isoDateTime() { String isoTime() { return ANY_TIME.pattern() +} + +String iso8601WithOffset() { + return ISO8601_WITH_OFFSET.pattern() +} + +String nonEmpty() { + return NON_EMPTY.pattern() +} + +String nonBlank() { + return NON_BLANK.pattern() }