@trivia-api/models
Version:
Models for The Trivia API.
40 lines (39 loc) • 1.17 kB
TypeScript
/**
* @openapi
* components:
* schemas:
* TextInputQuestion:
* allOf:
* - $ref: '#/components/schemas/BaseQuestion'
* - type: object
* properties:
* question:
* type: object
* properties:
* text:
* type: string
* description: String formulation of the question
* example: 'What is the chemical symbol for gold?'
* required:
* - text
* correctAnswer:
* type: string
* description: The "gold standard" correct answer
* example: 'Au'
* acceptedAnswers:
* type: array
* description: Cached list of accepted answer variations (only returned if showAnswer=true)
* example: ['Au', 'AU', 'au']
* items:
* type: string
* type:
* type: string
* enum:
* - text_input
* example: 'text_input'
* required:
* - question
* - correctAnswer
* - type
*
*/