From cd769c317e4ab2f794f45a4f333acafcc08186f8 Mon Sep 17 00:00:00 2001 From: Vishrut Shah Date: Wed, 22 Jun 2016 22:45:26 -0700 Subject: [PATCH] Escapse . in property name for Ruby --- AutoRest/Generators/Ruby/Ruby/RubyCodeNamer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AutoRest/Generators/Ruby/Ruby/RubyCodeNamer.cs b/AutoRest/Generators/Ruby/Ruby/RubyCodeNamer.cs index 3709e888fdb8c..27c05e2fdace5 100644 --- a/AutoRest/Generators/Ruby/Ruby/RubyCodeNamer.cs +++ b/AutoRest/Generators/Ruby/Ruby/RubyCodeNamer.cs @@ -283,9 +283,9 @@ private IType NormalizeCompositeType(CompositeType compositeType) foreach (var property in compositeType.Properties) { property.Name = GetPropertyName(property.GetClientName()); - if (property.SerializedName != null) + if (property.SerializedName != null && !property.WasFlattened()) { - property.SerializedName = property.SerializedName.Replace("\\", "\\\\"); + property.SerializedName = property.SerializedName.Replace(".", "\\\\."); } property.Type = NormalizeTypeReference(property.Type); }