Mediawiki extension to provide swagger ui frontend for any swagger specification.
To install, clone the extension and add to LocalSettings.php:
wfLoadExtension('SwaggerDoc');
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
- Alternatively, you can upload your spec as a file
- On another wikipage insert Swagger doc tag with either specUrl or specUrls arguments.
Please note that URL should be a link to the raw JSON (not to a page containing it); typically that is achievable by adding?action=raw
to the URL:
<SwaggerDoc specUrls="[{'url': 'http://MyWiki/index.php/MySwaggerJsonSpec?action=raw', 'name': 'My swagger spec'}]" />
<SwaggerDoc specUrl="http://MyWiki/index.php/MySwaggerJsonSpec?action=raw" />