{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/github/main/json-schema/github-team-discussion-schema.json",
  "title": "Team Discussion",
  "description": "A team discussion is a persistent record of a free-form conversation within a team.",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/github-teams-api-openapi.yml#/components/schemas/team-discussion",
  "type": "object",
  "properties": {
    "author": {
      "$ref": "#/$defs/nullable-simple-user"
    },
    "body": {
      "description": "The main text of the discussion.",
      "type": "string"
    },
    "body_html": {
      "type": "string"
    },
    "body_version": {
      "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.",
      "type": "string"
    },
    "comments_count": {
      "type": "integer"
    },
    "comments_url": {
      "type": "string",
      "format": "uri"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "html_url": {
      "type": "string",
      "format": "uri"
    },
    "node_id": {
      "type": "string"
    },
    "number": {
      "description": "The unique sequence number of a team discussion.",
      "type": "integer"
    },
    "pinned": {
      "description": "Whether or not this discussion should be pinned for easy retrieval.",
      "type": "boolean"
    },
    "private": {
      "description": "Whether or not this discussion should be restricted to team members and organization owners.",
      "type": "boolean"
    },
    "team_url": {
      "type": "string",
      "format": "uri"
    },
    "title": {
      "description": "The title of the discussion.",
      "type": "string"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "reactions": {
      "$ref": "#/$defs/reaction-rollup"
    }
  },
  "required": [
    "author",
    "body",
    "body_html",
    "body_version",
    "comments_count",
    "comments_url",
    "created_at",
    "last_edited_at",
    "html_url",
    "pinned",
    "private",
    "node_id",
    "number",
    "team_url",
    "title",
    "updated_at",
    "url"
  ],
  "$defs": {
    "nullable-simple-user": {
      "title": "Simple User",
      "description": "A GitHub user.",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        },
        "login": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "node_id": {
          "type": "string"
        },
        "avatar_url": {
          "type": "string",
          "format": "uri"
        },
        "gravatar_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "html_url": {
          "type": "string",
          "format": "uri"
        },
        "followers_url": {
          "type": "string",
          "format": "uri"
        },
        "following_url": {
          "type": "string"
        },
        "gists_url": {
          "type": "string"
        },
        "starred_url": {
          "type": "string"
        },
        "subscriptions_url": {
          "type": "string",
          "format": "uri"
        },
        "organizations_url": {
          "type": "string",
          "format": "uri"
        },
        "repos_url": {
          "type": "string",
          "format": "uri"
        },
        "events_url": {
          "type": "string"
        },
        "received_events_url": {
          "type": "string",
          "format": "uri"
        },
        "type": {
          "type": "string"
        },
        "site_admin": {
          "type": "boolean"
        },
        "starred_at": {
          "type": "string"
        }
      },
      "required": [
        "avatar_url",
        "events_url",
        "followers_url",
        "following_url",
        "gists_url",
        "gravatar_id",
        "html_url",
        "id",
        "node_id",
        "login",
        "organizations_url",
        "received_events_url",
        "repos_url",
        "site_admin",
        "starred_url",
        "subscriptions_url",
        "type",
        "url"
      ]
    },
    "reaction-rollup": {
      "title": "Reaction Rollup",
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "total_count": {
          "type": "integer"
        },
        "+1": {
          "type": "integer"
        },
        "-1": {
          "type": "integer"
        },
        "laugh": {
          "type": "integer"
        },
        "confused": {
          "type": "integer"
        },
        "heart": {
          "type": "integer"
        },
        "hooray": {
          "type": "integer"
        },
        "eyes": {
          "type": "integer"
        },
        "rocket": {
          "type": "integer"
        }
      },
      "required": [
        "url",
        "total_count",
        "+1",
        "-1",
        "laugh",
        "confused",
        "heart",
        "hooray",
        "eyes",
        "rocket"
      ]
    }
  }
}