OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.82k stars 6.58k forks source link

Generated static HTML documentation looks barebones #2235

Open klingtnet opened 5 years ago

klingtnet commented 5 years ago
Description

The generated HTML documentation looks pretty barebones, ideally it should look like the preview on https://editor.swagger.io/.

I generated the HTML documentation for the petstore example with those two commands:

$ docker run -v /tmp/openapi:/shared --rm -it openapitools/openapi-generator-cli:latest generate --generator-name html --output /shared --input-spec https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml --skip-validate-spec

petstore-html.tar.gz

screenshot-1551117217

$ docker run -v /tmp/openapi:/shared --rm -it openapitools/openapi-generator-cli:latest generate --generator-name html2 --output /shared --input-spec https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml --skip-validate-spec

petstore-html2.tar.gz

screenshot-1551117234

openapi-generator version

Whatever latest is on https://hub.docker.com/r/openapitools/openapi-generator-cli/tags.

OpenAPI declaration file content or url

The petstore example: https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml

Command line used for generation

See docker commands above.

Steps to reproduce

See above.

Suggest a fix/enhancement

Templates need to get some styling.

adamaiken89 commented 4 years ago

Can we generate a static HTML documentation using template like Swagger UI without changing the output files now?

dostuffthatmatters commented 4 years ago

I just discovered the little Button "View Documentation" (marked in yellow) in SwaggerHub.

Bildschirmfoto 2020-04-15 um 23 20 20


This is my editing url: https://app.swaggerhub.com /apis/ HelperLine/BackendAPI/1.0

This is the urls for "view documentation": https://app.swaggerhub.com /apis-docs/ HelperLine/BackendAPI/1.0

I'm actually just using a plain redirect. But I totally agree with you, that the plain html export is not that great :/


This is how the page looks: :)

Bildschirmfoto 2020-04-15 um 23 28 15