@boundstate/hapi-api-docs
v0.0.2
Published
Responsive Swagger docs for Hapi
Downloads
4
Readme
hapi-api-docs
Resonsive Swagger documentation for Hapi.
Built using hapi-swagger and jensoleg/swagger-ui.
Usage
npm install @boundstate/hapi-api-docs
import * as Hapi from 'hapi';
import {hapiApiDocs} from '@boundstate/hapi-api-docs';
const server = new Hapi.Server();
server.register({
register: hapiApiDocs,
options: {
basePath: '/',
pkg: require('../package.json'),
schemes: ['http'],
},
}).then((err) => {
});
Tag the routes you wish to document with api
.
Access the documentation at /documentation/
.