{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/4dayweek-io/json-schema/4dayweek-io-legacy-list-response-schema.json",
  "title": "LegacyListResponse",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/4dayweek-io-openapi.yaml#/components/schemas/LegacyListResponse",
  "type": "object",
  "required": [
    "usage",
    "page",
    "total",
    "has_more",
    "jobs"
  ],
  "properties": {
    "usage": {
      "type": "string"
    },
    "page": {
      "type": "integer"
    },
    "total": {
      "type": "integer"
    },
    "has_more": {
      "type": "boolean"
    },
    "jobs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LegacyJob"
      }
    }
  },
  "$defs": {
    "LegacyCompany": {
      "type": "object",
      "properties": {
        "id_str": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Includes /jobs suffix (e.g. /company/acme/jobs)."
        },
        "category": {
          "type": "string"
        },
        "short_description": {
          "type": "string"
        },
        "description": {
          "type": "string",
          "description": "Plain-text description."
        },
        "country": {
          "type": "string"
        },
        "employees": {
          "type": "integer",
          "format": "int64"
        },
        "logo_url": {
          "type": "string",
          "format": "uri"
        },
        "company_url": {
          "type": "string",
          "format": "uri"
        },
        "reduced_hours": {
          "type": "string",
          "description": "Descriptive schedule text (e.g. \"4 day week @ 100% salary\")."
        },
        "four_day_reference_text": {
          "type": "string",
          "description": "Company's schedule policy description."
        },
        "images": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          }
        },
        "remote_level": {
          "type": "string",
          "description": "Mapped to old format (\"100% remote\", \"Offers remote\", \"Onsite\")."
        }
      }
    },
    "LegacyJob": {
      "type": "object",
      "required": [
        "id_str",
        "title",
        "slug",
        "url",
        "description",
        "category",
        "role",
        "level",
        "hours",
        "reduced_hours",
        "is_remote",
        "posted",
        "filters",
        "company_id",
        "company_name",
        "company"
      ],
      "properties": {
        "id_str": {
          "type": "string",
          "description": "Job ID as a UUID string. Old consumers that parsed this as an int\nmust switch to string. The trailing `_str` in the field name\nindicates this was always the intended type.\n"
        },
        "title": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Canonical public URL for the job page."
        },
        "description": {
          "type": "string",
          "description": "Plain-text description. HTML is never exposed."
        },
        "category": {
          "type": "string",
          "description": "Human-readable label (e.g. \"Engineering\", \"Data Science\")."
        },
        "role": {
          "type": "string"
        },
        "level": {
          "type": "string",
          "description": "Human-readable label (e.g. \"Senior\", \"Mid-level\", \"Junior\")."
        },
        "hours": {
          "type": "integer"
        },
        "reduced_hours": {
          "type": "string",
          "description": "Schedule description (e.g. \"Offered\", \"Generous PTO\", \"9 day fortnight\").\n"
        },
        "is_remote": {
          "type": "boolean",
          "description": "Derived from work_arrangement != 'onsite'."
        },
        "location_city": {
          "type": "string"
        },
        "location_country": {
          "type": "string"
        },
        "location_continent": {
          "type": "string"
        },
        "location_original": {
          "type": "string"
        },
        "posted": {
          "type": "integer",
          "format": "int64",
          "description": "Unix epoch seconds."
        },
        "filters": {
          "type": "array",
          "description": "Union of skills + stack + tools, deduplicated by slug, preserving\nthe order skills → stack → tools.\n",
          "items": {
            "$ref": "#/$defs/LegacyTag"
          }
        },
        "company_id": {
          "type": "string"
        },
        "company_name": {
          "type": "string",
          "description": "Legacy identifier — typically the company slug."
        },
        "company": {
          "$ref": "#/$defs/LegacyCompany"
        }
      }
    },
    "LegacyTag": {
      "type": "object",
      "required": [
        "label",
        "value"
      ],
      "properties": {
        "label": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    }
  }
}