openapi-generator
openapi-generator copied to clipboard
[BUG] html generator output has unescaped xml
Bug Report Checklist
- [x] Have you provided a full/minimal spec to reproduce the issue?
- [x] Have you validated the input using an OpenAPI validator (example)?
- [x] Have you tested with the latest master to confirm the issue still exists?
- [x] Have you searched for related issues/PRs?
- [x] What's the actual output vs expected output?
Description
HTML generated by the html generator has unescaped XML in the examples section.
Preview:
123456789
doggie
aeiou
aeiou
Code generated:
<pre class="example"><code><pet>
<id>123456789</id>
<name>doggie</name>
<photourls>
<photourls>aeiou</photourls>
</photourls>
<tags>
</tags>
<status>aeiou</status>
</pet></code></pre>
Code expected:
<pre class="example"><code><pet>
<id>123456789</id>
<name>doggie</name>
<photourls>
<photourls>aeiou</photourls>
</photourls>
<tags>
</tags>
<status>aeiou</status>
</pet></code></pre>
openapi-generator version
Latest master. The tool prints 6.2.1-SNAPSHOT
OpenAPI declaration file content or url
modules/openapi-generator/src/test/resources/3_0/petstore.yaml from the repo itself.
Steps to reproduce
java -jar ./modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g html -o /tmp/index.html
Related issues/PRs
Multiple issues related to HTML entities, but none related to unescaped XML, it seems.