From 98f8ec7c89f477437903522d7494c5343a631e29 Mon Sep 17 00:00:00 2001 From: Sriramajeyam Sugumaran <153843+yesoreyeram@users.noreply.github.com> Date: Wed, 19 Aug 2020 20:27:44 +0100 Subject: [PATCH] plugin.json schema updates (#27029) * added $schema field support in plugin.schema.json More details can be found in https://github.com/grafana/plugin-validator/issues/1 * Others category in plugin.json, minimum 1 keyword * Allow others as a category if the plugin doesn't fall into appropriate category. Refer https://github.com/grafana/plugin-validator/issues/3 for more details * Mandate minimum one keyword for better discovery in plugin repository. * Dropped enum from plugin.json $schema --- docs/sources/developers/plugins/plugin.schema.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/sources/developers/plugins/plugin.schema.json b/docs/sources/developers/plugins/plugin.schema.json index 12646bc23e9..84c332056a3 100644 --- a/docs/sources/developers/plugins/plugin.schema.json +++ b/docs/sources/developers/plugins/plugin.schema.json @@ -7,6 +7,10 @@ "required": ["type", "name", "id", "info", "dependencies"], "additionalProperties": false, "properties": { + "$schema": { + "type": "string", + "description": "Schema definition for the plugin.json file" + }, "id": { "type": "string", "description": "Unique name of the plugin. If the plugin is published on grafana.com, then the plugin id has to follow the naming conventions.", @@ -23,8 +27,8 @@ }, "category": { "type": "string", - "description": "Plugin category used on the Add data source page. Possible values are: `tsdb`, `logging`, `cloud`, `tracing`, and `sql`.", - "enum": ["tsdb", "logging", "cloud", "tracing", "sql"] + "description": "Plugin category used on the Add data source page. Possible values are: `tsdb`, `logging`, `cloud`, `tracing`, `sql`, `enterprise` and `other`.", + "enum": ["tsdb", "logging", "cloud", "tracing", "sql", "enterprise", "other"] }, "annotations": { "type": "boolean", @@ -146,7 +150,7 @@ "info": { "type": "object", "description": "Metadata for the plugin. Some fields are used on the plugins page in Grafana and others on grafana.com if the plugin is published.", - "required": ["logos", "version", "updated"], + "required": ["logos", "version", "updated", "keywords"], "additionalProperties": false, "properties": { "author": { @@ -177,6 +181,7 @@ "keywords": { "type": "array", "description": "Array of plugin keywords. Used for search on grafana.com.", + "minItems": 1, "items": { "type": "string" }