Neoteroi / essentials-openapi

Functions to handle OpenAPI Documentation.
MIT License
23 stars 9 forks source link

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

Open michael-nok opened 11 months ago

michael-nok commented 11 months ago

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 |
RobertoPrevato commented 5 months ago

Hi @michael-nok Thank You for reporting this!