diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache index ab126614f96a..ffd28edb4a24 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/ClientUtils.mustache @@ -42,7 +42,7 @@ namespace {{packageName}}.Client /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ClientUtils.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ClientUtils.mustache index a8a92172aaf5..7e59130d6eb6 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ClientUtils.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ClientUtils.mustache @@ -96,7 +96,7 @@ namespace {{packageName}}.{{clientPackage}} /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/validatable.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/validatable.mustache index 19b22fe6610b..2799fca039b5 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/validatable.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/validatable.mustache @@ -74,7 +74,7 @@ {{#pattern}} {{^isByteArray}} // {{{name}}} ({{{dataType}}}) pattern - Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}); + Regex regex{{{name}}} = new Regex("{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}); if (false == regex{{{name}}}.Match(this.{{{name}}}{{#isUuid}}.ToString(){{/isUuid}}).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of " + regex{{{name}}}, new [] { "{{{name}}}" }); diff --git a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/ClientUtils.cs index 3bcd98df7caa..d434ef6ec95c 100644 --- a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -46,7 +46,7 @@ static ClientUtils() /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/ClientUtils.cs index 8e33ee2d9b5b..85ec43412716 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -46,7 +46,7 @@ static ClientUtils() /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs index 11b480ef63b7..da13eb8e7636 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs @@ -183,14 +183,14 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Cultivar (string) pattern - Regex regexCultivar = new Regex(@"^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); + Regex regexCultivar = new Regex("^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); if (false == regexCultivar.Match(this.Cultivar).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cultivar, must match a pattern of " + regexCultivar, new [] { "Cultivar" }); } // Origin (string) pattern - Regex regexOrigin = new Regex(@"^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexOrigin = new Regex("^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexOrigin.Match(this.Origin).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Origin, must match a pattern of " + regexOrigin, new [] { "Origin" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs index 6878c32a1cc9..40e08c968d8e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs @@ -796,7 +796,7 @@ public override int GetHashCode() } // String (string) pattern - Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexString = new Regex("[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexString.Match(this.String).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); @@ -815,14 +815,14 @@ public override int GetHashCode() } // PatternWithDigits (string) pattern - Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); + Regex regexPatternWithDigits = new Regex("^\\d{10}$", RegexOptions.CultureInvariant); if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigits, must match a pattern of " + regexPatternWithDigits, new [] { "PatternWithDigits" }); } // PatternWithDigitsAndDelimiter (string) pattern - Regex regexPatternWithDigitsAndDelimiter = new Regex(@"^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexPatternWithDigitsAndDelimiter = new Regex("^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexPatternWithDigitsAndDelimiter.Match(this.PatternWithDigitsAndDelimiter).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index de88a24f1500..b856a6fc2daf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -253,7 +253,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // UuidWithPattern (Guid) pattern - Regex regexUuidWithPattern = new Regex(@"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); + Regex regexUuidWithPattern = new Regex("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); if (false == regexUuidWithPattern.Match(this.UuidWithPattern.ToString()).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UuidWithPattern, must match a pattern of " + regexUuidWithPattern, new [] { "UuidWithPattern" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ClientUtils.cs index 891954e74238..4cb4f694a0d1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -100,7 +100,7 @@ public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOp /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Apple.cs index 3159d60abc00..fb804227a4a6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Apple.cs @@ -82,14 +82,14 @@ public override string ToString() public IEnumerable Validate(ValidationContext validationContext) { // Cultivar (string) pattern - Regex regexCultivar = new Regex(@"^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); + Regex regexCultivar = new Regex("^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); if (false == regexCultivar.Match(this.Cultivar).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cultivar, must match a pattern of " + regexCultivar, new [] { "Cultivar" }); } // Origin (string) pattern - Regex regexOrigin = new Regex(@"^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexOrigin = new Regex("^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexOrigin.Match(this.Origin).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Origin, must match a pattern of " + regexOrigin, new [] { "Origin" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FormatTest.cs index 947ae38ad227..cef3da2565d5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FormatTest.cs @@ -303,21 +303,21 @@ public override string ToString() } // PatternWithDigits (string) pattern - Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); + Regex regexPatternWithDigits = new Regex("^\\d{10}$", RegexOptions.CultureInvariant); if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigits, must match a pattern of " + regexPatternWithDigits, new [] { "PatternWithDigits" }); } // PatternWithDigitsAndDelimiter (string) pattern - Regex regexPatternWithDigitsAndDelimiter = new Regex(@"^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexPatternWithDigitsAndDelimiter = new Regex("^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexPatternWithDigitsAndDelimiter.Match(this.PatternWithDigitsAndDelimiter).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); } // StringProperty (string) pattern - Regex regexStringProperty = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexStringProperty = new Regex("[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexStringProperty.Match(this.StringProperty).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StringProperty, must match a pattern of " + regexStringProperty, new [] { "StringProperty" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index a2c51715075a..3d8c9eaa03c2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -100,7 +100,7 @@ public override string ToString() public IEnumerable Validate(ValidationContext validationContext) { // UuidWithPattern (Guid) pattern - Regex regexUuidWithPattern = new Regex(@"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); + Regex regexUuidWithPattern = new Regex("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); if (false == regexUuidWithPattern.Match(this.UuidWithPattern.ToString()).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UuidWithPattern, must match a pattern of " + regexUuidWithPattern, new [] { "UuidWithPattern" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ClientUtils.cs index 812a804966f2..dfba54b0e224 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -98,7 +98,7 @@ public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOp /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Apple.cs index 7282462348fb..2dfef8c50f9d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Apple.cs @@ -80,14 +80,14 @@ public override string ToString() public IEnumerable Validate(ValidationContext validationContext) { // Cultivar (string) pattern - Regex regexCultivar = new Regex(@"^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); + Regex regexCultivar = new Regex("^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); if (false == regexCultivar.Match(this.Cultivar).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cultivar, must match a pattern of " + regexCultivar, new [] { "Cultivar" }); } // Origin (string) pattern - Regex regexOrigin = new Regex(@"^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexOrigin = new Regex("^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexOrigin.Match(this.Origin).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Origin, must match a pattern of " + regexOrigin, new [] { "Origin" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FormatTest.cs index 5c0a53ed71a4..d5ee0dad1d7d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FormatTest.cs @@ -301,21 +301,21 @@ public override string ToString() } // PatternWithDigits (string) pattern - Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); + Regex regexPatternWithDigits = new Regex("^\\d{10}$", RegexOptions.CultureInvariant); if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigits, must match a pattern of " + regexPatternWithDigits, new [] { "PatternWithDigits" }); } // PatternWithDigitsAndDelimiter (string) pattern - Regex regexPatternWithDigitsAndDelimiter = new Regex(@"^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexPatternWithDigitsAndDelimiter = new Regex("^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexPatternWithDigitsAndDelimiter.Match(this.PatternWithDigitsAndDelimiter).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); } // StringProperty (string) pattern - Regex regexStringProperty = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexStringProperty = new Regex("[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexStringProperty.Match(this.StringProperty).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StringProperty, must match a pattern of " + regexStringProperty, new [] { "StringProperty" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 090600eafa4c..f3ffa0517674 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -98,7 +98,7 @@ public override string ToString() public IEnumerable Validate(ValidationContext validationContext) { // UuidWithPattern (Guid) pattern - Regex regexUuidWithPattern = new Regex(@"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); + Regex regexUuidWithPattern = new Regex("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); if (false == regexUuidWithPattern.Match(this.UuidWithPattern.ToString()).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UuidWithPattern, must match a pattern of " + regexUuidWithPattern, new [] { "UuidWithPattern" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ClientUtils.cs index d8a9f0ca4a0f..5ca0572afc1f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -100,7 +100,7 @@ public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOp /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools/Client/ClientUtils.cs index 6eb7acc88f4b..f751f61c7597 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -100,7 +100,7 @@ public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOp /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools/Client/ClientUtils.cs index 6eb7acc88f4b..f751f61c7597 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -100,7 +100,7 @@ public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOp /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ClientUtils.cs index 46f2d9ea2b3f..0ad137a07072 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -98,7 +98,7 @@ public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOp /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Apple.cs index 7282462348fb..2dfef8c50f9d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Apple.cs @@ -80,14 +80,14 @@ public override string ToString() public IEnumerable Validate(ValidationContext validationContext) { // Cultivar (string) pattern - Regex regexCultivar = new Regex(@"^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); + Regex regexCultivar = new Regex("^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); if (false == regexCultivar.Match(this.Cultivar).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cultivar, must match a pattern of " + regexCultivar, new [] { "Cultivar" }); } // Origin (string) pattern - Regex regexOrigin = new Regex(@"^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexOrigin = new Regex("^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexOrigin.Match(this.Origin).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Origin, must match a pattern of " + regexOrigin, new [] { "Origin" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FormatTest.cs index 5c0a53ed71a4..d5ee0dad1d7d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FormatTest.cs @@ -301,21 +301,21 @@ public override string ToString() } // PatternWithDigits (string) pattern - Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); + Regex regexPatternWithDigits = new Regex("^\\d{10}$", RegexOptions.CultureInvariant); if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigits, must match a pattern of " + regexPatternWithDigits, new [] { "PatternWithDigits" }); } // PatternWithDigitsAndDelimiter (string) pattern - Regex regexPatternWithDigitsAndDelimiter = new Regex(@"^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexPatternWithDigitsAndDelimiter = new Regex("^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexPatternWithDigitsAndDelimiter.Match(this.PatternWithDigitsAndDelimiter).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); } // StringProperty (string) pattern - Regex regexStringProperty = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexStringProperty = new Regex("[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexStringProperty.Match(this.StringProperty).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StringProperty, must match a pattern of " + regexStringProperty, new [] { "StringProperty" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 090600eafa4c..f3ffa0517674 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -98,7 +98,7 @@ public override string ToString() public IEnumerable Validate(ValidationContext validationContext) { // UuidWithPattern (Guid) pattern - Regex regexUuidWithPattern = new Regex(@"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); + Regex regexUuidWithPattern = new Regex("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); if (false == regexUuidWithPattern.Match(this.UuidWithPattern.ToString()).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UuidWithPattern, must match a pattern of " + regexUuidWithPattern, new [] { "UuidWithPattern" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ClientUtils.cs index 8e33ee2d9b5b..85ec43412716 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -46,7 +46,7 @@ static ClientUtils() /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Apple.cs index 26fb7d71d1c8..b8cf5d357d3d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/Apple.cs @@ -140,14 +140,14 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Cultivar (string) pattern - Regex regexCultivar = new Regex(@"^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); + Regex regexCultivar = new Regex("^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); if (false == regexCultivar.Match(this.Cultivar).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cultivar, must match a pattern of " + regexCultivar, new [] { "Cultivar" }); } // Origin (string) pattern - Regex regexOrigin = new Regex(@"^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexOrigin = new Regex("^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexOrigin.Match(this.Origin).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Origin, must match a pattern of " + regexOrigin, new [] { "Origin" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/FormatTest.cs index 518a272be5ad..bf8985d265c4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/FormatTest.cs @@ -417,7 +417,7 @@ public override int GetHashCode() } // String (string) pattern - Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexString = new Regex("[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexString.Match(this.String).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); @@ -436,14 +436,14 @@ public override int GetHashCode() } // PatternWithDigits (string) pattern - Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); + Regex regexPatternWithDigits = new Regex("^\\d{10}$", RegexOptions.CultureInvariant); if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigits, must match a pattern of " + regexPatternWithDigits, new [] { "PatternWithDigits" }); } // PatternWithDigitsAndDelimiter (string) pattern - Regex regexPatternWithDigitsAndDelimiter = new Regex(@"^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexPatternWithDigitsAndDelimiter = new Regex("^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexPatternWithDigitsAndDelimiter.Match(this.PatternWithDigitsAndDelimiter).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index ab33594b0e29..f38683669af6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -166,7 +166,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // UuidWithPattern (Guid) pattern - Regex regexUuidWithPattern = new Regex(@"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); + Regex regexUuidWithPattern = new Regex("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); if (false == regexUuidWithPattern.Match(this.UuidWithPattern.ToString()).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UuidWithPattern, must match a pattern of " + regexUuidWithPattern, new [] { "UuidWithPattern" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/ClientUtils.cs index 8e33ee2d9b5b..85ec43412716 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -46,7 +46,7 @@ static ClientUtils() /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Apple.cs index 8b1f87d1aa9a..5e83de8a1546 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Apple.cs @@ -139,14 +139,14 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Cultivar (string) pattern - Regex regexCultivar = new Regex(@"^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); + Regex regexCultivar = new Regex("^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); if (false == regexCultivar.Match(this.Cultivar).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cultivar, must match a pattern of " + regexCultivar, new [] { "Cultivar" }); } // Origin (string) pattern - Regex regexOrigin = new Regex(@"^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexOrigin = new Regex("^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexOrigin.Match(this.Origin).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Origin, must match a pattern of " + regexOrigin, new [] { "Origin" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/FormatTest.cs index 743b84f13a9b..caa163075e72 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/FormatTest.cs @@ -416,7 +416,7 @@ public override int GetHashCode() } // String (string) pattern - Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexString = new Regex("[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexString.Match(this.String).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); @@ -435,14 +435,14 @@ public override int GetHashCode() } // PatternWithDigits (string) pattern - Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); + Regex regexPatternWithDigits = new Regex("^\\d{10}$", RegexOptions.CultureInvariant); if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigits, must match a pattern of " + regexPatternWithDigits, new [] { "PatternWithDigits" }); } // PatternWithDigitsAndDelimiter (string) pattern - Regex regexPatternWithDigitsAndDelimiter = new Regex(@"^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexPatternWithDigitsAndDelimiter = new Regex("^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexPatternWithDigitsAndDelimiter.Match(this.PatternWithDigitsAndDelimiter).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 2a0e96d6bc0f..0a0750f14ccf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -165,7 +165,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // UuidWithPattern (Guid) pattern - Regex regexUuidWithPattern = new Regex(@"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); + Regex regexUuidWithPattern = new Regex("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); if (false == regexUuidWithPattern.Match(this.UuidWithPattern.ToString()).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UuidWithPattern, must match a pattern of " + regexUuidWithPattern, new [] { "UuidWithPattern" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Client/ClientUtils.cs index 8e33ee2d9b5b..85ec43412716 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -46,7 +46,7 @@ static ClientUtils() /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/Apple.cs index 8b1f87d1aa9a..5e83de8a1546 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/Apple.cs @@ -139,14 +139,14 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Cultivar (string) pattern - Regex regexCultivar = new Regex(@"^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); + Regex regexCultivar = new Regex("^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); if (false == regexCultivar.Match(this.Cultivar).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cultivar, must match a pattern of " + regexCultivar, new [] { "Cultivar" }); } // Origin (string) pattern - Regex regexOrigin = new Regex(@"^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexOrigin = new Regex("^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexOrigin.Match(this.Origin).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Origin, must match a pattern of " + regexOrigin, new [] { "Origin" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/FormatTest.cs index 743b84f13a9b..caa163075e72 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/FormatTest.cs @@ -416,7 +416,7 @@ public override int GetHashCode() } // String (string) pattern - Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexString = new Regex("[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexString.Match(this.String).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); @@ -435,14 +435,14 @@ public override int GetHashCode() } // PatternWithDigits (string) pattern - Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); + Regex regexPatternWithDigits = new Regex("^\\d{10}$", RegexOptions.CultureInvariant); if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigits, must match a pattern of " + regexPatternWithDigits, new [] { "PatternWithDigits" }); } // PatternWithDigitsAndDelimiter (string) pattern - Regex regexPatternWithDigitsAndDelimiter = new Regex(@"^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexPatternWithDigitsAndDelimiter = new Regex("^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexPatternWithDigitsAndDelimiter.Match(this.PatternWithDigitsAndDelimiter).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 2a0e96d6bc0f..0a0750f14ccf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -165,7 +165,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // UuidWithPattern (Guid) pattern - Regex regexUuidWithPattern = new Regex(@"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); + Regex regexUuidWithPattern = new Regex("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); if (false == regexUuidWithPattern.Match(this.UuidWithPattern.ToString()).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UuidWithPattern, must match a pattern of " + regexUuidWithPattern, new [] { "UuidWithPattern" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ClientUtils.cs index 8e33ee2d9b5b..85ec43412716 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -46,7 +46,7 @@ static ClientUtils() /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Apple.cs index 8b1f87d1aa9a..5e83de8a1546 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/Apple.cs @@ -139,14 +139,14 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Cultivar (string) pattern - Regex regexCultivar = new Regex(@"^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); + Regex regexCultivar = new Regex("^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); if (false == regexCultivar.Match(this.Cultivar).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cultivar, must match a pattern of " + regexCultivar, new [] { "Cultivar" }); } // Origin (string) pattern - Regex regexOrigin = new Regex(@"^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexOrigin = new Regex("^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexOrigin.Match(this.Origin).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Origin, must match a pattern of " + regexOrigin, new [] { "Origin" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FormatTest.cs index 743b84f13a9b..caa163075e72 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/FormatTest.cs @@ -416,7 +416,7 @@ public override int GetHashCode() } // String (string) pattern - Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexString = new Regex("[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexString.Match(this.String).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); @@ -435,14 +435,14 @@ public override int GetHashCode() } // PatternWithDigits (string) pattern - Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); + Regex regexPatternWithDigits = new Regex("^\\d{10}$", RegexOptions.CultureInvariant); if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigits, must match a pattern of " + regexPatternWithDigits, new [] { "PatternWithDigits" }); } // PatternWithDigitsAndDelimiter (string) pattern - Regex regexPatternWithDigitsAndDelimiter = new Regex(@"^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexPatternWithDigitsAndDelimiter = new Regex("^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexPatternWithDigitsAndDelimiter.Match(this.PatternWithDigitsAndDelimiter).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 2a0e96d6bc0f..0a0750f14ccf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -165,7 +165,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // UuidWithPattern (Guid) pattern - Regex regexUuidWithPattern = new Regex(@"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); + Regex regexUuidWithPattern = new Regex("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); if (false == regexUuidWithPattern.Match(this.UuidWithPattern.ToString()).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UuidWithPattern, must match a pattern of " + regexUuidWithPattern, new [] { "UuidWithPattern" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-unityWebRequest/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-unityWebRequest/src/Org.OpenAPITools/Client/ClientUtils.cs index 6653454671d2..362905a2e52a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-unityWebRequest/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-unityWebRequest/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -32,7 +32,7 @@ public static class ClientUtils /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs index 8e33ee2d9b5b..85ec43412716 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -46,7 +46,7 @@ static ClientUtils() /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Apple.cs index 8b1f87d1aa9a..5e83de8a1546 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Apple.cs @@ -139,14 +139,14 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Cultivar (string) pattern - Regex regexCultivar = new Regex(@"^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); + Regex regexCultivar = new Regex("^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); if (false == regexCultivar.Match(this.Cultivar).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cultivar, must match a pattern of " + regexCultivar, new [] { "Cultivar" }); } // Origin (string) pattern - Regex regexOrigin = new Regex(@"^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexOrigin = new Regex("^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexOrigin.Match(this.Origin).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Origin, must match a pattern of " + regexOrigin, new [] { "Origin" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs index 743b84f13a9b..caa163075e72 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs @@ -416,7 +416,7 @@ public override int GetHashCode() } // String (string) pattern - Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexString = new Regex("[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexString.Match(this.String).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); @@ -435,14 +435,14 @@ public override int GetHashCode() } // PatternWithDigits (string) pattern - Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); + Regex regexPatternWithDigits = new Regex("^\\d{10}$", RegexOptions.CultureInvariant); if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigits, must match a pattern of " + regexPatternWithDigits, new [] { "PatternWithDigits" }); } // PatternWithDigitsAndDelimiter (string) pattern - Regex regexPatternWithDigitsAndDelimiter = new Regex(@"^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexPatternWithDigitsAndDelimiter = new Regex("^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexPatternWithDigitsAndDelimiter.Match(this.PatternWithDigitsAndDelimiter).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 2a0e96d6bc0f..0a0750f14ccf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -165,7 +165,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // UuidWithPattern (Guid) pattern - Regex regexUuidWithPattern = new Regex(@"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); + Regex regexUuidWithPattern = new Regex("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); if (false == regexUuidWithPattern.Match(this.UuidWithPattern.ToString()).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UuidWithPattern, must match a pattern of " + regexUuidWithPattern, new [] { "UuidWithPattern" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs index 8e33ee2d9b5b..85ec43412716 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -46,7 +46,7 @@ static ClientUtils() /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Apple.cs index 4706c3f55e83..7c02585ec3fd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Apple.cs @@ -127,14 +127,14 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Cultivar (string) pattern - Regex regexCultivar = new Regex(@"^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); + Regex regexCultivar = new Regex("^[a-zA-Z\\s]*$", RegexOptions.CultureInvariant); if (false == regexCultivar.Match(this.Cultivar).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cultivar, must match a pattern of " + regexCultivar, new [] { "Cultivar" }); } // Origin (string) pattern - Regex regexOrigin = new Regex(@"^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexOrigin = new Regex("^[A-Z\\s]*$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexOrigin.Match(this.Origin).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Origin, must match a pattern of " + regexOrigin, new [] { "Origin" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs index 9829a5b138b5..58000bcfd122 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -401,7 +401,7 @@ public override int GetHashCode() } // String (string) pattern - Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexString = new Regex("[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexString.Match(this.String).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); @@ -420,14 +420,14 @@ public override int GetHashCode() } // PatternWithDigits (string) pattern - Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); + Regex regexPatternWithDigits = new Regex("^\\d{10}$", RegexOptions.CultureInvariant); if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigits, must match a pattern of " + regexPatternWithDigits, new [] { "PatternWithDigits" }); } // PatternWithDigitsAndDelimiter (string) pattern - Regex regexPatternWithDigitsAndDelimiter = new Regex(@"^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + Regex regexPatternWithDigitsAndDelimiter = new Regex("^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexPatternWithDigitsAndDelimiter.Match(this.PatternWithDigitsAndDelimiter).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 9fd3973afb81..392d7bc7596e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -153,7 +153,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // UuidWithPattern (Guid) pattern - Regex regexUuidWithPattern = new Regex(@"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); + Regex regexUuidWithPattern = new Regex("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", RegexOptions.CultureInvariant); if (false == regexUuidWithPattern.Match(this.UuidWithPattern.ToString()).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UuidWithPattern, must match a pattern of " + regexUuidWithPattern, new [] { "UuidWithPattern" }); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/ClientUtils.cs index 4e45e6485db0..8aa6221bd12f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -46,7 +46,7 @@ static ClientUtils() /// Filename public static string SanitizeFilename(string filename) { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); + Match match = Regex.Match(filename, ".*[/\\](.*)$"); return match.Success ? match.Groups[1].Value : filename; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Model/Category.cs index e1cd62ca772a..0a47bedfd72c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Model/Category.cs @@ -124,7 +124,7 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // Name (string) pattern - Regex regexName = new Regex(@"^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$", RegexOptions.CultureInvariant); + Regex regexName = new Regex("^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$", RegexOptions.CultureInvariant); if (false == regexName.Match(this.Name).Success) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, must match a pattern of " + regexName, new [] { "Name" });