Skip to content

SwaggerService

@tsed/swagger

Usage

typescript
import { SwaggerService } from "@tsed/swagger";

See /packages/specs/swagger/src/types/services/SwaggerService.ts.

Overview

ts
class SwaggerService {
    protected platform: Platform;
    constructor();
    getOpenAPISpec(conf: SwaggerOS3Settings): Promise<OpenSpec3>;
    getOpenAPISpec(conf: SwaggerOS2Settings): Promise<OpenSpec2>;
    getOpenAPISpec(conf: SwaggerSettings): Promise<OpenSpec2>;
}

protected platform

ts
protected platform: Platform;

getOpenAPISpec

ts
getOpenAPISpec(conf: SwaggerOS3Settings): Promise<OpenSpec3>;

Generate Spec for the given configuration

getOpenAPISpec

ts
getOpenAPISpec(conf: SwaggerOS2Settings): Promise<OpenSpec2>;

getOpenAPISpec

ts
getOpenAPISpec(conf: SwaggerSettings): Promise<OpenSpec2>;

Released under the MIT License.