{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/useanyfile-com/json-schema/useanyfile-com-file-request-schema.json",
  "title": "FileRequest",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/useanyfile-com-openapi.yml#/components/schemas/FileRequest",
  "allOf": [
    {
      "type": "object",
      "required": [
        "id",
        "title",
        "description",
        "collectEmail",
        "emailRequired",
        "isActive",
        "createdAt",
        "publicUrl"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "collectEmail": {
          "type": "boolean"
        },
        "emailRequired": {
          "type": "boolean"
        },
        "isActive": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "publicUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "folderId",
        "folder"
      ],
      "properties": {
        "folderId": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 1,
          "maxLength": 100
        },
        "folder": {
          "anyOf": [
            {
              "$ref": "#/$defs/Folder"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  ],
  "$defs": {
    "Folder": {
      "type": "object",
      "required": [
        "id",
        "name",
        "fileCount",
        "requestCount"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "fileCount": {
          "type": "integer",
          "minimum": 0
        },
        "requestCount": {
          "type": "integer",
          "minimum": 0
        }
      }
    }
  }
}