Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #7798
Closed
Open
Issue created Oct 23, 2020 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[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).

image

Expected behaviour

Rendering identical to in-place definition (like for bottomColor field).

image

Related issues/PRs

No data.

Suggest a fix

Re-use the code that renders a field representation.

Assignee
Assign to
Time tracking