OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.32k stars 6.45k forks source link

[BUG][Asciidoc] Equal sign in Description converted to Unicode #9324

Open ramahmoo opened 3 years ago

ramahmoo commented 3 years ago
Description

Asciidoc generator converts any equal sign in Operation/Parameter description to Unicode i.e. = Customized the Mustasche Templates to use unescapedDescription but still see same behavior in .adoc file. We convert this .adoc file to PDF using Asciidoctor and asciidoctor has no support for Unicode. There decimal codes are supported.

openapi-generator version

5.1.0

OpenAPI declaration file content or url
{
  "description": "Values with possible meanings: green=approved, yellow=pending, e.g., needs additional authentication, red=declined.",
  "enum": [
    "GREEN",
    "YELLOW",
    "RED"
  ],
  "type": "string"
}
Generation Details

in generated adoc file it is

Values with possible meanings: green=approved, yellow=pending, e.g., needs additional authentication, red=declined.
Steps to reproduce

Run asciidoc generator with sample data and see output

wing328 commented 3 years ago

To fix it, we need to use {{{ ... }}} (original value) instead of {{ ... }} (HTML-escaped value) in the templates.

May I know if you've time to contribute a fix?