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

[APIDocs] Table not showing properly when it includes code snippet #5756

Closed
dhmlau opened this issue Jun 16, 2020 · 2 comments
Closed

[APIDocs] Table not showing properly when it includes code snippet #5756

dhmlau opened this issue Jun 16, 2020 · 2 comments
Assignees
Milestone

Comments

@dhmlau
Copy link
Member

dhmlau commented Jun 16, 2020

In https://loopback.io/doc/en/lb4/apidocs.rest.openapispecoptions.html, the table for the properties is not shown properly, see screen shot below:

Screen Shot 2020-06-16 at 3 48 23 PM

Discovered this during a meeting with @raymondfeng and @bajtos, the issue might be because there's a code snippet inside a table in tsdocs.

Fix tip: Use the @remarks TSdoc notation

@jannyHou
Copy link
Contributor

  • @example and @remarks won't work, after parsing, code just disappears.
   * @example
   * ```
   * {
   *   '/openapi.json': {version: '3.0.0', format: 'json'},
   *   '/openapi.yaml': {version: '3.0.0', format: 'yaml'},
   * }
   * ```

   * @remarks
   * ```
   * {
   *   '/openapi.json': {version: '3.0.0', format: 'json'},
   *   '/openapi.yaml': {version: '3.0.0', format: 'yaml'},
   * }
   * ```

And adding empty line between the @remarks and code won't work either.

@jannyHou jannyHou closed this as completed Aug 4, 2020
@jannyHou
Copy link
Contributor

jannyHou commented Aug 4, 2020

Close as PR merged.

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

No branches or pull requests

2 participants