Integrate / embed Swagger UI

Out of curiosity, how much hard would it be to integrate Swagger UI in a page, for someone completely new to creating extensions (but with a Java background)?

By looking on the net it seems quite easy to embed it:

I have yet to start reading anything, but if I was going to experiment anything, this looks interesting, as it would make embedding Rest API documentation inside wiki pages.

Would it require a lot of effort? If not, what would you suggest to start with?

Hi, it’s quite easy to do with XWiki. You’ll need to add 2 xobjects:

  • one for the javascript (jsx)
  • one for the css (ssx)

See https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/SkinExtensionsTutorial/

1 Like

Hi, thanks.

Oh, it would end up being an extension to the skin, like in Set (css) style as default for tables (default properties) ?

Can the same be provided by a macro? I’m asking because there may be cases where the actual JSON specifications file isn’t reachable from the client side, but only by the xwiki server - i.e. when the wiki is publicly reachable, but the documentation server is not.