hapi-swagger-static
Advanced tools
Comparing version
{ | ||
"name": "hapi-swagger-static", | ||
"version": "2.0.0-beta.4", | ||
"version": "2.0.0-beta.5", | ||
"description": "A small companion plugin for `hapi-swagger` or `hapi-swaggered` providing a static html documentation page as hapi route", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -71,2 +71,3 @@ # hapi-swagger-static | ||
| `viewOptions` | `{}` | The options passed to the view via `h.view()`. If your default layout does not provide the Bootstrap 4 CSS resources (Bootstrap's JS is not needed), you should provide a special layout for your template. See the example below. | | ||
| `o2hOptions` | `{}` | The options passed to `openapi2html`. Please refer to [openapi2html](https://github.com/frankthelen/openapi2html#options) for more information. | | ||
@@ -73,0 +74,0 @@ ## View Example |
@@ -19,2 +19,3 @@ const Promise = require('bluebird'); | ||
viewOptions = {}, | ||
o2hOptions = {}, | ||
}) => { | ||
@@ -40,3 +41,3 @@ server.route({ | ||
}); | ||
const html = openapi2html(api); | ||
const html = openapi2html(api, o2hOptions); | ||
// the preferred way is to render the page via `view` | ||
@@ -43,0 +44,0 @@ if (h.view && template) { |
42927
0.47%1268
0.08%139
0.72%