UNPKG

@nestjs/swagger

Version:

Nest - modern, fast, powerful node.js web framework (@swagger)

22 lines (21 loc) 1.28 kB
import { OpenAPIObject } from './interfaces'; import { ExternalDocumentationObject, SecuritySchemeObject, ServerVariableObject } from './interfaces/open-api-spec.interface'; export declare class DocumentBuilder { private readonly document; setTitle(title: string): this; setDescription(description: string): this; setVersion(version: string): this; setTermsOfService(termsOfService: string): this; setContact(name: string, url: string, email: string): this; setLicense(name: string, url: string): this; addServer(url: string, description?: string, variables?: Record<string, ServerVariableObject>): this; setExternalDoc(description: string, url: string): this; addTag(name: string, description?: string, externalDocs?: ExternalDocumentationObject): this; addSecurity(name: string, options: SecuritySchemeObject): this; addSecurityRequirements(name: string, requirements?: string[]): this; addBearerAuth(options?: SecuritySchemeObject, name?: string): this; addOAuth2(options?: SecuritySchemeObject, name?: string): this; addApiKey(options?: SecuritySchemeObject, name?: string): this; addBasicAuth(options?: SecuritySchemeObject, name?: string): this; build(): Omit<OpenAPIObject, 'components' | 'paths'>; }