Skip to content

Commit bf9f6c2

Browse files
authored
Docs: Update plugin.schema.json for clarity and completeness (grafana#112402)
* Update plugin.schema.json for clarity and completeness * chore: update descriptions for title and description fields
1 parent aa89bcf commit bf9f6c2

File tree

1 file changed

+37
-6
lines changed

1 file changed

+37
-6
lines changed

docs/sources/developers/plugins/plugin.schema.json

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@
106106
"type": "string",
107107
"format": "uri",
108108
"description": "URL value to use for this specific link."
109+
},
110+
"target": {
111+
"type": "string",
112+
"description": "A string that indicates where to display the linked resource",
113+
"enum": ["_blank", "_self", "_parent", "_top"]
109114
}
110115
}
111116
}
@@ -499,8 +504,8 @@
499504
},
500505
"state": {
501506
"type": "string",
502-
"description": "Marks a plugin as a pre-release.",
503-
"enum": ["alpha", "beta"]
507+
"description": "Describes plugins life cycle status",
508+
"enum": ["alpha", "beta", "stable", "deprecated"]
504509
},
505510
"streaming": {
506511
"type": "boolean",
@@ -588,7 +593,7 @@
588593
"properties": {
589594
"addedComponents": {
590595
"type": "array",
591-
"description": "This list must contain all component extensions that your plugin registers to other extension points using [`.addComponent()`](https://grafana.com/developers/plugin-tools/reference/ui-extensions#addcomponent). **Components that are not listed here won't work.**",
596+
"description": "This list must contain all component extensions that your plugin registers to other extension points using [`.addComponent()`](https://grafana.com/developers/plugin-tools/reference/ui-extensions-reference/ui-extensions#addcomponent). **Components that are not listed here won't work.**",
592597
"items": {
593598
"type": "object",
594599
"properties": {
@@ -614,7 +619,7 @@
614619
},
615620
"addedLinks": {
616621
"type": "array",
617-
"description": "This list must contain all link extensions that your plugin registers to other extension points using [`.addLink()`](https://grafana.com/developers/plugin-tools/reference/ui-extensions#addlink). **Links that are not listed here won't work.**",
622+
"description": "This list must contain all link extensions that your plugin registers to other extension points using [`.addLink()`](https://grafana.com/developers/plugin-tools/reference/ui-extensions-reference/ui-extensions#addlink). **Links that are not listed here won't work.**",
618623
"items": {
619624
"type": "object",
620625
"properties": {
@@ -638,9 +643,35 @@
638643
"required": ["targets", "title"]
639644
}
640645
},
646+
"addedFunctions": {
647+
"type": "array",
648+
"description": "This list must contain all function extensions that your plugin registers to other extension points using [`.addedFunctions()`](https://grafana.com/developers/plugin-tools/reference/ui-extensions-reference/ui-extensions#addfunction). **Functions that are not listed here won't work.**",
649+
"items": {
650+
"type": "object",
651+
"properties": {
652+
"targets": {
653+
"type": "array",
654+
"description": "The extension point ids your plugin registers the extension to, e.g. `[\"grafana/dashboard/panel/menu\"]`",
655+
"items": {
656+
"type": "string"
657+
}
658+
},
659+
"title": {
660+
"type": "string",
661+
"description": "The title of your function extension.",
662+
"minLength": 10
663+
},
664+
"description": {
665+
"type": "string",
666+
"description": "Additional information about your function extension."
667+
}
668+
},
669+
"required": ["targets", "title"]
670+
}
671+
},
641672
"exposedComponents": {
642673
"type": "array",
643-
"description": "This list must contain all components that your plugin exposes using [`.exposeComponent()`](https://grafana.com/developers/plugin-tools/reference/ui-extensions#exposecomponent). **Components that are not listed here won't work.**",
674+
"description": "This list must contain all components that your plugin exposes using [`.exposeComponent()`](https://grafana.com/developers/plugin-tools/reference/ui-extensions-reference/ui-extensions#exposecomponent). **Components that are not listed here won't work.**",
644675
"items": {
645676
"type": "object",
646677
"properties": {
@@ -663,7 +694,7 @@
663694
},
664695
"extensionPoints": {
665696
"type": "array",
666-
"description": "This list must contain all extension points that your plugin defines using [`usePluginLinks()`](https://grafana.com/developers/plugin-tools/reference/ui-extensions#usepluginlinks) or [`usePluginComponents()`](https://grafana.com/developers/plugin-tools/reference/ui-extensions#useplugincomponents). **Extension points that are not listed in here won't work.**",
697+
"description": "This list must contain all extension points that your plugin defines using [`usePluginLinks()`](https://grafana.com/developers/plugin-tools/reference/ui-extensions-reference/ui-extensions#usepluginlinks) or [`usePluginComponents()`](https://grafana.com/developers/plugin-tools/reference/ui-extensions-reference/ui-extensions#useplugincomponents). **Extension points that are not listed in here won't work.**",
667698
"items": {
668699
"type": "object",
669700
"properties": {

0 commit comments

Comments
 (0)