{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://yamlresume.org/schema.json",
  "title": "yamlresume",
  "description": "A JSON Resume-compatible payload for the yamlresume.org PDF generator. Accepts either YAML or JSON.",
  "type": "object",
  "required": ["basics"],
  "properties": {
    "basics": {
      "type": "object",
      "required": ["name"],
      "properties": {
        "name":    { "type": "string" },
        "label":   { "type": "string", "description": "One-line headline, e.g. 'Senior Backend Engineer'." },
        "email":   { "type": "string" },
        "phone":   { "type": "string" },
        "url":     { "type": "string", "description": "Personal site." },
        "summary": { "type": "string" },
        "location": {
          "type": "object",
          "properties": {
            "address":     { "type": "string" },
            "postalCode":  { "type": "string" },
            "city":        { "type": "string" },
            "countryCode": { "type": "string" },
            "region":      { "type": "string" }
          }
        },
        "profiles": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["url"],
            "properties": {
              "network":  { "type": "string", "description": "GitHub, LinkedIn, etc." },
              "username": { "type": "string" },
              "url":      { "type": "string" }
            }
          }
        }
      }
    },
    "work": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name"],
        "properties": {
          "name":       { "type": "string", "description": "Company / employer." },
          "position":   { "type": "string" },
          "url":        { "type": "string" },
          "location":   { "type": "string" },
          "startDate":  { "type": "string", "description": "Free-form, e.g. '2022-01' or 'Jan 2022'." },
          "endDate":    { "type": "string", "description": "Free-form or 'Present'." },
          "summary":    { "type": "string" },
          "highlights": { "type": "array", "items": { "type": "string" } }
        }
      }
    },
    "education": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["institution"],
        "properties": {
          "institution": { "type": "string" },
          "url":         { "type": "string" },
          "area":        { "type": "string", "description": "Field of study." },
          "studyType":   { "type": "string", "description": "Degree, e.g. 'B.S.'." },
          "startDate":   { "type": "string" },
          "endDate":     { "type": "string" },
          "score":       { "type": "string", "description": "GPA or grade." },
          "courses":     { "type": "array", "items": { "type": "string" } }
        }
      }
    },
    "skills": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name"],
        "properties": {
          "name":     { "type": "string", "description": "Category, e.g. 'Languages'." },
          "level":    { "type": "string" },
          "keywords": { "type": "array", "items": { "type": "string" } }
        }
      }
    },
    "projects": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name"],
        "properties": {
          "name":        { "type": "string" },
          "description": { "type": "string" },
          "url":         { "type": "string" },
          "startDate":   { "type": "string" },
          "endDate":     { "type": "string" },
          "highlights":  { "type": "array", "items": { "type": "string" } },
          "keywords":    { "type": "array", "items": { "type": "string" } },
          "roles":       { "type": "array", "items": { "type": "string" } },
          "entity":      { "type": "string" },
          "type":        { "type": "string" }
        }
      }
    },
    "awards": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["title"],
        "properties": {
          "title":   { "type": "string" },
          "date":    { "type": "string" },
          "awarder": { "type": "string" },
          "summary": { "type": "string" }
        }
      }
    },
    "languages": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["language"],
        "properties": {
          "language": { "type": "string" },
          "fluency":  { "type": "string" }
        }
      }
    }
  }
}
