Commit 98f8ec7c by Sriramajeyam Sugumaran Committed by GitHub

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
parent b4289a48
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
"required": ["type", "name", "id", "info", "dependencies"], "required": ["type", "name", "id", "info", "dependencies"],
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"$schema": {
"type": "string",
"description": "Schema definition for the plugin.json file"
},
"id": { "id": {
"type": "string", "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.", "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 @@ ...@@ -23,8 +27,8 @@
}, },
"category": { "category": {
"type": "string", "type": "string",
"description": "Plugin category used on the Add data source page. Possible values are: `tsdb`, `logging`, `cloud`, `tracing`, and `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"] "enum": ["tsdb", "logging", "cloud", "tracing", "sql", "enterprise", "other"]
}, },
"annotations": { "annotations": {
"type": "boolean", "type": "boolean",
...@@ -146,7 +150,7 @@ ...@@ -146,7 +150,7 @@
"info": { "info": {
"type": "object", "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.", "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, "additionalProperties": false,
"properties": { "properties": {
"author": { "author": {
...@@ -177,6 +181,7 @@ ...@@ -177,6 +181,7 @@
"keywords": { "keywords": {
"type": "array", "type": "array",
"description": "Array of plugin keywords. Used for search on grafana.com.", "description": "Array of plugin keywords. Used for search on grafana.com.",
"minItems": 1,
"items": { "items": {
"type": "string" "type": "string"
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment