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
Labels
Milestone

Comments

@Vaseltior
Copy link

@Vaseltior Vaseltior commented Jan 13, 2015

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

@webron
Copy link
Member

@webron webron commented Jan 13, 2015

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

@Vaseltior
Copy link
Author

@Vaseltior Vaseltior commented Jan 13, 2015

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

@webron
Copy link
Member

@webron webron commented Jan 13, 2015

Try pulling the master and check it again please.

@Vaseltior
Copy link
Author

@Vaseltior Vaseltior commented Jan 13, 2015

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

@webron
Copy link
Member

@webron webron commented Jan 13, 2015

Right, my bad. Try the develop branch.

@Vaseltior
Copy link
Author

@Vaseltior Vaseltior commented Jan 13, 2015

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

@bshamblen bshamblen commented Jan 13, 2015

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
Member

@webron 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

@Vaseltior Vaseltior commented Jan 13, 2015

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

@somethingShiny somethingShiny commented Jan 16, 2015

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 fehguy commented Jan 16, 2015

@somethingShiny will be looking into this shortly.

@somethingShiny
Copy link

@somethingShiny somethingShiny commented Jan 22, 2015

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 fehguy commented Jan 30, 2015

merged into develop_2.0

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

@duncanhall duncanhall commented Feb 9, 2015

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 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

@somethingShiny somethingShiny commented Feb 9, 2015

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.

mohsen1 added a commit to mohsen1/swagger-ui that referenced this issue Feb 25, 2015
@mohsen1 mohsen1 closed this Feb 26, 2015
mohsen1 added a commit that referenced this issue Feb 27, 2015
@rob3c
Copy link

@rob3c 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 mohsen1 commented May 1, 2015

@rob3c Please open a new issue here for response descriptions

@rob3c
Copy link

@rob3c 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants
You can’t perform that action at this time.