/** * @swagger * components: * schemas: * SubmissionRequest: * type: object * properties: * answers: * type: array * items: * type: object * properties: * eventQuestionId: * type: integer * example: 12 * songId: * type: integer * nullable: true * description: SONG_PICK only * ratings: * type: array * description: SONG_RATING only * items: * type: object * properties: * songId: * type: integer * rating: * type: integer * minimum: 1 * maximum: 5 * text: * type: string * nullable: true * description: FREE_TEXT only * guestBook: * type: object * nullable: true * properties: * displayName: * type: string * nullable: true * message: * type: string * nullable: true * newsletter: * type: object * nullable: true * properties: * firstName: * type: string * lastName: * type: string * email: * type: string * website: * type: string * description: Honeypot field. Must stay empty; a real visitor never fills it in. * SubmissionResponse: * type: object * properties: * submissionId: * type: integer * example: 91 * newsletterDropped: * type: boolean * description: True if the newsletter opt-in was present but failed validation (e.g. a malformed email) - the rest of the submission still saved. */ export interface RatingInput { songId: number; rating: number; } export interface AnswerInput { eventQuestionId: number; songId?: number; ratings?: RatingInput[]; text?: string; } export interface GuestBookInput { displayName?: string; message?: string; } export interface NewsletterInput { firstName: string; lastName: string; email: string; } export interface SubmissionRequestBody { answers?: AnswerInput[]; guestBook?: GuestBookInput; newsletter?: NewsletterInput; website?: string; }