{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gloat/json-schema/gloat-search-response-schema.json",
  "title": "search_response",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gloat-search-api-openapi.yml#/components/schemas/search_response",
  "type": "object",
  "properties": {
    "results": {
      "type": "object",
      "properties": {
        "jobs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/job_simple"
          }
        },
        "roles": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/role_simple"
          }
        },
        "users": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/user_simple"
          }
        }
      }
    }
  },
  "$defs": {
    "job_simple": {
      "type": "object",
      "title": "Job/Requisition Basic Fields",
      "properties": {
        "job_id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "locations": {
          "$ref": "#/$defs/location_array"
        },
        "languages": {
          "$ref": "#/$defs/language_array"
        },
        "link": {
          "type": "string"
        }
      }
    },
    "language_array": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "code",
          "level"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "2 letter language code"
          },
          "level": {
            "type": "string",
            "enum": [
              "BA",
              "AD",
              "FL",
              "NL",
              "NT"
            ],
            "description": "language proficiency level:\n  * `BA` - Basic\n  * `AD` - Advanced\n  * `FL` - Fluent\n  * `NL` - Native Level\n  * `NT` - Native"
          }
        }
      }
    },
    "location_array": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "city",
          "country_code"
        ],
        "properties": {
          "city": {
            "type": "string"
          },
          "country_code": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "default": ""
          }
        }
      }
    },
    "project": {
      "type": "object",
      "title": "Project",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "owner_user_id": {
          "type": "string"
        }
      }
    },
    "role_simple": {
      "type": "object",
      "title": "Job/Requisition Basic Fields",
      "properties": {
        "role_id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "locations": {
          "$ref": "#/$defs/location_array"
        },
        "languages": {
          "$ref": "#/$defs/language_array"
        },
        "link": {
          "type": "string"
        },
        "project": {
          "$ref": "#/$defs/project"
        }
      }
    },
    "user_simple": {
      "type": "object",
      "title": "User - Simple Fields",
      "properties": {
        "user_id": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "link": {
          "type": "string"
        }
      }
    }
  }
}