Swashbuckle.Tests/Swagger/XmlTextHelperTests.cs
/// <summary>
/// NB: Having a code block as the first line means it can't discern the indentation correctly
/// </summary>
Having a code block as the first line means it can't discern the indentation correctly
Having a code block as the first line means it can ' t discern the indentation correctly
[Test]
        public void XmlComment_handles_code_on_the_first_line_poorly()
        {
            string input = @"
    POST /api/test
    {
      ""prop1"": {
        ""name"": ""value"",
        ...
      },
      ""prop2"": {
        ""name"": ""value"",
        ...
      }
    }
";
            string expectedButUndesired = 
@"POST /api/test
{
  ""prop1"": {
    ""name"": ""value"",
    ...
  },
  ""prop2"": {
    ""name"": ""value"",
    ...
  }
}";
            string actual = XmlTextHelper.NormalizeIndentation(input);
            Assert.AreEqual(expectedButUndesired, actual);
        }
[ Test ] public void XmlComment_handles_code_on_the_first_line_poorly ( ) { string input = @"
    POST /api/test
    
    {
      ""prop1"": {
        ""name"": ""value"",
        ...
      },
      ""prop2"": {
        ""name"": ""value"",
        ...
      }
    }
" ; string expectedButUndesired = @"POST /api/test

{
  ""prop1"": {
    ""name"": ""value"",
    ...
  },
  ""prop2"": {
    ""name"": ""value"",
    ...
  }
}" ; string actual = XmlTextHelper . NormalizeIndentation ( input ) ; Assert . AreEqual ( expectedButUndesired , actual ) ; }
NB: Having a code block as the first line means it can't discern the indentation correctly
NB : Having a code block as the first line means it can ' t discern the indentation correctly