Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty table cells in markdown when using additionalProperties #10

Open
farshidtz opened this issue Nov 28, 2018 · 1 comment
Open

Empty table cells in markdown when using additionalProperties #10

farshidtz opened this issue Nov 28, 2018 · 1 comment

Comments

@farshidtz
Copy link

I use additionalProperties to define a dictionary as suggested here.

When the dictionary value is object, the resulting markdown will have rows for summaryAsHTML , descriptionAsHTML, generatedExample with empty cells in Type and Description columns. This somehow breaks the HTML parsing of the table.

openapi: 3.0.0

info:
  description: Test specs
  version: "0.0.0"
  title: Test specs

paths:
  /test:
    get:
      summary: retrieves a dictionary
      responses:
        '200':
          description: success response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: object
                  properties:
                    x:
                      type: string
                    y:
                      type: string
# Test specs

Test specs

## Table of Contents

* [Paths](#paths)
  - [`GET` /test](#op-get-test) 
* [Schemas](#schemas)




## Paths


### `GET` /test
<a id="op-get-test" />

> retrieves a dictionary








#### Responses


##### ▶ 200 - success response

###### Headers
_No headers specified_

###### application/json



<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
      <th>Accepted values</th>
    </tr>
  </thead>
  <tbody>
      <tr>
        <td>Response</td>
        <td>
          object
        </td>
        <td></td>
        <td><em>Any</em></td>
      </tr>
      <tr>
        <td>Response.x</td>
        <td>
          string
        </td>
        <td></td>
        <td><em>Any</em></td>
      </tr>
      <tr>
        <td>Response.y</td>
        <td>
          string
        </td>
        <td></td>
        <td><em>Any</em></td>
      </tr>
      <tr>
        <td>Response.summaryAsHTML</td>
        <td>
          
        </td>
        <td></td>
        <td><em>Any</em></td>
      </tr>
      <tr>
        <td>Response.descriptionAsHTML</td>
        <td>
          
        </td>
        <td></td>
        <td><em>Any</em></td>
      </tr>
      <tr>
        <td>Response.generatedExample</td>
        <td>
          
        </td>
        <td></td>
        <td><em>Any</em></td>
      </tr>
  </tbody>
</table>



</div>

Any suggestions?

@fmvilas
Copy link
Collaborator

fmvilas commented Apr 29, 2019

Sorry, for some reason I missed this issue.

The reason is that the template doesn't iterate over additionalProperties and thus you don't get them. It would be just a matter of fixing the Markdown template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants