[BUG] [HTML] Empty component description
Created by: greatvovan
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
Have you tested with the latest master to confirm the issue still exists? -
Have you searched for related issues/PRs? -
What's the actual output vs expected output? -
Sponsorship to speed up the bug fix: no.
Description
The generator renders incomplete component representation in some cases (see below).
openapi-generator version
5.0.0-beta2 through Docker image openapitools/openapi-generator-cli:v5.0.0-beta2
OpenAPI declaration file content or url
https://gist.github.com/greatvovan/0ce0b4f72b2319b1a8e1b753ac164b0d
Generation Details
generate -i /local/doc/empty-component.yaml -g html -o /local/doc/openapi-generator/html
Steps to reproduce
Just generate using the specification and command above and open index.html in the browser.
You will see that Response
has two fields that are essentially identical, but one of them is described in-place, while another is referred as Color
component. The reasoning behind using a reference is a situation when you use a component in multiple places.
Current behaviour
Only description is rendered (nothing if no description).
Expected behaviour
Rendering identical to in-place definition (like for bottomColor
field).
Related issues/PRs
No data.
Suggest a fix
Re-use the code that renders a field representation.