{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/assignar/json-schema/assignar-skill-schema.json",
  "title": "Skill",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/assignar-skills-competencies-api-openapi.yml#/components/schemas/Skill",
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "readOnly": true
    },
    "name": {
      "type": "string"
    },
    "subskill": {
      "type": [
        "object",
        "null"
      ],
      "readOnly": true,
      "description": "A skill that this skill also covers. A worker holding this skill is treated as holding the sub-skill too, so a search for the sub-skill also returns holders of this one — the sub-skill of a truck licence could be a car licence, so a search for a car licence returns truck-licence holders.\n\nThe relationship is transitive: truck → car → moped means a moped requirement matches a truck-licence holder.\n\nA skill has at most one sub-skill. Always present — `null` when the skill has none, and returned even when `?fields=` does not ask for it.\n\nThis field is read-only. To set or remove a sub-skill, send `subskill_id` on a create or update; the two are different fields, so echoing a response back into a write sends no `subskill_id` and leaves the sub-skill alone.",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        }
      }
    }
  }
}