From 299960059dc7c719b26d5b4559ab84eab093d246 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Sun, 25 Mar 2018 11:26:59 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- multi/multi__contract_dsl.html | 10 ++++++++++ single/spring-cloud-contract.html | 10 ++++++++++ spring-cloud-contract.xml | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/multi/multi__contract_dsl.html b/multi/multi__contract_dsl.html index 52c12a0392..236a123927 100644 --- a/multi/multi__contract_dsl.html +++ b/multi/multi__contract_dsl.html @@ -614,11 +614,13 @@ generated for request and response.

Spring Cloud Contract comes with a ser use in your contracts, as shown in the following example:

protected static final Pattern TRUE_OR_FALSE = Pattern.compile(/(true|false)/)
 protected static final Pattern ONLY_ALPHA_UNICODE = Pattern.compile(/[\p{L}]*/)
 protected static final Pattern NUMBER = Pattern.compile('-?(\\d*\\.\\d+|\\d+)')
+protected static final Pattern POSITIVE_INT = Pattern.compile('([1-9]\\d*)')
 protected static final Pattern DOUBLE = Pattern.compile('-?(\\d*\\.\\d+)')
 protected static final Pattern IP_ADDRESS = Pattern.compile('([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])')
 protected static final Pattern HOSTNAME_PATTERN = Pattern.compile('((http[s]?|ftp):/)/?([^:/\\s]+)(:[0-9]{1,5})?')
 protected static final Pattern EMAIL = Pattern.compile('[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}')
 protected static final Pattern URL = UrlHelper.URL
+protected static final Pattern HTTPS_URL = UrlHelper.HTTPS_URL
 protected static final Pattern UUID = Pattern.compile('[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}')
 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])')
@@ -639,6 +641,10 @@ Pattern number() {
 	return NUMBER
 }
 
+Pattern positiveInt() {
+	return POSITIVE_INT
+}
+
 Pattern anyBoolean() {
 	return TRUE_OR_FALSE
 }
@@ -663,6 +669,10 @@ Pattern url() {
 	return URL
 }
 
+Pattern httpsUrl() {
+	return HTTPS_URL
+}
+
 Pattern uuid(){
 	return UUID
 }
diff --git a/single/spring-cloud-contract.html b/single/spring-cloud-contract.html
index 9daa78c23f..22da94e7da 100644
--- a/single/spring-cloud-contract.html
+++ b/single/spring-cloud-contract.html
@@ -3729,11 +3729,13 @@ generated for request and response.

Spring Cloud Contract comes with a ser use in your contracts, as shown in the following example:

protected static final Pattern TRUE_OR_FALSE = Pattern.compile(/(true|false)/)
 protected static final Pattern ONLY_ALPHA_UNICODE = Pattern.compile(/[\p{L}]*/)
 protected static final Pattern NUMBER = Pattern.compile('-?(\\d*\\.\\d+|\\d+)')
+protected static final Pattern POSITIVE_INT = Pattern.compile('([1-9]\\d*)')
 protected static final Pattern DOUBLE = Pattern.compile('-?(\\d*\\.\\d+)')
 protected static final Pattern IP_ADDRESS = Pattern.compile('([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])')
 protected static final Pattern HOSTNAME_PATTERN = Pattern.compile('((http[s]?|ftp):/)/?([^:/\\s]+)(:[0-9]{1,5})?')
 protected static final Pattern EMAIL = Pattern.compile('[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}')
 protected static final Pattern URL = UrlHelper.URL
+protected static final Pattern HTTPS_URL = UrlHelper.HTTPS_URL
 protected static final Pattern UUID = Pattern.compile('[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}')
 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])')
@@ -3754,6 +3756,10 @@ Pattern number() {
 	return NUMBER
 }
 
+Pattern positiveInt() {
+	return POSITIVE_INT
+}
+
 Pattern anyBoolean() {
 	return TRUE_OR_FALSE
 }
@@ -3778,6 +3784,10 @@ Pattern url() {
 	return URL
 }
 
+Pattern httpsUrl() {
+	return HTTPS_URL
+}
+
 Pattern uuid(){
 	return UUID
 }
diff --git a/spring-cloud-contract.xml b/spring-cloud-contract.xml
index 8cc20f6447..09e6feebe3 100644
--- a/spring-cloud-contract.xml
+++ b/spring-cloud-contract.xml
@@ -6260,11 +6260,13 @@ use in your contracts, as shown in the following example:
 protected static final Pattern TRUE_OR_FALSE = Pattern.compile(/(true|false)/)
 protected static final Pattern ONLY_ALPHA_UNICODE = Pattern.compile(/[\p{L}]*/)
 protected static final Pattern NUMBER = Pattern.compile('-?(\\d*\\.\\d+|\\d+)')
+protected static final Pattern POSITIVE_INT = Pattern.compile('([1-9]\\d*)')
 protected static final Pattern DOUBLE = Pattern.compile('-?(\\d*\\.\\d+)')
 protected static final Pattern IP_ADDRESS = Pattern.compile('([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])')
 protected static final Pattern HOSTNAME_PATTERN = Pattern.compile('((http[s]?|ftp):/)/?([^:/\\s]+)(:[0-9]{1,5})?')
 protected static final Pattern EMAIL = Pattern.compile('[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}')
 protected static final Pattern URL = UrlHelper.URL
+protected static final Pattern HTTPS_URL = UrlHelper.HTTPS_URL
 protected static final Pattern UUID = Pattern.compile('[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}')
 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])')
@@ -6285,6 +6287,10 @@ Pattern number() {
 	return NUMBER
 }
 
+Pattern positiveInt() {
+	return POSITIVE_INT
+}
+
 Pattern anyBoolean() {
 	return TRUE_OR_FALSE
 }
@@ -6309,6 +6315,10 @@ Pattern url() {
 	return URL
 }
 
+Pattern httpsUrl() {
+	return HTTPS_URL
+}
+
 Pattern uuid(){
 	return UUID
 }