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

Swagger UI doesn't handle GFM #825

Closed
Vaseltior opened this issue Jan 13, 2015 · 19 comments
Closed

Swagger UI doesn't handle GFM #825

Vaseltior opened this issue Jan 13, 2015 · 19 comments
Milestone

Comments

@Vaseltior
Copy link

Swagger Spec 2.0 specify that description fields now accept GFM. But Swagger UI does not format it.

@webron
Copy link
Contributor

webron commented Jan 13, 2015

Did you try the latest master, because #824 was merged a few hours ago.

@Vaseltior
Copy link
Author

No I got the yesterday version. I'll tell you in few minutes

@webron
Copy link
Contributor

webron commented Jan 13, 2015

Try pulling the master and check it again please.

@Vaseltior
Copy link
Author

There is no lib/marked.js on the master branch...

@webron
Copy link
Contributor

webron commented Jan 13, 2015

Right, my bad. Try the develop branch.

@Vaseltior
Copy link
Author

ok, pulled from develop... rebuilt so that the marked.js is available in the dist directory.... But it only strips
out all the markdown tags * and _ but there is no visible emphasis :-/

@bshamblen
Copy link

The reset.less file removes a lot of the formatting natively used by markdown. There were already several manual fixes for the .markdown class in the specs.less file, so I didn't add any additional formatting. I can add more if there are specific styles you'd like to have implemented.

A good portion of this css file would fix a lot of the problems, I'd just have to wrap most of this under the .markdown class:

https://gist.github.com/tuzz/3331384

@webron
Copy link
Contributor

webron commented Jan 13, 2015

@Vaseltior - for future reference, editing a comment doesn't send a notification, and I was unaware of your input until @bshamblen added his comment. It's normally better to just add a new comment.

@Vaseltior
Copy link
Author

Ok, I'll know that. Strong works, italic does not indeed since the <em> tag is reset.

@fehguy fehguy added this to the v2.1.0-M1 milestone Jan 16, 2015
@somethingShiny
Copy link

I am also on the develop branch and am having some issues with GFM. The only features I have been able to use properly are bold, links, and strikethrough. Swagger-editor shows more features including italics and tables working properly, but using them in my spec is not rendered as it should be on swagger ui,

@fehguy
Copy link
Contributor

fehguy commented Jan 16, 2015

@somethingShiny will be looking into this shortly.

@somethingShiny
Copy link

Just some followup/clarification: After messing around, I've found that most features of GFM work fine in the description from the info for the spec. Where it does not work is the description for a method on any path.

@fehguy
Copy link
Contributor

fehguy commented Jan 30, 2015

merged into develop_2.0

@fehguy fehguy closed this as completed Jan 30, 2015
@duncanhall
Copy link

Just wanted to get clarification on exactly which MD syntax is supposedly now supported, as the develop_2.0 branch still seems to lack support for many features which are available in the swagger editor.

For example, headers, tables and italics seem don't seem to be working.

@fehguy
Copy link
Contributor

fehguy commented Feb 9, 2015

@duncanhall let's get a complete list of places where GFM is not supported, where the spec says it is. If you can list them all here, we can get them all implemented. It'd be very helpful.

@fehguy fehguy reopened this Feb 9, 2015
@somethingShiny
Copy link

Here's a basic sample spec listing what is supported and where that I've tried.

{
  "swagger": "2.0",
  "info": {
    "title": "sampleSpec",
    "description": "Working: Bold, links, url-autolinking, strikethrough, tables, lists (unordered), syntax highlighting, multiple underscores within words not being parsed as italics, headings, inline code formatting.
      Not working: italics, numbered lists, "
  },
  "paths": {
    "/sample/path": {
      "description": "Working: Bold, strikethrough, links, url-autolinking"
    }
  }
}

I know this isn't complete as it doesn't test things like parameter or response descriptions but it's what I've been able to test so far. If I get a chance to test more areas I'll post another comment listing what is supported there.

@rob3c
Copy link

rob3c commented May 1, 2015

Hi,
I see this is closed, but response descriptions don't seem to support GFM in v2.1.1-M2 even though they're also mentioned in the spec:

https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#response-object

Cheers,
Robert

@mohsen1
Copy link
Contributor

mohsen1 commented May 1, 2015

@rob3c Please open a new issue here for response descriptions

@rob3c
Copy link

rob3c commented May 2, 2015

@mohsen1 Ok, I made one for Response Object GFM support:
#1233

and also one for Tag Object GFM support:
#1234

Jonahss pushed a commit to eaze/swagger-ui that referenced this issue Aug 12, 2016
Jonahss pushed a commit to eaze/swagger-ui that referenced this issue Aug 12, 2016
vincent-zurczak pushed a commit to roboconf/swagger-ui that referenced this issue Aug 18, 2016
vincent-zurczak pushed a commit to roboconf/swagger-ui that referenced this issue Aug 18, 2016
JuanSW18 pushed a commit to Digital-Paw/digital-paw-swagger-ui that referenced this issue Aug 23, 2024
JuanSW18 pushed a commit to Digital-Paw/digital-paw-swagger-ui that referenced this issue Aug 23, 2024
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

8 participants