essentials-openapi icon indicating copy to clipboard operation
essentials-openapi copied to clipboard

"MARKDOWN" style does not create tables using the minimum 3 hyphens

Open michael-nok opened this issue 2 years ago • 1 comments

Markdown tables require that we define them using three or more hyphens (---) to create each column’s header. Without three hyphens, certain systems will not interpret this information as a table (for example, DITA-OT transformation to PDF).

Table definition: https://www.markdownguide.org/extended-syntax/#tables

Sample source file: https://github.com/Neoteroi/mkdocs-plugins/blob/main/tests/res/swagger.json

Example command:

oad gen-docs -s json/swagger.json -d docs/swagger.md --style "MARKDOWN"

This is the current Markdown output when using --style "MARKDOWN"

### Cat

| Name | Type |
| -- | -- |                    // This is invalid
| age | integer |
| hunts | boolean |

However, it should in fact be the following:

### Cat

| Name | Type |
| --- | --- |                  // This is valid
| age | integer |
| hunts | boolean |

michael-nok avatar Oct 23 '23 15:10 michael-nok

Hi @michael-nok Thank You for reporting this!

RobertoPrevato avatar Apr 14 '24 06:04 RobertoPrevato