Skip to content

Commit

Permalink
Merge pull request #14 from alvarojoao/master
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
supamii authored Jun 16, 2016
2 parents 3b57c68 + 54dd277 commit 9cf8f97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**<br/>
run `actionhero link --name=ah-swagger-plugin` to register the Swagger Plugin in ActionHero v13 <br/> - More information [here](http://www.actionherojs.com/docs/#including-plugins)

**ONLY FOR ACTIONHERO v12.X or lower**<br/>
- Add the plugin to config/plugins.js:<br/>
```javascript
exports['default'] = {
general: function(api){
Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion initializers/swagger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' ],
Expand Down

0 comments on commit 9cf8f97

Please sign in to comment.