MM-19477: model extra manifest data (#12823)
Model `HomepageURL` and `SupportURL` for use in listing plugins in the marketplace.
Этот коммит содержится в:
коммит произвёл
Ben Schumacher
родитель
9307f75fe9
Коммит
a96565671d
@@ -130,6 +130,12 @@ type Manifest struct {
|
||||
// A description of what your plugin is and does.
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
|
||||
// HomepageURL is an optional link to learn more about the plugin.
|
||||
HomepageURL string `json:"homepage_url,omitempty" yaml:"homepage_url,omitempty"`
|
||||
|
||||
// SupportURL is an optional URL where plugin issues can be reported.
|
||||
SupportURL string `json:"support_url,omitempty" yaml:"support_url,omitempty"`
|
||||
|
||||
// A relative file path in the bundle that points to the plugins svg icon for use with the Plugin Marketplace.
|
||||
// This should be relative to the root of your bundle and the location of the manifest file. Bitmap image formats are not supported.
|
||||
IconPath string `json:"icon_path,omitempty" yaml:"icon_path,omitempty"`
|
||||
|
||||
@@ -64,6 +64,8 @@ func TestFindManifest(t *testing.T) {
|
||||
func TestManifestUnmarshal(t *testing.T) {
|
||||
expected := Manifest{
|
||||
Id: "theid",
|
||||
HomepageURL: "https://example.com",
|
||||
SupportURL: "https://example.com/support",
|
||||
IconPath: "assets/icon.svg",
|
||||
MinServerVersion: "5.6.0",
|
||||
Server: &ManifestServer{
|
||||
@@ -103,6 +105,8 @@ func TestManifestUnmarshal(t *testing.T) {
|
||||
var yamlResult Manifest
|
||||
require.NoError(t, yaml.Unmarshal([]byte(`
|
||||
id: theid
|
||||
homepage_url: https://example.com
|
||||
support_url: https://example.com/support
|
||||
icon_path: assets/icon.svg
|
||||
min_server_version: 5.6.0
|
||||
server:
|
||||
@@ -133,6 +137,8 @@ settings_schema:
|
||||
var jsonResult Manifest
|
||||
require.NoError(t, json.Unmarshal([]byte(`{
|
||||
"id": "theid",
|
||||
"homepage_url": "https://example.com",
|
||||
"support_url": "https://example.com/support",
|
||||
"icon_path": "assets/icon.svg",
|
||||
"min_server_version": "5.6.0",
|
||||
"server": {
|
||||
|
||||
Ссылка в новой задаче
Block a user