FIX: Swagger

This commit is contained in:
Victor Radael
2022-08-12 16:21:26 -03:00
parent 372fc74bcb
commit 35abb24ea7
+46 -3
View File
@@ -69,6 +69,49 @@ export class ConnectionDto implements Connection {
image_url: string;
}
export class ConnectionToCatalogDto implements ConnectionToCatalog {
// ---Automatically generated information will not be sent by the frontend--- //
@ApiProperty()
id: string;
@ApiProperty()
customer_id: string;
@ApiProperty()
updated_at: string;
@ApiProperty()
created_at: string;
// ---Information sent by the frontend--- //
@ApiProperty()
name: string;
@ApiProperty()
description: string;
@ApiProperty()
type: string;
@ApiPropertyOptional()
network_config_id: string | null;
// ---Information sent by the frontend (Heirs of Connector)--- //
@ApiProperty()
connector_id: string;
@ApiProperty()
connector_name: string;
@ApiProperty()
plugin: string;
@ApiProperty()
image_url: string;
}
export class CreateConnectionDto extends OmitType(ConnectionDto, [
'id',
'customer_id',
@@ -88,7 +131,7 @@ export class UpdateConnectionDto extends PickType(ConnectionDto, [
export class ConnectionsRes implements GetAllConnectionResponse {
@ApiProperty()
connections: ConnectionToCatalog[];
connections: ConnectionToCatalogDto[];
@ApiProperty()
message: string;
@@ -96,7 +139,7 @@ export class ConnectionsRes implements GetAllConnectionResponse {
export class ConnectionRes implements GetConnectionResponse {
@ApiProperty()
connection?: ConnectionToCatalog;
connection?: ConnectionToCatalogDto;
@ApiProperty()
message: string;
@@ -104,7 +147,7 @@ export class ConnectionRes implements GetConnectionResponse {
export class ConnectionDetailsRes implements GetConnectionDetailsResponse {
@ApiProperty()
connection?: Connection;
connection?: ConnectionDto;
@ApiProperty()
message: string;