Commit 7319527f by Marcus Olsson Committed by GitHub

Improve validation for grafanaDependency (#26936)

parent 338943d3
......@@ -50,7 +50,7 @@ Plugin dependencies.
| Property | Type | Required | Description |
|---------------------|----------|----------|-------------------------------------------------------------------------------------------------------------------------------|
| `grafanaDependency` | string | **Yes** | Required Grafana version for this plugin, e.g. `>=7.0.0` to denote plugin requires Grafana 7.0.0 or later. |
| `grafanaDependency` | string | **Yes** | Required Grafana version for this plugin. Validated using https://github.com/npm/node-semver. |
| `grafanaVersion` | string | No | (Deprecated) Required Grafana version for this plugin, e.g. `6.x.x 7.x.x` to denote plugin requires Grafana v6.x.x or v7.x.x. |
| `plugins` | string[] | No | An array of required plugins on which this plugin depends. |
......
......@@ -131,8 +131,8 @@
},
"grafanaDependency": {
"type": "string",
"description": "Required Grafana version for this plugin, e.g. `>=7.0.0` to denote plugin requires Grafana 7.0.0 or later.",
"pattern": "^(>=|<|>|<=)?([0-9]+)(\\.[0-9]+)?(\\.[0-9])?$"
"description": "Required Grafana version for this plugin. Validated using https://github.com/npm/node-semver.",
"pattern": "^(<=|>=|<|>|=|~|\\^)?([0-9]+)(\\.[0-9x\\*]+)(\\.[0-9x\\*])?(\\s(<=|>=|<|=>)?([0-9]+)(\\.[0-9x]+)(\\.[0-9x]))?$"
},
"plugins": {
"type": "array",
......
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