{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/canonical/main/json-schema/canonical-metadata-configuration-schema.json",
  "title": "MetadataConfiguration contains metadata about the LXD server configuration options.",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canonical-metadata-api-openapi.yml#/components/schemas/MetadataConfiguration",
  "properties": {
    "configs": {
      "additionalProperties": {
        "additionalProperties": {
          "$ref": "#/$defs/MetadataConfigurationConfigKeys"
        },
        "type": "object"
      },
      "description": "Configs contains all server configuration metadata.",
      "type": "object",
      "x-go-name": "Configs"
    },
    "entities": {
      "additionalProperties": {
        "$ref": "#/$defs/MetadataConfigurationEntity"
      },
      "description": "Entities contains all authorization related metadata.\n\nAPI extension: metadata_configuration_entity_types",
      "type": "object",
      "x-go-name": "Entities"
    }
  },
  "type": "object",
  "x-go-package": "github.com/canonical/lxd/shared/api",
  "$defs": {
    "MetadataConfigurationConfigKey": {
      "properties": {
        "condition": {
          "description": "Condition describes conditions under which the configuration key can be applied.",
          "type": "string",
          "x-go-name": "Condition"
        },
        "defaultdesc": {
          "description": "DefaultDescription contains a description of the configuration key.",
          "type": "string",
          "x-go-name": "DefaultDescription"
        },
        "longdesc": {
          "description": "LongDescription contains a long-form description of the configuration key.",
          "type": "string",
          "x-go-name": "LongDescription"
        },
        "managed": {
          "description": "Managed describes whether the configuration key is managed by LXD.",
          "type": "string",
          "x-go-name": "Managed"
        },
        "required": {
          "description": "Required describes conditions under which the configuration key is required.",
          "type": "string",
          "x-go-name": "Required"
        },
        "scope": {
          "description": "Scope describes the cluster member specificity of a configuration key. Options marked with a `global` scope are applied to all cluster members. Options marked with a `local` scope are set on a per-member basis.\n\nAPI extension: metadata_configuration_scope",
          "type": "string",
          "x-go-name": "Scope"
        },
        "shortdesc": {
          "description": "ShortDescription contains a short-form description of the configuration key.",
          "type": "string",
          "x-go-name": "ShortDescription"
        },
        "type": {
          "description": "Type describes the type of the key.",
          "type": "string",
          "x-go-name": "Type"
        }
      },
      "title": "MetadataConfigurationConfigKey contains metadata about a LXD server configuration option.",
      "type": "object",
      "x-go-package": "github.com/canonical/lxd/shared/api"
    },
    "MetadataConfigurationConfigKeys": {
      "properties": {
        "keys": {
          "items": {
            "additionalProperties": {
              "$ref": "#/$defs/MetadataConfigurationConfigKey"
            },
            "type": "object"
          },
          "type": "array",
          "x-go-name": "Keys"
        }
      },
      "title": "MetadataConfigurationConfigKeys contains metadata about LXD server configuration options.",
      "type": "object",
      "x-go-package": "github.com/canonical/lxd/shared/api"
    },
    "MetadataConfigurationEntity": {
      "properties": {
        "entitlements": {
          "description": "Entitlements contains a list of entitlements that apply to a specific entity type.",
          "items": {
            "$ref": "#/$defs/MetadataConfigurationEntityEntitlement"
          },
          "type": "array",
          "x-go-name": "Entitlements"
        },
        "project_specific": {
          "description": "ProjectSpecific indicates whether the entity is project specific.",
          "type": "boolean",
          "x-go-name": "ProjectSpecific"
        }
      },
      "title": "MetadataConfigurationEntity contains metadata about LXD server entities and available entitlements for authorization.",
      "type": "object",
      "x-go-package": "github.com/canonical/lxd/shared/api"
    },
    "MetadataConfigurationEntityEntitlement": {
      "properties": {
        "description": {
          "description": "Description describes the entitlement.",
          "type": "string",
          "x-go-name": "Description"
        },
        "name": {
          "description": "Name contains the name of the entitlement.",
          "type": "string",
          "x-go-name": "Name"
        }
      },
      "title": "MetadataConfigurationEntityEntitlement contains metadata about a LXD server entitlement.",
      "type": "object",
      "x-go-package": "github.com/canonical/lxd/shared/api"
    }
  }
}