@ivamuno/nestjs-openapi
Version:
26 lines (25 loc) • 1.55 kB
TypeScript
import { ExternalDocumentationObject, SecuritySchemeObject } from '@nestjs/swagger/dist/interfaces/open-api-spec.interface';
import { AsyncAPIObject, AsyncSecuritySchemeObject, AsyncServerObject } from './asyncapi.interfaces';
export declare class AsyncApiDocumentBuilder {
private readonly buildDocumentBase;
private readonly logger;
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(name: string, server: AsyncServerObject): this;
setExternalDoc(description: string, url: string): this;
setDefaultContentType(contentType: string): this;
addTag(name: string, description?: string, externalDocs?: ExternalDocumentationObject): this;
addSecurity(name: string, options: AsyncSecuritySchemeObject): 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;
addCookieAuth(cookieName?: string, options?: SecuritySchemeObject, securityName?: string): this;
build(): Omit<AsyncAPIObject, 'components' | 'channels'>;
}