{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://nao1215.github.io/jsonize/schemas/id/posix.json",
  "title": "id/posix",
  "description": "id output with nested uid/gid/groups and optional SELinux context",
  "x-jsonize": {
    "definition": "id/posix",
    "version": 1
  },
  "type": "object",
  "properties": {
    "uid": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "name"
      ]
    },
    "gid": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "name"
      ]
    },
    "groups": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name"
        ]
      }
    },
    "context": {
      "type": "object",
      "properties": {
        "user": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "level": {
          "type": "string"
        }
      },
      "required": [
        "user",
        "role",
        "type",
        "level"
      ]
    }
  },
  "required": [
    "uid",
    "gid",
    "groups"
  ]
}
