diff --git a/README.md b/README.md index 2a85034..3e0e78b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,11 @@ Generate Swagger-UI documentation from Actionhero - `npm install ah-swagger-plugin --save` -Add the plugin to config/plugins.js: +**ONLY FOR ACTIONHERO v13.X**
+run `actionhero link --name=ah-swagger-plugin` to register the Swagger Plugin in ActionHero v13
- More information [here](http://www.actionherojs.com/docs/#including-plugins) + +**ONLY FOR ACTIONHERO v12.X or lower**
+- Add the plugin to config/plugins.js:
```javascript exports['default'] = { general: function(api){ @@ -105,6 +109,7 @@ exports.myAction = { } }; ``` +- You can access the `http://127.0.0.1:8080/public/swagger.html` and see your project's documentation: ![alt tag](https://raw.githubusercontent.com/supamii/ah-swagger-plugin/master/screenshot.png) diff --git a/initializers/swagger.js b/initializers/swagger.js index 24dedd7..fd958bb 100644 --- a/initializers/swagger.js +++ b/initializers/swagger.js @@ -49,7 +49,7 @@ module.exports = { }, host: config.swagger.baseUrl || (serverIp + ':' + serverPort), - actionPath: '/' + (actionUrl || 'swagger'), + //actionPath: '/' + (actionUrl || 'swagger'), basePath: '/' + (actionUrl || 'swagger'), schemes: [ 'http' ], consumes: [ 'application/json' ],