Swagger 2 had a nice syntax highlighting for json/xml samples.
I might be missing something, but I don't see it in the "Known Issues" section of the README.md, is this planned or is there a way to enable it on swagger-ui 3?
Thanks for bringing it up. As we're focused on OAS3 support, this will not be high on the priority list for now. That said, contributions are always welcome.
npm has some nice react components that handle syntax highlighting: https://www.npmjs.com/search?q=react+syntax+highlighting
a community PR that adds this functionality would be wonderful, and not difficult to implement!
swagger-ui currently uses microlight and has a component named HighlightCode . I tried to modify it with highlight.js and am going through several problems currently:
important and have to be dangerouslySetInnerHTML (maybe in a react way using react-lowlight )visual effect:

馃帀 Implemented in Swagger UI 3.30.0 (PR https://github.com/swagger-api/swagger-ui/pull/6236).
See also the relevant configuration parameters:
https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md#user-content-syntaxhighlight
This works beautifully, thanks to everyone who worked on it. Responses are much more readable now.
Don't mean to be noisy, just wanted to leave some confirmation in the thread for other users searching around. I just upgraded swagger-ui-bundle.js/swagger-ui.css and voila:

The defaults look great.
Most helpful comment
swagger-ui currently uses microlight and has a component named
HighlightCode. I tried to modify it withhighlight.jsand am going through several problems currently:importantand have to bedangerouslySetInnerHTML(maybe in a react way using react-lowlight )visual effect: