{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/Question/v1/schema.json",
  "title": "Question",
  "description": "Objects Grid Question Object. A question a shopper or guest asks about a product, a place or a listing. Its answers are Answers whose parentItem is the Question (suggestedAnswer); the one chosen is acceptedAnswer. Votes are counters the app keeps. Modeled in compliance with https://schema.org/Question.",
  "type": "object",
  "properties": {
    "at_context": {
      "description": "Schema context",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "https://schema.org"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_type": {
      "description": "The object type",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "Question"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_id": {
      "description": "This Question's ObjectsGrid URL, https://apis.objectsgrid.com/<path>/<id>: its JSON-LD @id, which References point to. Set by the service.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "readOnly": true
    },
    "id": {
      "description": "The unique identifier for Question. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 50,
      "readOnly": true
    },
    "identifier": {
      "description": "The unique identifier for Question. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 50,
      "readOnly": true
    },
    "url": {
      "description": "This Question URL. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "minLength": 1,
      "readOnly": true
    },
    "name": {
      "description": "The Question name",
      "type": "array",
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/LanguageTaggedString/v1/schema.json"
      },
      "minItems": 1
    },
    "text": {
      "description": "The question in full",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/LanguageTaggedString/v1/schema.json"
      }
    },
    "about": {
      "description": "What it asks about",
      "x-objectsgrid-rangeIncludes": [
        "Accommodation",
        "Brand",
        "Course",
        "Event",
        "Menu",
        "MenuItem",
        "Offer",
        "Organization",
        "Place",
        "Product",
        "ProductGroup",
        "ProductModel",
        "RealEstateListing",
        "Service"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "author": {
      "x-objectsgrid-erasure": "keep",
      "x-objectsgrid-version": "pinned",
      "description": "Who asked: the URL of a Person or Organization, stored as <url>?version=<objectVersion>",
      "x-objectsgrid-rangeIncludes": [
        "Person",
        "Organization"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "dateCreated": {
      "description": "When it was asked",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "upvoteCount": {
      "description": "Up votes, kept by the app",
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "downvoteCount": {
      "description": "Down votes, kept by the app",
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "acceptedAnswer": {
      "description": "The answer chosen as the right one",
      "x-objectsgrid-rangeIncludes": [
        "Answer"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "suggestedAnswer": {
      "description": "Its answers. Computed, read-only: the objects whose Answer.parentItem points to this object, listed from that type; never stored or written.",
      "x-objectsgrid-inverseOf": "Answer.parentItem",
      "readOnly": true
    },
    "tags": {
      "description": "Tags an ABAC policy can decide on. A name may repeat; the same name and value appear once. Every stored object has them: created empty when not sent, kept by a replacement (PUT) that does not mention them, unchanged by a patch that does not mention them, cleared by null or [].",
      "type": "array",
      "default": [],
      "uniqueItems": true,
      "maxItems": 50,
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Tag/v1/schema.json"
      }
    },
    "meta": {
      "description": "System-managed metadata for the object (version, audit fields). Assigned by the server.",
      "$ref": "https://objectsgrid.com/.well-known/objects-catalog/ObjectMeta/v1/schema.json",
      "readOnly": true
    }
  },
  "required": [
    "name"
  ]
}
