{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openhandle/json-schema/openhandle-reddit-post-schema.json",
  "title": "RedditPost",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openhandle-reddit-api-openapi.yml#/components/schemas/RedditPost",
  "additionalProperties": false,
  "properties": {
    "author": {
      "anyOf": [
        {
          "$ref": "#/$defs/RedditAuthor"
        },
        {
          "type": "null"
        }
      ]
    },
    "comments": {
      "$ref": "#/$defs/RedditCommentsSetting"
    },
    "community": {
      "anyOf": [
        {
          "$ref": "#/$defs/RedditCommunity"
        },
        {
          "type": "null"
        }
      ]
    },
    "createdAt": {
      "format": "date-time",
      "minLength": 1,
      "type": "string"
    },
    "distinguishedBy": {
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "domain": {
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "editedAt": {
      "format": "date-time",
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "embed": {
      "anyOf": [
        {
          "$ref": "#/$defs/RedditEmbed"
        },
        {
          "type": "null"
        }
      ]
    },
    "flair": {
      "anyOf": [
        {
          "$ref": "#/$defs/RedditFlair"
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "minLength": 1,
      "type": "string"
    },
    "isArchived": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isCrosspostable": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isEdited": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isGallery": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isLocked": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isMediaOnly": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isMeta": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isOriginalContent": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isPinned": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isRedditMediaDomain": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isSelf": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isSensitive": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isSpoiler": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isStickied": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isVideo": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "linkUrl": {
      "format": "uri",
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "media": {
      "items": {
        "$ref": "#/$defs/RedditMedia"
      },
      "type": "array"
    },
    "metrics": {
      "$ref": "#/$defs/RedditPostMetrics"
    },
    "removedByCategory": {
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "text": {
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "textHtml": {
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "thumbnail": {
      "anyOf": [
        {
          "$ref": "#/$defs/RedditThumbnail"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "topAwardedType": {
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "url": {
      "format": "uri",
      "minLength": 1,
      "type": "string"
    },
    "visibility": {
      "$ref": "#/$defs/RedditPostVisibility"
    }
  },
  "required": [
    "id",
    "title",
    "text",
    "textHtml",
    "domain",
    "url",
    "linkUrl",
    "author",
    "community",
    "metrics",
    "createdAt",
    "isEdited",
    "editedAt",
    "isSelf",
    "isVideo",
    "isGallery",
    "isMeta",
    "isOriginalContent",
    "isCrosspostable",
    "isRedditMediaDomain",
    "isMediaOnly",
    "isSensitive",
    "isSpoiler",
    "isStickied",
    "isLocked",
    "isArchived",
    "isPinned",
    "visibility",
    "comments",
    "distinguishedBy",
    "removedByCategory",
    "topAwardedType",
    "flair",
    "thumbnail",
    "media",
    "embed"
  ],
  "type": "object",
  "$defs": {
    "RedditAuthor": {
      "additionalProperties": false,
      "properties": {
        "flair": {
          "anyOf": [
            {
              "$ref": "#/$defs/RedditFlair"
            },
            {
              "type": "null"
            }
          ]
        },
        "handle": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "isPremium": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "placeholder": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "handle",
        "placeholder",
        "isPremium",
        "flair"
      ],
      "type": "object"
    },
    "RedditCommentsSetting": {
      "additionalProperties": false,
      "properties": {
        "allowLiveComments": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "discussionType": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "isContestMode": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "suggestedSort": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "isContestMode",
        "allowLiveComments",
        "suggestedSort",
        "discussionType"
      ],
      "type": "object"
    },
    "RedditCommunity": {
      "additionalProperties": false,
      "properties": {
        "displayHandle": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "handle": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "isQuarantined": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "metrics": {
          "$ref": "#/$defs/RedditSubredditMetrics"
        },
        "type": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "handle",
        "displayHandle",
        "type",
        "metrics",
        "isQuarantined"
      ],
      "type": "object"
    },
    "RedditEmbed": {
      "additionalProperties": false,
      "properties": {
        "author": {
          "anyOf": [
            {
              "$ref": "#/$defs/RedditEmbedAuthor"
            },
            {
              "type": "null"
            }
          ]
        },
        "domain": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "height": {
          "type": [
            "integer",
            "null"
          ]
        },
        "html": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "mediaDomainUrl": {
          "format": "uri",
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "provider": {
          "anyOf": [
            {
              "$ref": "#/$defs/RedditEmbedSource"
            },
            {
              "type": "null"
            }
          ]
        },
        "scrolling": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "thumbnail": {
          "anyOf": [
            {
              "$ref": "#/$defs/RedditThumbnail"
            },
            {
              "type": "null"
            }
          ]
        },
        "title": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "version": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "width": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "domain",
        "version",
        "title",
        "type",
        "html",
        "height",
        "width",
        "provider",
        "author",
        "thumbnail",
        "scrolling",
        "mediaDomainUrl"
      ],
      "type": "object"
    },
    "RedditEmbedAuthor": {
      "additionalProperties": false,
      "properties": {
        "displayName": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "format": "uri",
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "displayName",
        "url"
      ],
      "type": "object"
    },
    "RedditEmbedSource": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "format": "uri",
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "name",
        "url"
      ],
      "type": "object"
    },
    "RedditFlair": {
      "additionalProperties": false,
      "properties": {
        "backgroundColor": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "cssClass": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "hasPatreonFlair": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "templateId": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "text": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "textColor": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "text",
        "type",
        "templateId",
        "cssClass",
        "backgroundColor",
        "textColor",
        "hasPatreonFlair"
      ],
      "type": "object"
    },
    "RedditMedia": {
      "additionalProperties": false,
      "properties": {
        "bitrateKbps": {
          "type": [
            "integer",
            "null"
          ]
        },
        "caption": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "duration": {
          "type": [
            "number",
            "null"
          ]
        },
        "hasAudio": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "height": {
          "type": [
            "integer",
            "null"
          ]
        },
        "id": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "isAnimated": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "mimeType": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "scrubber": {
          "anyOf": [
            {
              "$ref": "#/$defs/RedditMediaVariant"
            },
            {
              "type": "null"
            }
          ]
        },
        "transcodingStatus": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "format": "uri",
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "variants": {
          "items": {
            "$ref": "#/$defs/RedditMediaVariant"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "width": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "type",
        "id",
        "width",
        "height",
        "mimeType",
        "caption",
        "url",
        "variants",
        "bitrateKbps",
        "hasAudio",
        "duration",
        "isAnimated",
        "transcodingStatus",
        "scrubber"
      ],
      "type": "object"
    },
    "RedditMediaVariant": {
      "additionalProperties": false,
      "properties": {
        "format": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "format": "uri",
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "format",
        "type",
        "url"
      ],
      "type": "object"
    },
    "RedditPostMetrics": {
      "additionalProperties": false,
      "properties": {
        "awards": {
          "type": [
            "integer",
            "null"
          ]
        },
        "comments": {
          "type": [
            "integer",
            "null"
          ]
        },
        "crossposts": {
          "type": [
            "integer",
            "null"
          ]
        },
        "gilded": {
          "type": [
            "integer",
            "null"
          ]
        },
        "score": {
          "type": [
            "integer",
            "null"
          ]
        },
        "upvoteRatio": {
          "type": [
            "number",
            "null"
          ]
        },
        "views": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "score",
        "upvoteRatio",
        "comments",
        "crossposts",
        "awards",
        "gilded",
        "views"
      ],
      "type": "object"
    },
    "RedditPostVisibility": {
      "additionalProperties": false,
      "properties": {
        "isRobotIndexable": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "isScoreHidden": {
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "required": [
        "isRobotIndexable",
        "isScoreHidden"
      ],
      "type": "object"
    },
    "RedditSubredditMetrics": {
      "additionalProperties": false,
      "properties": {
        "subscribers": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "subscribers"
      ],
      "type": "object"
    },
    "RedditThumbnail": {
      "additionalProperties": false,
      "properties": {
        "height": {
          "type": [
            "integer",
            "null"
          ]
        },
        "state": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "format": "uri",
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "width": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "type",
        "url",
        "state",
        "width",
        "height"
      ],
      "type": "object"
    }
  }
}