Skip to content

Implement Required Images for V2 Workshop and Competitive Events APIs #1881

@DmyMi

Description

@DmyMi

Overview

Implement mandatory image requirements for V2 workshop and competitive events APIs. Both cover image and at least 1 additional image should be required for V2 APIs, while keeping V1 APIs unchanged.

Backend Tasks

Update V2 Workshop DTOs

  • WorkshopV2CreateRequestDto.cs
  • WorkshopV2Dto.cs
  • WorkshopDraftCreateDto.cs
  • WorkshopDraftUpdateDto.cs

Add required validation attribute for CoverImage and minimum length for ImageFiles.

Update Competitive Event V2 DTOs

Add the same validation attributes to cover image and image files properties. Make sure it is added to draft too when they are added.

Update Workshop Service

Update the CreateV2 method to validate images.

Update Competitive Event Service

Add similar validation logic for V2 competitive events.

Update V2 Workshop Controllers

Ensure V2 endpoints enforce the new validation rules.

Update Competitive Event V2 Controllers

Ensure V2 endpoints enforce the new validation rules.

Update Image Service

Update image validation logic to enforce the new requirements for V2 APIs.

Update Tests

Update existing tests to handle the new required image validation for V2 APIs.

Frontend Tasks

Update V2 Workshop and Draft Form Components

Add required validation for images.

Update Competitive Event V2 Form Components

Add similar required validation for images.

Update Form Validation

Add validation that requires:

  • Cover image
  • At least 1 additional image

Update Image Upload Components

Add required indicators and validation messages for V2 forms.

Update API Services

Add validation before making V2 API calls.

Metadata

Metadata

Assignees

Labels

UIbackendIssue involves backend functionalitypre-releasepriority:highHigh priority tasktaskGeneral technical task

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions