{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cafedev-co/json-schema/cafedev-co-job-detail-schema.json",
  "title": "JobDetail",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cafedev-co-openapi.json#/components/schemas/JobDetail",
  "allOf": [
    {
      "$ref": "#/$defs/Job"
    },
    {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "experience_min_years": {
          "type": [
            "number",
            "null"
          ]
        },
        "languages": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "region_scope": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "related_jobs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Job"
          },
          "description": "Up to 3 open jobs for a similar role (title, skills, category and seniority), at most one from the same company."
        }
      },
      "required": [
        "description",
        "experience_min_years",
        "languages",
        "region_scope",
        "related_jobs"
      ]
    }
  ],
  "$defs": {
    "Job": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "company_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "company_domain": {
          "type": [
            "string",
            "null"
          ]
        },
        "company_slug": {
          "type": [
            "string",
            "null"
          ]
        },
        "skills": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "workplace_type": {
          "type": [
            "string",
            "null"
          ]
        },
        "employment_type": {
          "type": [
            "string",
            "null"
          ]
        },
        "seniority": {
          "type": [
            "string",
            "null"
          ]
        },
        "category": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "countries": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "salary_min": {
          "type": [
            "number",
            "null"
          ]
        },
        "salary_max": {
          "type": [
            "number",
            "null"
          ]
        },
        "salary_currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "salary_frequency": {
          "type": [
            "string",
            "null"
          ]
        },
        "published_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "first_seen_at": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "apply_url": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "id",
        "title",
        "company_name",
        "company_domain",
        "company_slug",
        "skills",
        "workplace_type",
        "employment_type",
        "seniority",
        "category",
        "country",
        "city",
        "countries",
        "salary_min",
        "salary_max",
        "salary_currency",
        "salary_frequency",
        "published_at",
        "first_seen_at",
        "url",
        "apply_url"
      ]
    }
  }
}