Exploring the functionality of the swagger plugin provided by nestjs, I am eager to try it out.
While it works smoothly when defining a class like CreateUserDto
, my goal is to incorporate types from a third-party library - specifically @adyen/api-library
. This library includes classes such as Notification
and NotificationResponse
, which I would like to use as my request/response dtos. Is this possible with the swagger plugin?
In attempting to inherit from these classes, I created the following:
export class AdyenNotificationDto extends Notification {}
This was saved in
adyen-notification.request.dto.ts
, however, it did not yield the desired results.
If integrating with the third-party library is not feasible, does this mean that I will have to resort to duplication? In other words, would I need to manually create a dto containing all properties from the Notification
class and ensure they are kept in sync moving forward?