OpenApiSettingsBase
Usage
import { OpenApiSettingsBase } from "@tsed/openapi-utils";See /packages/specs/openapi-utils/src/interfaces/OpenApiSettings.ts.
Overview
interface OpenApiSettingsBase {
path: string;
specVersion?: OpenSpecVersions;
fileName?: string;
doc?: string;
cssPath?: string;
jsPath?: string;
viewPath?: string | false;
showExplorer?: boolean;
specPath?: string;
outFile?: string;
hidden?: boolean;
sortPaths?: boolean;
operationIdFormatter?: (name: string, propertyKey: string, path: string) => string;
operationIdPattern?: string;
disableSpec?: boolean;
pathPatterns?: string[];
}path
path: string;The url subpath to access to the documentation.
specVersion
specVersion?: OpenSpecVersions;Specify the spec version you want to generate.
fileName
fileName?: string;Swagger file name. By default swagger.json
doc
doc?: string;The documentation key used by @Docs decorator to create several swagger documentations.
cssPath
cssPath?: string;The path to the CSS file.
jsPath
jsPath?: string;The path to the JS file.
viewPath
viewPath?: string | false;The path to the ejs file to create html page.
showExplorer
showExplorer?: boolean;Display the search field in the navbar.
specPath
specPath?: string;Load the base spec documentation from the specified path.
outFile
outFile?: string;Write the swagger.json spec documentation on the specified path.
hidden
hidden?: boolean;Display the documentation in the browser.
sortPaths
sortPaths?: boolean;Sort paths by alphabetical order
operationIdFormatter:
operationIdFormatter?: (name: string, propertyKey: string, path: string) => string;A function to generate the operationId.
operationIdPattern
operationIdPattern?: string;A pattern to generate the operationId. Format of operationId field (%c: class name, %m: method name).
disableSpec
disableSpec?: boolean;pathPatterns
pathPatterns?: string[];Include only controllers whose paths match the pattern list provided.