From f90249caf4a960860f216d8c4582eac44876b851 Mon Sep 17 00:00:00 2001 From: Johan Rouve Date: Fri, 14 Jul 2017 09:28:31 +0200 Subject: [PATCH 1/3] Remove jetty server port (#6049) --- modules/swagger-generator/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/swagger-generator/pom.xml b/modules/swagger-generator/pom.xml index 83731f64b62..f460e8bebb0 100644 --- a/modules/swagger-generator/pom.xml +++ b/modules/swagger-generator/pom.xml @@ -77,7 +77,6 @@ 8079 stopit - 8080 60000 From 921e4a779e3cc7912b439df856358f3a29b2d0d1 Mon Sep 17 00:00:00 2001 From: wing328 Date: Fri, 14 Jul 2017 15:49:03 +0800 Subject: [PATCH 2/3] update c# petstore samples --- .../csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs | 2 +- .../src/IO.Swagger/Model/FormatTest.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs index ddf16ddad53..2bf7d5997d2 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs @@ -415,7 +415,7 @@ namespace IO.Swagger.Model Regex regex_String = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regex_String.Match(this._String).Success) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of " + regex_String, new [] { "_String" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of /[a-z]/i.", new [] { "_String" }); } // _Byte (byte[]) pattern diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs index 706354c7b2d..8762cbe9751 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs @@ -438,7 +438,7 @@ namespace IO.Swagger.Model Regex regex_String = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regex_String.Match(this._String).Success) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of " + regex_String, new [] { "_String" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of /[a-z]/i.", new [] { "_String" }); } // _Byte (byte[]) pattern From fd87359a1b703d2fd74fd17dd35d67f28815fc55 Mon Sep 17 00:00:00 2001 From: wing328 Date: Fri, 14 Jul 2017 16:17:00 +0800 Subject: [PATCH 3/3] update c# petstore sample to remove pattern check for byte array --- .../SwaggerClient/src/IO.Swagger/Model/FormatTest.cs | 9 +-------- .../src/IO.Swagger/Model/FormatTest.cs | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs index 2bf7d5997d2..ef518e8ca4d 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs @@ -415,14 +415,7 @@ namespace IO.Swagger.Model Regex regex_String = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regex_String.Match(this._String).Success) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of /[a-z]/i.", new [] { "_String" }); - } - - // _Byte (byte[]) pattern - Regex regex_Byte = new Regex(@"^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$", RegexOptions.CultureInvariant); - if (false == regex_Byte.Match(this._Byte).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Byte, must match a pattern of /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.", new [] { "_Byte" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of " + regex_String, new [] { "_String" }); } // Password (string) maxLength diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs index 8762cbe9751..3de9bba51c1 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs @@ -438,14 +438,7 @@ namespace IO.Swagger.Model Regex regex_String = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regex_String.Match(this._String).Success) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of /[a-z]/i.", new [] { "_String" }); - } - - // _Byte (byte[]) pattern - Regex regex_Byte = new Regex(@"^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$", RegexOptions.CultureInvariant); - if (false == regex_Byte.Match(this._Byte).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Byte, must match a pattern of /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.", new [] { "_Byte" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of " + regex_String, new [] { "_String" }); } // Password (string) maxLength