@trivia-api/models
Version:
Models for The Trivia API.
53 lines (52 loc) • 1.75 kB
JavaScript
"use strict";
/**
* @openapi
*
* components:
* schemas:
* BaseQuestion:
* type: object
* properties:
* category:
* type: string
* $ref: '#/components/schemas/Category'
* id:
* type: string
* description: Unique identifier for the question
* example: "5f9f1b9b0e1b9c0017a5f1a5"
* tags:
* type: array
* description: Secondary categories for the question. More freeform than category (can take any value), and can have multiple tags per question.
* items:
* type: string
* example: ["france", "geography", "capital_cities", "cities"]
* difficulty:
* type: string
* enum:
* - easy
* - medium
* - hard
* description: How difficult the question is perceived to be by the moderators of the API.
* regions:
* type: array
* items:
* type: string
* description:
* If the question is regional (i.e. only reasonable to ask people from a
* particular set of countries), then the ISO 3166-1 alpha-2 country codes
* for those countries are specified here.
*
*
* For most questions, this will be an empty array, meaning that the question
* is suitable to ask to people from anywhere in the world.
* isNiche:
* type: boolean
* description: Will be true if the question is a niche question, i.e. if it is considered too difficult to return unless the tag is specifically requested.
* required:
* - category
* - id
* - tags
* - isNiche
* - difficulty
*
*/