Add spec, plan, and tasks for 016-cancel-event feature

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 18:50:46 +01:00
parent bf0f4ffb7f
commit 3908c89998
8 changed files with 674 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
# OpenAPI additions for Cancel Event feature
# To be merged into backend/src/main/resources/openapi/api.yaml
# PATCH method added to existing /events/{eventToken} path
# Under paths./events/{eventToken}:
# --- Add PATCH method to existing path ---
# /events/{eventToken}:
# patch:
# operationId: patchEvent
# summary: Update an event (currently: cancel)
# description: |
# Partial update of an event resource. Currently the only supported operation
# is cancellation (setting cancelled to true). Requires the organizer token.
# Cancellation is irreversible.
# tags: [Events]
# parameters:
# - $ref: '#/components/parameters/EventToken'
# requestBody:
# required: true
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/PatchEventRequest'
# responses:
# '204':
# description: Event updated successfully
# '403':
# description: Invalid organizer token
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/ErrorResponse'
# '404':
# description: Event not found
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/ErrorResponse'
# '409':
# description: Event is already cancelled
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/ErrorResponse'
# --- New schemas ---
# PatchEventRequest:
# type: object
# required: [organizerToken, cancelled]
# properties:
# organizerToken:
# type: string
# format: uuid
# description: The organizer token proving ownership of the event
# example: "550e8400-e29b-41d4-a716-446655440001"
# cancelled:
# type: boolean
# description: Set to true to cancel the event (irreversible)
# example: true
# cancellationReason:
# type: string
# maxLength: 2000
# description: Optional cancellation reason
# example: "Unfortunately the venue is no longer available."
# --- Extended schema: GetEventResponse ---
# Add to existing GetEventResponse properties:
# cancelled:
# type: boolean
# description: Whether the event has been cancelled
# example: false
# cancellationReason:
# type: string
# nullable: true
# description: Reason for cancellation, if provided
# example: null