{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/avetta/main/json-schema/avetta-3-29-14-competency-resource-schema.json",
  "title": "3.29.14_CompetencyResource",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/avetta-pegasus-openapi.yml#/components/schemas/3.29.14_CompetencyResource",
  "type": "object",
  "properties": {
    "stubId": {
      "type": "integer",
      "format": "int32"
    },
    "competencyId": {
      "type": "integer",
      "format": "int32"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "duration": {
      "type": "integer",
      "format": "int32"
    },
    "durationUnit": {
      "type": "string",
      "enum": [
        "Days",
        "Weeks",
        "Months",
        "Years"
      ]
    },
    "groupCompetency": {
      "type": "boolean"
    },
    "verifiedDocument": {
      "type": "boolean"
    },
    "allowTrainingBookings": {
      "type": "boolean"
    },
    "external": {
      "type": "boolean"
    },
    "active": {
      "type": "boolean"
    },
    "hideFileUpload": {
      "type": "boolean"
    },
    "externalId": {
      "$ref": "#/$defs/3.29.14_KeyedStringResource"
    },
    "clientKey": {
      "$ref": "#/$defs/3.29.14_NaturalKeyResource"
    },
    "scope": {
      "$ref": "#/$defs/3.29.14_ScopeDetailResource"
    },
    "suffix": {
      "type": "string"
    },
    "level": {
      "type": "string"
    },
    "global": {
      "type": "string"
    },
    "verifiedDocumentIssueMandatoryStatus": {
      "type": "string",
      "enum": [
        "NOT_ALLOWED",
        "OPTIONAL",
        "MANDATORY"
      ]
    },
    "verifiedDocumentExpiryMandatoryStatus": {
      "type": "string",
      "enum": [
        "NOT_ALLOWED",
        "OPTIONAL",
        "MANDATORY"
      ]
    },
    "nonVerifiedDocumentIssueMandatoryStatus": {
      "type": "string",
      "enum": [
        "NOT_ALLOWED",
        "OPTIONAL",
        "MANDATORY"
      ]
    },
    "nonVerifiedDocumentExpiryMandatoryStatus": {
      "type": "string",
      "enum": [
        "NOT_ALLOWED",
        "OPTIONAL",
        "MANDATORY"
      ]
    },
    "scopeId": {
      "type": "integer",
      "format": "int32"
    },
    "fileUploadRequirement": {
      "$ref": "#/$defs/3.29.14_FileUploadRequirementResource"
    },
    "members": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/3.29.14_CompetencyResource"
      }
    },
    "competencyRequirement": {
      "type": "string",
      "enum": [
        "MANDATORY",
        "OPTIONAL",
        "CONDITIONAL"
      ]
    },
    "uploadAllowed": {
      "type": "boolean"
    },
    "deliveredByTraining": {
      "type": "boolean"
    },
    "issueDateMandatoryStatus": {
      "type": "string",
      "enum": [
        "NOT_ALLOWED",
        "OPTIONAL",
        "MANDATORY"
      ]
    },
    "expiryDateMandatoryStatus": {
      "type": "string",
      "enum": [
        "NOT_ALLOWED",
        "OPTIONAL",
        "MANDATORY"
      ]
    },
    "minimumValidityDaysBeforeRenewal": {
      "type": "integer",
      "format": "int32"
    }
  },
  "$defs": {
    "3.29.14_CompetencyResource": {
      "type": "object",
      "properties": {
        "stubId": {
          "type": "integer",
          "format": "int32"
        },
        "competencyId": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "duration": {
          "type": "integer",
          "format": "int32"
        },
        "durationUnit": {
          "type": "string",
          "enum": [
            "Days",
            "Weeks",
            "Months",
            "Years"
          ]
        },
        "groupCompetency": {
          "type": "boolean"
        },
        "verifiedDocument": {
          "type": "boolean"
        },
        "allowTrainingBookings": {
          "type": "boolean"
        },
        "external": {
          "type": "boolean"
        },
        "active": {
          "type": "boolean"
        },
        "hideFileUpload": {
          "type": "boolean"
        },
        "externalId": {
          "$ref": "#/$defs/3.29.14_KeyedStringResource"
        },
        "clientKey": {
          "$ref": "#/$defs/3.29.14_NaturalKeyResource"
        },
        "scope": {
          "$ref": "#/$defs/3.29.14_ScopeDetailResource"
        },
        "suffix": {
          "type": "string"
        },
        "level": {
          "type": "string"
        },
        "global": {
          "type": "string"
        },
        "verifiedDocumentIssueMandatoryStatus": {
          "type": "string",
          "enum": [
            "NOT_ALLOWED",
            "OPTIONAL",
            "MANDATORY"
          ]
        },
        "verifiedDocumentExpiryMandatoryStatus": {
          "type": "string",
          "enum": [
            "NOT_ALLOWED",
            "OPTIONAL",
            "MANDATORY"
          ]
        },
        "nonVerifiedDocumentIssueMandatoryStatus": {
          "type": "string",
          "enum": [
            "NOT_ALLOWED",
            "OPTIONAL",
            "MANDATORY"
          ]
        },
        "nonVerifiedDocumentExpiryMandatoryStatus": {
          "type": "string",
          "enum": [
            "NOT_ALLOWED",
            "OPTIONAL",
            "MANDATORY"
          ]
        },
        "scopeId": {
          "type": "integer",
          "format": "int32"
        },
        "fileUploadRequirement": {
          "$ref": "#/$defs/3.29.14_FileUploadRequirementResource"
        },
        "members": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/3.29.14_CompetencyResource"
          }
        },
        "competencyRequirement": {
          "type": "string",
          "enum": [
            "MANDATORY",
            "OPTIONAL",
            "CONDITIONAL"
          ]
        },
        "uploadAllowed": {
          "type": "boolean"
        },
        "deliveredByTraining": {
          "type": "boolean"
        },
        "issueDateMandatoryStatus": {
          "type": "string",
          "enum": [
            "NOT_ALLOWED",
            "OPTIONAL",
            "MANDATORY"
          ]
        },
        "expiryDateMandatoryStatus": {
          "type": "string",
          "enum": [
            "NOT_ALLOWED",
            "OPTIONAL",
            "MANDATORY"
          ]
        },
        "minimumValidityDaysBeforeRenewal": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "3.29.14_FileUploadRequirementResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        },
        "mandatoryStatus": {
          "type": "string",
          "enum": [
            "YES",
            "NO",
            "CONDITIONAL"
          ]
        },
        "mandatoryConditionalText": {
          "type": "string"
        },
        "requirementsDescription": {
          "type": "string"
        },
        "helpLinkUrl": {
          "type": "string"
        },
        "fileType": {
          "type": "string"
        },
        "fileSizeBytes": {
          "type": "integer",
          "format": "int32"
        },
        "mimetypes": {
          "uniqueItems": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "downloadableDocId": {
          "type": "integer",
          "format": "int32"
        },
        "allowOnlineAssessment": {
          "type": "boolean"
        },
        "issueDateMandatoryStatus": {
          "type": "string",
          "enum": [
            "NOT_ALLOWED",
            "OPTIONAL",
            "MANDATORY"
          ]
        },
        "expiryDateMandatoryStatus": {
          "type": "string",
          "enum": [
            "NOT_ALLOWED",
            "OPTIONAL",
            "MANDATORY"
          ]
        }
      }
    },
    "3.29.14_KeyedIntegerResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "3.29.14_KeyedStringResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "3.29.14_NaturalKeyResource": {
      "type": "object",
      "properties": {
        "extSysKey": {
          "type": "string"
        },
        "idKey": {
          "type": "string"
        }
      }
    },
    "3.29.14_ScopeDetailResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        },
        "timezone": {
          "type": "string"
        },
        "fatigueLimit": {
          "type": "integer",
          "format": "int32"
        },
        "siteId": {
          "type": "integer",
          "format": "int32"
        },
        "realmId": {
          "type": "integer",
          "format": "int32"
        },
        "concoId": {
          "type": "integer",
          "format": "int32"
        },
        "type": {
          "type": "string",
          "enum": [
            "SYSTEM",
            "REALM",
            "SITE",
            "LOCATION",
            "CONCO_WEB",
            "EMPLOYEE",
            "UNKNOWN"
          ]
        },
        "typeDisplayName": {
          "type": "string"
        },
        "ownerName": {
          "type": "string"
        },
        "connectAccountId": {
          "type": "string"
        },
        "connectClient": {
          "type": "boolean"
        },
        "parentId": {
          "type": "integer",
          "format": "int32"
        },
        "realm": {
          "$ref": "#/$defs/3.29.14_KeyedIntegerResource"
        },
        "site": {
          "$ref": "#/$defs/3.29.14_KeyedIntegerResource"
        },
        "conco": {
          "$ref": "#/$defs/3.29.14_KeyedIntegerResource"
        },
        "topLevel": {
          "type": "boolean"
        }
      }
    }
  }
}