Skip to content

Commit

Permalink
feat: additional swagger documentations (#2767)
Browse files Browse the repository at this point in the history
Co-authored-by: Alon Peretz <8467965+alonp99@users.noreply.github.com>
  • Loading branch information
tomer-shvadron and alonp99 authored Oct 12, 2024
1 parent 26dfffd commit f0708e2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,19 @@ export class OngoingMonitoringCron {
!business.metadata?.featureConfig?.[this.processFeatureName]?.enabled &&
!featureConfig?.options.runByDefault
) {
this.logger.log(`Ongoing monitoring is not enabled for business ${business.id}`);
this.logger.log(
`Ongoing monitoring is not enabled for business ${business.companyName} (id: ${business.id})`,
);

continue;
}

const lastReceivedReport = await this.findLastBusinessReport(business, projectIds);

if (!lastReceivedReport?.reportId) {
this.logger.log(`No initial report found for business: ${business.id}`);
this.logger.log(
`No initial report found for business: ${business.companyName} (id: ${business.id})`,
);

continue;
}
Expand Down Expand Up @@ -118,6 +122,10 @@ export class OngoingMonitoringCron {
},
});

this.logger.log(
`Invoked Ongoing Report for business ${business.companyName} (id: ${business.id})`,
);

ongoingReportsCounter++;
} catch (error) {
this.logger.error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ export class WorkflowDefinitionCreateDto {
@IsString()
definitionType!: string;

@ApiProperty({ required: true, type: Object })
@ApiProperty({
required: true,
type: 'object',
})
@IsNotEmptyObject()
@IsObject()
definition!: Record<string, unknown>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class WorkflowAssignee {

export class WorkflowRuntimeListItemModel {
@Expose()
@ApiProperty()
@ApiProperty({ required: true, type: String })
@IsString()
id!: string;

Expand Down Expand Up @@ -81,17 +81,20 @@ export class WorkflowRuntimeListItemModel {
workflowDefinitionVersion?: number;

@Expose()
@ApiProperty()
@ApiProperty({ required: true, type: String })
@IsString()
workflowDefinitionName!: string;

@Expose()
@ApiProperty()
@ApiProperty({ required: true, type: String })
@IsString()
workflowDefinitionId!: string;

@Expose()
@ApiProperty()
@ApiProperty({
required: true,
type: 'object',
})
@IsNotEmptyObject()
workflowDefinition!: object;

Expand All @@ -101,18 +104,25 @@ export class WorkflowRuntimeListItemModel {
status!: WorkflowRuntimeDataStatus;

@Expose()
@ApiProperty()
@ApiProperty({
required: true,
type: 'object',
})
@IsJSON()
context!: JSON;

@Expose()
@ApiProperty()
@ApiProperty({
required: true,
type: 'object',
})
@IsJSON()
config!: JSON;

@Expose()
@IsNullable()
@IsString()
@ApiProperty({ required: true, type: String })
state!: string | null;

@Expose()
Expand Down

0 comments on commit f0708e2

Please sign in to comment.