UNPKG

summer-glove

Version:

[![npm version](https://img.shields.io/npm/v/npm-package.svg?style=flat)](https://www.npmjs.com/package/summer-glove) ## Fit like a glove 🧤 Summer-glove is a route manager, providing a quick and easy way to configure an express application. Summer-glo

54 lines (53 loc) • 1.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class SwaggerInformationCore { constructor() { this.mappedApi = {}; this.security = {}; this.theme = undefined; this.swaggerConfig = { swagger: "2.0", info: { title: "Default-API", description: "this is auto generated documentation with lib {{lib}}", version: "1.0.0" }, basePath: "/", securityDefinitions: {}, paths: {} }; this.swaggerEndpoint = "/"; } static getInstance() { if (!SwaggerInformationCore.instance) { SwaggerInformationCore.instance = new SwaggerInformationCore(); } return SwaggerInformationCore.instance; } setTheme(theme) { this.theme = theme; } setSwaggerEndpoint(swaggerEndpoint) { this.swaggerEndpoint = swaggerEndpoint; } setSecurity(newSecurity) { this.security = newSecurity; } cleanObjects() { this.mappedApi = {}; this.swaggerConfig = {}; this.swaggerEndpoint = undefined; this.theme = undefined; this.security = {}; } getObjectConfig() { return { mappedApi: this.mappedApi, theme: this.theme, swaggerConfig: this.swaggerConfig, swaggerEndpoint: this.swaggerEndpoint, security: this.security }; } } exports.default = SwaggerInformationCore;