1 | import { OpenAPIObject } from './interfaces';
|
2 | import { ExternalDocumentationObject, ParameterObject, SecurityRequirementObject, SecuritySchemeObject, ServerVariableObject } from './interfaces/open-api-spec.interface';
|
3 | export declare class DocumentBuilder {
|
4 | private readonly logger;
|
5 | private readonly document;
|
6 | setTitle(title: string): this;
|
7 | setDescription(description: string): this;
|
8 | setVersion(version: string): this;
|
9 | setTermsOfService(termsOfService: string): this;
|
10 | setContact(name: string, url: string, email: string): this;
|
11 | setLicense(name: string, url: string): this;
|
12 | addServer(url: string, description?: string, variables?: Record<string, ServerVariableObject>): this;
|
13 | setExternalDoc(description: string, url: string): this;
|
14 | setBasePath(path: string): this;
|
15 | addTag(name: string, description?: string, externalDocs?: ExternalDocumentationObject): this;
|
16 | addExtension(extensionKey: string, extensionProperties: any): this;
|
17 | addSecurity(name: string, options: SecuritySchemeObject): this;
|
18 | addGlobalParameters(...parameters: ParameterObject[]): this;
|
19 | addSecurityRequirements(name: string | SecurityRequirementObject, requirements?: string[]): this;
|
20 | addBearerAuth(options?: SecuritySchemeObject, name?: string): this;
|
21 | addOAuth2(options?: SecuritySchemeObject, name?: string): this;
|
22 | addApiKey(options?: SecuritySchemeObject, name?: string): this;
|
23 | addBasicAuth(options?: SecuritySchemeObject, name?: string): this;
|
24 | addCookieAuth(cookieName?: string, options?: SecuritySchemeObject, securityName?: string): this;
|
25 | build(): Omit<OpenAPIObject, 'paths'>;
|
26 | }
|