{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/gloat/main/json-schema/gloat-role-request-body-schema.json",
  "title": "RoleRequestBody",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gloat-authorization-openapi.yml#/components/schemas/RoleRequestBody",
  "properties": {
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "permissions": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/PermissionRequestBody"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Permissions"
    },
    "role_metadata": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/RoleMetadataUserFacingEntry"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Role Metadata"
    }
  },
  "type": "object",
  "$defs": {
    "PermissionRequestBody": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "access": {
          "type": "string",
          "title": "Access"
        }
      },
      "type": "object",
      "required": [
        "id",
        "access"
      ],
      "title": "PermissionRequestBody"
    },
    "RoleMetadataUserFacingEntry": {
      "properties": {
        "key": {
          "type": "string",
          "title": "Key"
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Value"
        }
      },
      "type": "object",
      "required": [
        "key"
      ],
      "title": "RoleMetadataUserFacingEntry"
    }
  }
}