swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
17.04k stars 6.03k forks source link

[HTML] doesn't document Arrays or Enums #9231

Closed jonwakingup closed 3 years ago

jonwakingup commented 5 years ago
Description

HTML generated documentation has empty sections for Enum and Array models.

Swagger-codegen version

Generated from SwaggerHub 04/03/2019. I don't know what version they are using.

Swagger declaration file content or url

https://gist.github.com/jonwakingup/e4567d68317f92417f8df43fd0f183b8

The yaml document above, defines an array "DomainArray" on line 55, a "CustomCodes" enum on line 69 and an "HttpStatuses" enum on line 75. These are referred to in the steps to reproduce below.

Command line used for generation

Paste the file above into the Swagger editor at SwaggerHub.
Open the documentation generated from menu option: / Export / Documentation / html

Steps to reproduce

Open the html documentation:

HugoMario commented 3 years ago

I added a new option to generate models for now objects, this is a sample about how to use it:

java -jar ./swagger-codegen-cli.jar generate -l html -i ./input.yaml -o ./output --additional-properties docNoObjects=true