OpenAPITools / OpenAPITools/openapi-generator

[BUG] how to avoid generator to escape the characters for the description of parameters?

Open
#11,349 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Hi, how to avoid generator to escape the characters for the description of parameters?
for example, I have a description in yaml spec file, like this

'Should be used only if `pageNo=1`.'

the generated the comments for that parameter is

'Should be used only if `pageNo=1`'

The character ` and = are escaped to html character code. Is there anyway to avoid this behavior?
I am using typescript-axios generator

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the typescript-axios generator's handling of parameter descriptions and reproduce the YAML example from the issue. Trace where backticks and equals signs become HTML entities, then verify that generated parameter comments preserve the intended characters without breaking other descriptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
api, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.