I'm using an <example>
tag to document a variable like this: https://learn.microsoft.com/en-us/dotnet/csharp/codedoc#example
Later, it is being used to generate XML Documentation Swagger relies on.
It works great for numerical or string values. But my variable contains an XML string. As soon as I place xml inside of an <example>
tag, it tries to parse it and fails with the following message: XML comment has badly formed XML
. I've already tried escaping xml string and putting it into braces with no success. Though an exception disappears, swagger defaults to string
instead of showing my example.
Is there any way to use <example>
tags with xml content inside?