Skip to content

Commit 7be748f

Browse files
author
Artem
committed
Fix workbench models to expose required fields
1 parent bab0e99 commit 7be748f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

redisinsight/api/src/common/models/endpoint.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ApiProperty } from '@nestjs/swagger';
22
import { IsInt, IsNotEmpty, IsString } from 'class-validator';
3-
import { Type } from 'class-transformer';
3+
import { Expose, Type } from 'class-transformer';
44

55
export class Endpoint {
66
@ApiProperty({
@@ -12,6 +12,7 @@ export class Endpoint {
1212
})
1313
@IsNotEmpty()
1414
@IsString({ always: true })
15+
@Expose()
1516
host: string;
1617

1718
@ApiProperty({
@@ -22,5 +23,6 @@ export class Endpoint {
2223
@IsNotEmpty()
2324
@IsInt({ always: true })
2425
@Type(() => Number)
26+
@Expose()
2527
port: number;
2628
}

redisinsight/api/src/modules/cli/dto/cli.dto.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
MaxLength,
1111
ValidateNested,
1212
} from 'class-validator';
13-
import { Type } from 'class-transformer';
13+
import { Expose, Type } from 'class-transformer';
1414
import { Endpoint } from 'src/common/models';
1515
import {
1616
CliOutputFormatterTypes,
@@ -80,6 +80,7 @@ export class ClusterSingleNodeOptions extends Endpoint {
8080
})
8181
@IsBoolean()
8282
@IsDefined()
83+
@Expose()
8384
enableRedirection: boolean;
8485
}
8586

0 commit comments

Comments
 (0)