How to use the @tsed/swagger.Deprecated function in @tsed/swagger

To help you get started, we’ve selected a few @tsed/swagger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TypedProject / ts-express-decorators / test / integration / app / controllers / calendars / CalendarCtrl.ts View on Github external
model.name = "test";

    return model;
  }

  /**
   * Test the Header decorators.
   * @param request
   * @returns {{id: any, name: string}}
   */
  @Get("/headers")
  @Header("x-token-test", "test")
  @Header("x-token-test-2", "test2")
  @Status(200)
  @ContentType("application/xml")
  @Deprecated()
  testResponseHeader(@Request() request: Express.Request) {
    return "";
  }

  @Post("/documents")
  testMultipart(@MultipartFile("files") files: any[]) {
    return files;
  }

  @Post("/documents/1")
  @MulterFileSize(2048)
  testMultipart2(@MultipartFile("file1") file: any) {
    console.log("====>", file);

    return "DONE";
  }