{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openhandle/json-schema/openhandle-reddit-subreddit-schema.json",
  "title": "RedditSubreddit",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openhandle-reddit-api-openapi.yml#/components/schemas/RedditSubreddit",
  "additionalProperties": false,
  "properties": {
    "acceptsFollowers": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "avatar": {
      "anyOf": [
        {
          "$ref": "#/$defs/RedditImage"
        },
        {
          "type": "null"
        }
      ]
    },
    "banner": {
      "anyOf": [
        {
          "$ref": "#/$defs/RedditImage"
        },
        {
          "type": "null"
        }
      ]
    },
    "branding": {
      "$ref": "#/$defs/RedditSubredditBranding"
    },
    "createdAt": {
      "format": "date-time",
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "anyOf": [
        {
          "$ref": "#/$defs/RedditText"
        },
        {
          "type": "null"
        }
      ]
    },
    "displayHandle": {
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "displayName": {
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "handle": {
      "minLength": 1,
      "type": "string"
    },
    "id": {
      "minLength": 1,
      "type": "string"
    },
    "isQuarantined": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "isSensitive": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "language": {
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "metrics": {
      "$ref": "#/$defs/RedditSubredditMetrics"
    },
    "settings": {
      "$ref": "#/$defs/RedditSubredditSettings"
    },
    "summary": {
      "anyOf": [
        {
          "$ref": "#/$defs/RedditText"
        },
        {
          "type": "null"
        }
      ]
    },
    "type": {
      "minLength": 1,
      "type": [
        "string",
        "null"
      ]
    },
    "url": {
      "format": "uri",
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "id",
    "handle",
    "displayHandle",
    "displayName",
    "type",
    "language",
    "url",
    "createdAt",
    "isQuarantined",
    "isSensitive",
    "acceptsFollowers",
    "metrics",
    "description",
    "summary",
    "settings",
    "branding",
    "avatar",
    "banner"
  ],
  "type": "object",
  "$defs": {
    "RedditCommentSettings": {
      "additionalProperties": false,
      "properties": {
        "restrictCommenting": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "scoreHideDuration": {
          "type": [
            "integer",
            "null"
          ]
        },
        "suggestedSort": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "restrictCommenting",
        "suggestedSort",
        "scoreHideDuration"
      ],
      "type": "object"
    },
    "RedditDisplaySettings": {
      "additionalProperties": false,
      "properties": {
        "showMedia": {
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "required": [
        "showMedia"
      ],
      "type": "object"
    },
    "RedditImage": {
      "additionalProperties": false,
      "properties": {
        "height": {
          "type": [
            "integer",
            "null"
          ]
        },
        "label": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "format": "uri",
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "variants": {
          "items": {
            "$ref": "#/$defs/RedditImage"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "width": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "type",
        "url",
        "label",
        "width",
        "height",
        "variants"
      ],
      "type": "object"
    },
    "RedditPostFlairSettings": {
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "position": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "enabled",
        "position"
      ],
      "type": "object"
    },
    "RedditPostingLabels": {
      "additionalProperties": false,
      "properties": {
        "link": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "text": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "text",
        "link"
      ],
      "type": "object"
    },
    "RedditPostingSettings": {
      "additionalProperties": false,
      "properties": {
        "allOriginalContent": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "allowGalleries": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "allowImages": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "allowPolls": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "allowVideos": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "instructions": {
          "anyOf": [
            {
              "$ref": "#/$defs/RedditText"
            },
            {
              "type": "null"
            }
          ]
        },
        "labels": {
          "anyOf": [
            {
              "$ref": "#/$defs/RedditPostingLabels"
            },
            {
              "type": "null"
            }
          ]
        },
        "originalContentTagEnabled": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "restrictPosting": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "spoilersEnabled": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "type": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "type",
        "instructions",
        "labels",
        "allowImages",
        "allowVideos",
        "allowGalleries",
        "allowPolls",
        "spoilersEnabled",
        "originalContentTagEnabled",
        "allOriginalContent",
        "restrictPosting"
      ],
      "type": "object"
    },
    "RedditReportSettings": {
      "additionalProperties": false,
      "properties": {
        "allowCustomReasons": {
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "required": [
        "allowCustomReasons"
      ],
      "type": "object"
    },
    "RedditSubredditBranding": {
      "additionalProperties": false,
      "properties": {
        "banner": {
          "anyOf": [
            {
              "$ref": "#/$defs/RedditImage"
            },
            {
              "type": "null"
            }
          ]
        },
        "colors": {
          "$ref": "#/$defs/RedditSubredditColors"
        },
        "header": {
          "anyOf": [
            {
              "$ref": "#/$defs/RedditImage"
            },
            {
              "type": "null"
            }
          ]
        },
        "headerTitle": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "icon": {
          "anyOf": [
            {
              "$ref": "#/$defs/RedditImage"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "headerTitle",
        "colors",
        "icon",
        "banner",
        "header"
      ],
      "type": "object"
    },
    "RedditSubredditColors": {
      "additionalProperties": false,
      "properties": {
        "bannerBackground": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "key": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "primary": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "primary",
        "key",
        "bannerBackground"
      ],
      "type": "object"
    },
    "RedditSubredditMetrics": {
      "additionalProperties": false,
      "properties": {
        "subscribers": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "subscribers"
      ],
      "type": "object"
    },
    "RedditSubredditSettings": {
      "additionalProperties": false,
      "properties": {
        "comments": {
          "$ref": "#/$defs/RedditCommentSettings"
        },
        "display": {
          "$ref": "#/$defs/RedditDisplaySettings"
        },
        "postFlair": {
          "$ref": "#/$defs/RedditPostFlairSettings"
        },
        "posting": {
          "$ref": "#/$defs/RedditPostingSettings"
        },
        "reports": {
          "$ref": "#/$defs/RedditReportSettings"
        }
      },
      "required": [
        "posting",
        "comments",
        "reports",
        "display",
        "postFlair"
      ],
      "type": "object"
    },
    "RedditText": {
      "additionalProperties": false,
      "properties": {
        "html": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "text": {
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "text",
        "html"
      ],
      "type": "object"
    }
  }
}