Skip to content

Commit

Permalink
Merge pull request #16 from apinf/release/0.4.0
Browse files Browse the repository at this point in the history
Release/0.4.0
  • Loading branch information
brylie committed May 18, 2017
2 parents 76c125a + 1ba5502 commit acbce80
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 12 deletions.
63 changes: 63 additions & 0 deletions .versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
accounts-base@1.2.17
accounts-password@1.3.6
allow-deny@1.0.5
apinf:restivus-swagger@0.4.0
babel-compiler@6.18.2
babel-runtime@1.0.1
base64@1.0.10
binary-heap@1.0.10
blaze@2.3.2
blaze-tools@1.0.10
boilerplate-generator@1.0.11
caching-compiler@1.1.9
callback-hook@1.0.10
check@1.2.5
coffeescript@1.0.17
ddp@1.2.5
ddp-client@1.3.4
ddp-common@1.2.8
ddp-rate-limiter@1.0.7
ddp-server@1.3.14
deps@1.0.12
diff-sequence@1.0.7
ecmascript@0.7.3
ecmascript-runtime@0.3.15
ejson@1.0.13
email@1.2.1
geojson-utils@1.0.10
html-tools@1.0.11
htmljs@1.0.11
id-map@1.0.9
jquery@1.11.10
local-test:apinf:restivus-swagger@0.4.0
localstorage@1.0.12
logging@1.1.17
meteor@1.6.1
minimongo@1.0.23
modules@0.8.2
modules-runtime@0.7.10
mongo@1.1.17
mongo-id@1.0.6
nimble:restivus@0.8.7
npm-bcrypt@0.9.2
npm-mongo@2.2.24
observe-sequence@1.0.16
ordered-dict@1.0.9
promise@0.8.8
random@1.0.10
rate-limit@1.0.8
reactive-var@1.0.11
retry@1.0.9
routepolicy@1.0.12
service-configuration@1.0.11
sha@1.0.9
simple:json-routes@2.0.1
spacebars@1.0.12
spacebars-compiler@1.0.13
srp@1.0.10
tinytest@1.0.12
tracker@1.1.3
ui@1.0.11
underscore@1.0.10
webapp@1.3.15
webapp-hashing@1.0.9
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Restivus Swagger plugin
# Restivus Swagger (OpenAPI Specification) plugin

Generate swagger.json for your Restivus API

Expand Down Expand Up @@ -35,7 +35,7 @@ APIV1.swagger = {
},
params: {
// Parameter object definitions to be used in endpoint configurations
// Path and body parameter types supported in v0.2.0
// Path and body parameter types supported in v0.2.0
petId: {
name: "id",
in: "path",
Expand Down Expand Up @@ -82,12 +82,12 @@ APIV1.addSwagger('swagger.json');
```


## Additional Features
## Define paths outside of routes

You can define swagger paths outside of routes. This means you can now do two additional things:
- Write swagger login and logout routes when default authentication is used.
- Have swagger route information written separately from Restivus routes.

In v0.3 there is now the ability to define swaggers paths outside of routes. This means you can now do two additional things:
- Write swagger login and logout routes when default auth is used.
- Have swagger route information written seperately from restivus routes.

In the main swagger object you would do the following:

```
Expand Down Expand Up @@ -123,7 +123,8 @@ APIV1.swagger.meta = {
}
```

In v0.3.2 you can hide routes by adding the option "hidden". See example:
## Hidden routes
You can hide routes by adding the option "hidden". See example:

```
APIV1.addRoute('internalHiddenFromSwagger',
Expand All @@ -138,10 +139,10 @@ APIV1.addRoute('internalHiddenFromSwagger',
}
}
}
```

## Additional Examples
## Security definitions

A brief example of how to generate security definitions for your swagger file:

Expand Down Expand Up @@ -183,7 +184,7 @@ APIV1.swagger.meta = {

With this example you will require both tokens to use any routes defined in your swagger generated file for APIV1. To require one or the other you modify the security properties as such:


```
security : [
{userSecurityToken: []},
Expand Down
2 changes: 1 addition & 1 deletion package.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package.describe({
name: 'apinf:restivus-swagger',
version: '0.3.2',
version: '0.4.0',
summary: 'Generate Swagger doc for API',
git: 'https://github.com/apinf/restivus-swagger',
documentation: 'README.md'
Expand Down

0 comments on commit acbce80

Please sign in to comment.