Swashbuckle.AspNetCore icon indicating copy to clipboard operation
Swashbuckle.AspNetCore copied to clipboard

[Bug]: 6.6.1 and 6.6.2 the backslash character is doubled in the example

Open pairbit opened this issue 7 months ago • 0 comments

Describe the bug

Commentary on the models. The comment contains line breaks (\r\n)

/// <example><![CDATA[<Doc>Multi\r\nline text</Doc>]]></example>
public string Data { get; set; }

The swagger displays already doubled backslash symbols

[
  {
    "data": "<Doc>Multi\\r\\nline text</Doc>"
  }
]

Expected behavior

In a swagger, backslash characters should not be doubled

[
  {
    "data": "<Doc>Multi\r\nline text</Doc>"
  }
]

Actual behavior

No response

Steps to reproduce

No response

Exception(s) (if any)

No response

Swashbuckle.AspNetCore version

6.6.1 and 6.6.2

.NET Version

net8.0

Anything else?

No response

pairbit avatar Jul 01 '24 19:07 pairbit