{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.pavedit.com/employer-feed.schema.json",
  "title": "PavedIT direct employer job feed",
  "description": "Version 1.0 contract for employer-authorized job feeds. The skills property is reserved for explicit employer-authored structured labels and must never be generated from description prose.",
  "type": "object",
  "required": ["schemaVersion", "jobs"],
  "properties": {
    "schemaVersion": { "const": "pavedit-employer-feed/1.0" },
    "jobs": {
      "type": "array",
      "maxItems": 50000,
      "items": {
        "type": "object",
        "required": ["id", "title", "applyUrl"],
        "properties": {
          "id": { "type": "string", "minLength": 1, "maxLength": 500 },
          "title": { "type": "string", "minLength": 1, "maxLength": 240 },
          "company": { "type": "string", "minLength": 2, "maxLength": 160 },
          "applyUrl": { "type": "string", "format": "uri", "pattern": "^https://" },
          "description": { "type": "string", "maxLength": 100000 },
          "location": { "type": "string", "maxLength": 500 },
          "countryCode": { "type": "string", "pattern": "^[A-Za-z]{2}$" },
          "region": { "type": "string", "minLength": 1, "maxLength": 120 },
          "workplace": { "type": "string", "enum": ["Remote", "Hybrid", "On-site", "Not specified"] },
          "employmentType": { "type": "string", "maxLength": 120 },
          "seniority": { "type": "string", "maxLength": 120 },
          "industry": { "type": "string", "maxLength": 160 },
          "department": { "type": "string", "maxLength": 160 },
          "publishedAt": { "type": "string", "format": "date-time" },
          "sourceUpdatedAt": { "type": "string", "format": "date-time" },
          "expiresAt": { "type": "string", "format": "date-time", "description": "Optional employer-authored closing instant. Jobs at or beyond this instant are not published." },
          "skills": {
            "type": "array",
            "maxItems": 100,
            "uniqueItems": true,
            "description": "Explicit employer-authored structured skill labels only. Do not populate by extracting or summarizing the description.",
            "items": { "type": "string", "minLength": 2, "maxLength": 120 }
          },
          "workAuthorizationCountryCodes": {
            "type": "array",
            "maxItems": 32,
            "uniqueItems": true,
            "description": "Country codes explicitly supplied by the employer for work-authorization requirements. Never infer from job location or prose.",
            "items": { "type": "string", "pattern": "^[A-Z]{2}$" }
          },
          "sponsorshipAvailability": {
            "type": "string",
            "enum": ["not_stated", "available", "not_available", "case_by_case"],
            "description": "Explicit employer-structured statement. not_stated means missing evidence, not a denial."
          },
          "salaryMin": { "type": "number", "exclusiveMinimum": 0 },
          "salaryMax": { "type": "number", "exclusiveMinimum": 0 },
          "salaryCurrency": { "type": "string", "pattern": "^[A-Z]{3}$" },
          "salaryPeriod": { "type": "string", "enum": ["year", "hour"] }
        },
        "dependentRequired": {
          "salaryMin": ["salaryMax", "salaryCurrency", "salaryPeriod"],
          "salaryMax": ["salaryMin", "salaryCurrency", "salaryPeriod"],
          "salaryCurrency": ["salaryMin", "salaryMax", "salaryPeriod"],
          "salaryPeriod": ["salaryMin", "salaryMax", "salaryCurrency"]
        }
      }
    }
  }
}
