Add GET /events/{token} endpoint and timezone field to OpenAPI spec
OpenAPI: new GetEventResponse schema, timezone on Create request/response. Liquibase: add timezone VARCHAR(64) NOT NULL DEFAULT 'UTC' column. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,34 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ValidationProblemDetail"
|
||||
|
||||
/events/{token}:
|
||||
get:
|
||||
operationId: getEvent
|
||||
summary: Get public event details by token
|
||||
tags:
|
||||
- events
|
||||
parameters:
|
||||
- name: token
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Public event token
|
||||
responses:
|
||||
"200":
|
||||
description: Event found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/GetEventResponse"
|
||||
"404":
|
||||
description: Event not found
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ProblemDetail"
|
||||
|
||||
components:
|
||||
schemas:
|
||||
CreateEventRequest:
|
||||
@@ -44,6 +72,7 @@ components:
|
||||
required:
|
||||
- title
|
||||
- dateTime
|
||||
- timezone
|
||||
- expiryDate
|
||||
properties:
|
||||
title:
|
||||
@@ -58,6 +87,10 @@ components:
|
||||
format: date-time
|
||||
description: Event date and time with UTC offset (ISO 8601)
|
||||
example: "2026-03-15T20:00:00+01:00"
|
||||
timezone:
|
||||
type: string
|
||||
description: IANA timezone of the organizer
|
||||
example: "Europe/Berlin"
|
||||
location:
|
||||
type: string
|
||||
maxLength: 500
|
||||
@@ -74,6 +107,7 @@ components:
|
||||
- organizerToken
|
||||
- title
|
||||
- dateTime
|
||||
- timezone
|
||||
- expiryDate
|
||||
properties:
|
||||
eventToken:
|
||||
@@ -93,11 +127,61 @@ components:
|
||||
type: string
|
||||
format: date-time
|
||||
example: "2026-03-15T20:00:00+01:00"
|
||||
timezone:
|
||||
type: string
|
||||
description: IANA timezone of the organizer
|
||||
example: "Europe/Berlin"
|
||||
expiryDate:
|
||||
type: string
|
||||
format: date
|
||||
example: "2026-06-15"
|
||||
|
||||
GetEventResponse:
|
||||
type: object
|
||||
required:
|
||||
- eventToken
|
||||
- title
|
||||
- dateTime
|
||||
- timezone
|
||||
- attendeeCount
|
||||
- expired
|
||||
properties:
|
||||
eventToken:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Public event token
|
||||
example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
|
||||
title:
|
||||
type: string
|
||||
description: Event title
|
||||
example: "Summer BBQ"
|
||||
description:
|
||||
type: string
|
||||
description: Event description (absent if not set)
|
||||
example: "Bring your own drinks!"
|
||||
dateTime:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Event date/time with organizer's UTC offset
|
||||
example: "2026-03-15T20:00:00+01:00"
|
||||
timezone:
|
||||
type: string
|
||||
description: IANA timezone name of the organizer
|
||||
example: "Europe/Berlin"
|
||||
location:
|
||||
type: string
|
||||
description: Event location (absent if not set)
|
||||
example: "Central Park, NYC"
|
||||
attendeeCount:
|
||||
type: integer
|
||||
minimum: 0
|
||||
description: Number of confirmed attendees (attending=true)
|
||||
example: 12
|
||||
expired:
|
||||
type: boolean
|
||||
description: Whether the event's expiry date has passed
|
||||
example: false
|
||||
|
||||
ProblemDetail:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
Reference in New Issue
Block a user