UNPKG

@trivia-api/models

Version:

Models for The Trivia API.

43 lines (42 loc) 1.22 kB
"use strict"; /** * @openapi * components: * schemas: * TextChoiceQuestion: * allOf: * - $ref: '#/components/schemas/BaseQuestion' * - type: object * properties: * question: * type: object * properties: * text: * type: string * description: String formulation of the questions * example: 'What is the capital of France?' * required: * - text * correctAnswer: * type: string * description: The correct answer * example: 'Paris' * incorrectAnswers: * type: array * description: Array of incorrect answers * example: ['London', 'Berlin', 'Brussels'] * items: * type: string * description: An incorrect answer * type: * type: string * enum: * - text_choice * example: 'text_choice' * required: * - question * - correctAnswer * - incorrectAnswers * - type * */