From f3cf63e4bb1c9570bff6633677d546bd2686cf82 Mon Sep 17 00:00:00 2001 From: tresjo81 Date: Fri, 25 Sep 2026 20:57:25 +0000 Subject: [PATCH 1/3] fix(bounties): add ParseUUIDPipe validation to repositoryId query param (#356) --- src/bounties/bounties.controller.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bounties/bounties.controller.ts b/src/bounties/bounties.controller.ts index 752f28d..e23b839 100644 --- a/src/bounties/bounties.controller.ts +++ b/src/bounties/bounties.controller.ts @@ -68,7 +68,11 @@ export class BountiesController { difficulty?: BountyDifficulty, @Query('asset', new ParseEnumPipe(AssetType, { optional: true })) asset?: AssetType, - @Query('repositoryId') repositoryId?: string, + @Query( + 'repositoryId', + new ParseUUIDPipe({ version: '4', optional: true }), + ) + repositoryId?: string, @Query('primaryLanguage') primaryLanguage?: string, ) { return this.bountiesService.list({ From ff5972b5a80e5638baadd66d6244f2cfcb7eda78 Mon Sep 17 00:00:00 2001 From: tresjo81 Date: Sat, 26 Sep 2026 03:20:35 +0000 Subject: [PATCH 2/3] fix(dto): require sponsorId and createdById in milestone, pool, and team DTOs (#357) --- src/maintenance-pool/dto/create-pool.dto.ts | 5 ++--- src/milestones/dto/create-milestone.dto.ts | 5 ++--- src/teams/dto/create-team.dto.ts | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/maintenance-pool/dto/create-pool.dto.ts b/src/maintenance-pool/dto/create-pool.dto.ts index 5f428f5..f89b45d 100644 --- a/src/maintenance-pool/dto/create-pool.dto.ts +++ b/src/maintenance-pool/dto/create-pool.dto.ts @@ -17,10 +17,9 @@ export class CreatePoolDto { @IsUUID() repositoryId?: string; - @ApiProperty({ required: false }) - @IsOptional() + @ApiProperty() @IsUUID() - createdById?: string; + createdById: string; /** The sponsor's standing recurring commitment; deposits never overwrite it (#93). */ @ApiProperty({ required: false }) diff --git a/src/milestones/dto/create-milestone.dto.ts b/src/milestones/dto/create-milestone.dto.ts index 11bf599..095f1cb 100644 --- a/src/milestones/dto/create-milestone.dto.ts +++ b/src/milestones/dto/create-milestone.dto.ts @@ -18,10 +18,9 @@ export class CreateMilestoneDto { @IsUUID() repositoryId: string; - @ApiProperty({ required: false }) - @IsOptional() + @ApiProperty() @IsUUID() - sponsorId?: string; + sponsorId: string; @ApiProperty({ maxLength: 200 }) @IsString() diff --git a/src/teams/dto/create-team.dto.ts b/src/teams/dto/create-team.dto.ts index 75acea8..ac6af8d 100644 --- a/src/teams/dto/create-team.dto.ts +++ b/src/teams/dto/create-team.dto.ts @@ -44,10 +44,9 @@ export class CreateTeamDto { @MaxLength(100) name: string; - @ApiProperty({ required: false }) - @IsOptional() + @ApiProperty() @IsUUID() - createdById?: string; + createdById: string; @ApiProperty({ type: [TeamMemberSplitDto] }) @ArrayMinSize(1) From c6b5692e6b29cd469db8a3963d47dc71c6ce54fa Mon Sep 17 00:00:00 2001 From: tresjo81 Date: Sat, 26 Sep 2026 03:25:04 +0000 Subject: [PATCH 3/3] fix(swagger): add ApiProperty decorators to inline controller DTOs (#355) --- src/bounties/bounties.controller.ts | 1 + src/maintenance-pool/maintenance-pool.controller.ts | 6 ++++++ src/milestones/milestones.controller.ts | 5 ++++- src/users/users.controller.ts | 3 ++- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/bounties/bounties.controller.ts b/src/bounties/bounties.controller.ts index e23b839..841eac0 100644 --- a/src/bounties/bounties.controller.ts +++ b/src/bounties/bounties.controller.ts @@ -29,6 +29,7 @@ import { } from '../common/swagger/api-common-responses.decorator'; class FundBountyDto { + @ApiProperty() @IsStellarAddress() funderAddress: string; } diff --git a/src/maintenance-pool/maintenance-pool.controller.ts b/src/maintenance-pool/maintenance-pool.controller.ts index b7fbe99..9b55410 100644 --- a/src/maintenance-pool/maintenance-pool.controller.ts +++ b/src/maintenance-pool/maintenance-pool.controller.ts @@ -25,23 +25,29 @@ import { } from '../common/swagger/api-common-responses.decorator'; class DepositDto { + @ApiProperty() @IsMoneyAmount() amount: string; + @ApiProperty() @IsStellarAddress() funderAddress: string; } class AssignRewardDto { + @ApiProperty() @IsUUID() issueId: string; + @ApiProperty() @IsMoneyAmount() amount: string; + @ApiProperty() @IsStellarAddress() recipientAddress: string; + @ApiProperty({ required: false }) @IsOptional() @IsUUID() recipientId?: string; diff --git a/src/milestones/milestones.controller.ts b/src/milestones/milestones.controller.ts index fdf3307..be4832b 100644 --- a/src/milestones/milestones.controller.ts +++ b/src/milestones/milestones.controller.ts @@ -8,7 +8,7 @@ import { Req, UseGuards, } from '@nestjs/common'; -import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger'; +import { ApiBearerAuth, ApiOperation, ApiProperty, ApiTags } from '@nestjs/swagger'; import { IsOptional, IsUUID } from 'class-validator'; import { Throttle } from '@nestjs/throttler'; import { MilestonesService } from './milestones.service'; @@ -26,14 +26,17 @@ import { } from '../common/swagger/api-common-responses.decorator'; class FundMilestoneDto { + @ApiProperty() @IsStellarAddress() funderAddress!: string; } class ResolveIssueDto { + @ApiProperty() @IsStellarAddress() recipientAddress!: string; + @ApiProperty({ required: false }) @IsOptional() @IsUUID() recipientId?: string; diff --git a/src/users/users.controller.ts b/src/users/users.controller.ts index 08907ae..6674369 100644 --- a/src/users/users.controller.ts +++ b/src/users/users.controller.ts @@ -7,13 +7,14 @@ import { Patch, UseGuards, } from '@nestjs/common'; -import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; +import { ApiBearerAuth, ApiProperty, ApiTags } from '@nestjs/swagger'; import { IsString } from 'class-validator'; import { UsersService } from './users.service'; import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard'; import { ApiInternalErrorResponse } from '../common/swagger/api-common-responses.decorator'; class SetStellarAddressDto { + @ApiProperty() @IsString() stellarAddress: string; }