UNPKG

next-rest-framework

Version:

Next REST Framework - write type-safe, self-documenting REST APIs in Next.js

36 lines (35 loc) 1.45 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getConfig = exports.DEFAULT_CONFIG = void 0; const lodash_1 = require("lodash"); const constants_1 = require("../constants"); const logging_1 = require("./logging"); exports.DEFAULT_CONFIG = { openApiSpecOverrides: { openapi: constants_1.OPEN_API_VERSION, info: { title: 'Next REST Framework', description: 'This is an autogenerated OpenAPI spec by Next REST Framework.', version: constants_1.VERSION }, components: {} }, openApiJsonPath: '/api/openapi.json', openApiYamlPath: '/api/openapi.yaml', swaggerUiPath: '/api', deniedPaths: [], allowedPaths: ['**'], swaggerUiConfig: { defaultTheme: 'light', title: 'Next REST Framework | SwaggerUI', description: 'Next REST Framework SwaggerUI', faviconHref: 'https://raw.githubusercontent.com/blomqma/next-rest-framework/main/docs/static/img/favicon.ico', logoHref: 'https://raw.githubusercontent.com/blomqma/next-rest-framework/d02224b38d07ede85257b22ed50159a947681f99/packages/next-rest-framework/logo.svg' }, exposeOpenApiSpec: true, errorHandler: logging_1.logNextRestFrameworkError, suppressInfo: false, generatePathsTimeout: 5000 }; const getConfig = (config) => (0, lodash_1.merge)({}, exports.DEFAULT_CONFIG, config); exports.getConfig = getConfig;