From d93c5f976c9d13154507f65e9b940f3a217dec2b Mon Sep 17 00:00:00 2001 From: Timo Behrmann Date: Mon, 17 Aug 2015 16:38:18 +0200 Subject: [PATCH] defaultTags --- README.md | 2 +- lib/index.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 286d320..31f3a43 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ npm install hapi-swaggered-ui * `defaultValue`: string, default value of the api-key field * `placeholder`: string, placeholder of the api-key field * `auth`: object, auth options as specified in [route options (hapi docs)](https://github.com/hapijs/hapi/blob/master/API.md#route-options), will be applied to all registered plugin routes - +* `defaultTags`: array of strings, will be passed to the specs endpoint through the query param 'tags' ([hapi-swaggered feature: tag filtering](https://github.com/z0mt3c/hapi-swaggered#tag-filtering)) ## Example Since [hapi-swaggered](https://github.com/z0mt3c/hapi-swaggered) exposes its plugin configuration hapi-swaggered-ui should find it's swagger endpoint automatically. In case you want to use hapi-swaggered-ui without hapi-swaggered (or the auto-detection doesn't work) you can manually set the swagger endpoint by the swaggerEndpoint option. In addition the page title can be changed through the option title. diff --git a/lib/index.js b/lib/index.js index ab02003..1a38c31 100644 --- a/lib/index.js +++ b/lib/index.js @@ -7,6 +7,7 @@ var packageInfo = require('../package.json') var optionsSchema = Joi.object({ title: Joi.string().required(), + defaultTags: Joi.array().items(Joi.string()).optional(), path: Joi.string().optional(), basePath: Joi.string().optional(), swaggerEndpoint: Joi.string().optional(),