update pluginData name&version, update listener name (#31) * update pluginData name&version, update listener name * do not omit empty Attribute fields, required by Adi
diff --git a/apidApiMetadata_suite_test.go b/apidApiMetadata_suite_test.go index 82834b8..31cf038 100644 --- a/apidApiMetadata_suite_test.go +++ b/apidApiMetadata_suite_test.go
@@ -36,5 +36,5 @@ func TestApiMetadata(t *testing.T) { RegisterFailHandler(Fail) - RunSpecs(t, "VerifyAPIKey Suite") + RunSpecs(t, "apiMetadata Suite") }
diff --git a/common/data_structs.go b/common/data_structs.go index 77c0911..9063d4d 100644 --- a/common/data_structs.go +++ b/common/data_structs.go
@@ -14,9 +14,8 @@ package common type Attribute struct { - Name string `json:"name,omitempty"` - Value string `json:"value,omitempty"` - Kind string `json:"kind,omitempty"` + Name string `json:"name"` + Value string `json:"value"` } type ErrorResponse struct {
diff --git a/common/pluginData.go b/common/pluginData.go index 89a7c11..38196c3 100644 --- a/common/pluginData.go +++ b/common/pluginData.go
@@ -17,9 +17,9 @@ import "github.com/apid/apid-core" var PluginData = apid.PluginData{ - Name: "apidVerifyAPIKey", - Version: "0.1.0", + Name: "apidApiMetadata", + Version: "0.2.0", ExtraData: map[string]interface{}{ - "schemaVersion": "0.1.0", + "schemaVersion": "0.2.0", }, }
diff --git a/listener.go b/listener.go index 9aada4e..9f6e7e2 100644 --- a/listener.go +++ b/listener.go
@@ -34,7 +34,7 @@ } func (h *apigeeSyncHandler) String() string { - return "verifyAPIKey" + return "apiMetadata" } func (h *apigeeSyncHandler) processSnapshot(snapshot *tran.Snapshot) { @@ -55,6 +55,6 @@ if snapData, ok := e.(*tran.Snapshot); ok { h.processSnapshot(snapData) } else { - log.Debugf("Received event. No action required for verifyApiKey plugin. Ignoring. %v", e) + log.Debugf("Received event. No action required for apiMetadata plugin. Ignoring. %v", e) } }