-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Markdown not rendered #2745
Comments
I have the same issue with markdown in property descriptions. The old Swagger UI did render markdown in situations like this:
The old Swagger UI did render the markdown as expected, but Swagger UI 3 displays it as plain text. |
Any fix for this? I have a bunch of Swagger files with MarkDown that I need to display in Swagger UI 3 |
Not yet. Contributions are welcome. |
Will Swagger UI 3.x support Github Flavored Markdown (GFM) to fulfill the Swagger 2.0 specification, or will it support CommonMark to fulfill the OpenAPI 3.0 specification? Background of the question is that @jonathanhuet's example uses GFM table markdown with pipe symbols which isn't part of CommonMark. |
No explicit plans. Likely GFM for 2.0 and CommonMark for 3.0. |
Markdown is also not supported in definitions: swagger: '2.0'
info:
version: 0.0.0
title: Simple API
paths:
/:
get:
description: GFM is supported here. **bold** *italic*
responses:
'200':
description: OK
schema:
$ref: "#/definitions/TestType"
definitions:
TestType:
type: object
description: GFM is not supported here, though it should be. **bold** *italic* |
I'm seeing Markdown conversion work OK in descriptions in models, responses, etc. in 3.6.1 |
It is not being rendered for a request body schema property description.
|
There is now a GFM extension for CommonMark that could be utilized to get table support in OAS 3 spec files: https://github.com/github/cmark-gfm |
FYI to commenters and readers, we've enabled support for GFM tables on top of Commonmark for OpenAPI 3: #5224 The original issue here is still open. |
@mschmidt98 Swagger Editor uses Swagger UI for the rendering, so the result should be the same. Since you've mentioned you use a component from Swashbuckle, it's likely that whatever is provided there is a different version (which we don't control). Your best bet is to try integrating the latest version directly instead. |
The Swashbuckle release history hints, that the currently embedded version of swagger ui is 3.24.3. |
@mschmidt98 I've just tried with the latest version (3.25.0) and cannot reproduce the issue. |
In responses, the markdown is not rendered
Current result:
You can see that the MD is not rendered
Expected result
the MD is rendered. Image from the editor , but rendering was similar in previous version of Swagger UI
How to reproduce
Paste this code in YAML API spec
And use it as response
Notes
The text was updated successfully, but these errors were encountered: