'How to Stop CodeGen from Modifying XML C# Documentation

I'm using Swagger/OpenAPI CodeGen (4.0.3 for reasons of compatibility after having issues with later versions) to generate C# client code from a v2.0 definition file.

Mostly, this works pretty well, though I need to do some minor pre- and post-processing to get what I need.

One irksome issue, though, is that XML documentation gets messed up. Eg, the definition file has:

      "category": {
      "description": "The category. Available values are <i>Phone</i>, <i>Email</i>, and <i>Other</i>.",
      "type": "string"
    } ...

But the generated C# looks like this:

/// <param name="category">The category. Available values are &lt;i&gt;Phone&lt;/i&gt;, &lt;i&gt;Meeting&lt;/i&gt;, and &lt;i&gt;Other&lt;/i&gt;.</param>

Is there a way to stop this happening, other than doing more pre- or post-processing? I've looked at as many sources of CodeGen options and documentation, general and language specific, as I can find but have so far come up empty-handed.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source