{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "baseURL": {
      "type": "string"
    },
    "extensions": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Extension"
      }
    },
    "loadScripts": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "registrationMethod": {
      "type": "string",
      "enum": [
        "callback",
        "custom"
      ]
    },
    "buildHash": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "dependencies": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "optionalDependencies": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "customProperties": {
      "type": "object",
      "properties": {
        "console": {
          "$ref": "#/definitions/ConsoleSupportedCustomProperties"
        }
      },
      "additionalProperties": {},
      "description": "Plugin manifest properties that are not provided by the base RemotePluginManifest schema."
    }
  },
  "required": [
    "baseURL",
    "extensions",
    "loadScripts",
    "name",
    "registrationMethod",
    "version"
  ],
  "description": "Schema of Console plugin's `plugin-manifest.json` file.",
  "definitions": {
    "Extension": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "properties": {
          "$ref": "#/definitions/AnyObject"
        },
        "flags": {
          "$ref": "#/definitions/ExtensionFlags"
        }
      },
      "required": [
        "type",
        "properties"
      ],
      "additionalProperties": {},
      "description": "An extension of your application.\n\nEach extension instance extends the application's functionality in a specific way. A plugin consists of one or more extension instances that, combined together, adapt or extend the base application's functionality.\n\nThe `type` property determines the kind of the extension, while the `properties` object contains data and/or code necessary to interpret the given extension type.\n\nWe recommend using a structured extension type format, for example: ```js app.page/route // adds new route that renders the given page component app.page/resource/list // adds new list page for the given resource app.page/resource/details // adds new details page for the given resource ```\n\nThe `properties` object may contain code references represented as  {@link  CodeRef }  values. Each code reference should be resolved (e.g. referenced value loaded over the network via `import()` function) only when needed. Therefore, any code reference resolution errors should be handled as part of interpreting the given extension type.\n\nExtensions may also use feature flags to express condition(s) of their enablement."
    },
    "AnyObject": {
      "type": "object",
      "additionalProperties": {},
      "description": "The type `{}` doesn't mean \"any empty object\", it means \"any non-nullish value\".\n\nUse the `AnyObject` type for objects whose structure is unknown."
    },
    "ExtensionFlags": {
      "type": "object",
      "properties": {
        "required": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "disallowed": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false,
      "description": "An extension's feature flag requirements.\n\nIn order for an extension to be in use:\n- for every flag name in `required` list - flag value must be `true`\n- for every flag name in `disallowed` list - flag value must be `false` or `undefined`"
    },
    "ConsoleSupportedCustomProperties": {
      "type": "object",
      "properties": {
        "displayName": {
          "type": "string",
          "description": "User-friendly plugin name."
        },
        "description": {
          "type": "string",
          "description": "User-friendly plugin description."
        },
        "disableStaticPlugins": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Disable the given static plugins when this plugin gets loaded."
        }
      },
      "additionalProperties": false,
      "description": "Additional plugin metadata supported by the Console application."
    }
  }
}