0.0.3 • Published 7 years ago

vulcainjs-swagger-ui v0.0.3

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
7 years ago

vulcainjs-swagger-ui

This plugin add swagger-ui to your vulcainjs project.

dependencies license

Installation

$ npm install vulcainjs-swagger-ui

Usage

On the startup.ts file you need to add 2 lines. First on initializeServices method :

initializeServices(container: IContainer) {
    //...
    container.injectSingleton(SwaggerUiService);
    //...
    }

And on onServerStarted :

 onServerStarted(server, adapter) {
        //...
        let swaggerUI = this.container.get<SwaggerUiService>('SwaggerUiService');
        swaggerUI.register(adapter);
        //...
    }

Visualization

The default endpoint is _swagger-ui.

Go to http://localhost:8080/_swagger-ui for seen your api.