Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 885 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 885 Bytes

SwaggerDoc

Mediawiki extension to provide swagger ui frontend for any swagger specification.

To install, clone the extension and add to LocalSettings.php:

wfLoadExtension('SwaggerDoc');

Usage

To use it, you need to

  • Create a wikipage (for example, MySwaggerJsonSpec page) with swagger spec (json file). You may also want to change wikipage schema to JSON but that is not mandatory
  • On another wikipage insert Swagger doc tag with either specUrl or specUrls arguments:
<SwaggerDoc specUrls="[{'url': 'http://MyWiki/index.php/MySwaggerJsonSpec?action=raw', 'name': 'My swagger spec'}]" />
<SwaggerDoc specUrl="http://MyWiki/index.php/MySwaggerJsonSpec?action=raw" />
  • Save page and refresh it. You will see: Capture