SwaggerSettingsBase
Usage
import { SwaggerSettingsBase } from "@tsed/swagger";
See /packages/specs/swagger/src/types/interfaces/SwaggerSettings.ts.
Overview
interface SwaggerSettingsBase {
path: string;
specVersion?: OpenSpecVersions;
fileName?: string;
hidden?: string;
doc?: string;
cssPath?: string;
jsPath?: string;
viewPath?: string | false;
options?: SwaggerUIOptions;
showExplorer?: boolean;
specPath?: string;
outFile?: string;
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
hidden
hidden?: string;
Hidden documentation. Use this to hide documentation link in the dropdown.
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.
options
options?: SwaggerUIOptions;
SwaggerUI options. See (https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/configuration.md)
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.
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.