From b867abc5b5d16d118dab4a30c34209b08a8b8e53 Mon Sep 17 00:00:00 2001 From: Andrew Richardson Date: Fri, 19 Aug 2022 10:54:02 -0400 Subject: [PATCH] Restore camelCase key names Since the Viper patch has been absorbed, it's OK to use camelCase in config files again. Signed-off-by: Andrew Richardson --- docs/reference/config.md | 6 +++--- internal/coreconfig/coreconfig.go | 6 +++--- internal/coremsgs/en_config_descriptions.go | 6 +++--- internal/identity/identitymanager.go | 2 +- test/e2e/gateway/tokens_only.go | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/reference/config.md b/docs/reference/config.md index 42c68e047..fcdf669f5 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -30,7 +30,7 @@ nav_order: 2 |Key|Description|Type|Default Value| |---|-----------|----|-------------| -|keynormalization|Mechanism to normalize keys before using them. Valid options are `blockchain_plugin` - use blockchain plugin (default) or `none` - do not attempt normalization (deprecated - use namespaces.predefined[].asset.manager.keynormalization)|`string`|`` +|keyNormalization|Mechanism to normalize keys before using them. Valid options are `blockchain_plugin` - use blockchain plugin (default) or `none` - do not attempt normalization (deprecated - use namespaces.predefined[].asset.manager.keyNormalization)|`string`|`` ## batch.cache @@ -623,7 +623,7 @@ nav_order: 2 |Key|Description|Type|Default Value| |---|-----------|----|-------------| -|defaultkey|A default signing key for blockchain transactions within this namespace|`string`|`` +|defaultKey|A default signing key for blockchain transactions within this namespace|`string`|`` |description|A description for the namespace|`string`|`` |name|The name of the namespace (must be unique)|`string`|`` |plugins|The list of plugins for this namespace|`string`|`` @@ -633,7 +633,7 @@ nav_order: 2 |Key|Description|Type|Default Value| |---|-----------|----|-------------| -|keynormalization|Mechanism to normalize keys before using them. Valid options are `blockchain_plugin` - use blockchain plugin (default) or `none` - do not attempt normalization|`string`|`` +|keyNormalization|Mechanism to normalize keys before using them. Valid options are `blockchain_plugin` - use blockchain plugin (default) or `none` - do not attempt normalization|`string`|`` ## namespaces.predefined[].multiparty diff --git a/internal/coreconfig/coreconfig.go b/internal/coreconfig/coreconfig.go index 9481ecde9..e6fe6e85a 100644 --- a/internal/coreconfig/coreconfig.go +++ b/internal/coreconfig/coreconfig.go @@ -40,9 +40,9 @@ const ( // NamespacePlugins is the list of namespace plugins NamespacePlugins = "plugins" // NamespaceDefaultKey is the default signing key for blockchain transactions within this namespace - NamespaceDefaultKey = "defaultkey" + NamespaceDefaultKey = "defaultKey" // NamespaceAssetKeyNormalization mechanism to normalize keys before using them. Valid options: "blockchain_plugin" - use blockchain plugin (default), "none" - do not attempt normalization - NamespaceAssetKeyNormalization = "asset.manager.keynormalization" + NamespaceAssetKeyNormalization = "asset.manager.keyNormalization" // NamespaceMultiparty contains the multiparty configuration for a namespace NamespaceMultiparty = "multiparty" // NamespaceMultipartyEnabled specifies if multi-party mode is enabled for a namespace @@ -293,7 +293,7 @@ var ( // TransactionCacheTTL time-to-live for cache of transactions TransactionCacheTTL = ffc("transaction.cache.ttl") // AssetManagerKeyNormalization mechanism to normalize keys before using them. Valid options: "blockchain_plugin" - use blockchain plugin (default), "none" - do not attempt normalization - AssetManagerKeyNormalization = ffc("asset.manager.keynormalization") + AssetManagerKeyNormalization = ffc("asset.manager.keyNormalization") // UIEnabled set to false to disable the UI (default is true, so UI will be enabled if ui.path is valid) UIEnabled = ffc("ui.enabled") // UIPath the path on which to serve the UI diff --git a/internal/coremsgs/en_config_descriptions.go b/internal/coremsgs/en_config_descriptions.go index 8e02fa662..8855dfbb2 100644 --- a/internal/coremsgs/en_config_descriptions.go +++ b/internal/coremsgs/en_config_descriptions.go @@ -41,7 +41,7 @@ var ( ConfigAPIDefaultFilterLimit = ffc("config.api.defaultFilterLimit", "The maximum number of rows to return if no limit is specified on an API request", i18n.IntType) ConfigAPIMaxFilterLimit = ffc("config.api.maxFilterLimit", "The largest value of `limit` that an HTTP client can specify in a request", i18n.IntType) ConfigAPIRequestMaxTimeout = ffc("config.api.requestMaxTimeout", "The maximum amount of time that an HTTP client can specify in a `Request-Timeout` header to keep a specific request open", i18n.TimeDurationType) - ConfigAssetManagerKeyNormalization = ffc("config.asset.manager.keynormalization", "Mechanism to normalize keys before using them. Valid options are `blockchain_plugin` - use blockchain plugin (default) or `none` - do not attempt normalization (deprecated - use namespaces.predefined[].asset.manager.keynormalization)", i18n.StringType) + ConfigAssetManagerKeyNormalization = ffc("config.asset.manager.keyNormalization", "Mechanism to normalize keys before using them. Valid options are `blockchain_plugin` - use blockchain plugin (default) or `none` - do not attempt normalization (deprecated - use namespaces.predefined[].asset.manager.keyNormalization)", i18n.StringType) ConfigBatchManagerMinimumPollDelay = ffc("config.batch.manager.minimumPollDelay", "The minimum time the batch manager waits between polls on the DB - to prevent thrashing", i18n.TimeDurationType) ConfigBatchManagerPollTimeout = ffc("config.batch.manager.pollTimeout", "How long to wait without any notifications of new messages before doing a page query", i18n.TimeDurationType) @@ -264,8 +264,8 @@ var ( ConfigNamespacesPredefinedDescription = ffc("config.namespaces.predefined[].description", "A description for the namespace", i18n.StringType) ConfigNamespacesPredefinedPlugins = ffc("config.namespaces.predefined[].plugins", "The list of plugins for this namespace", i18n.StringType) ConfigNamespacesPredefinedRemoteName = ffc("config.namespaces.predefined[].remotename", "The namespace name to be sent in plugin calls, if it differs from namespace name", i18n.StringType) - ConfigNamespacesPredefinedDefaultKey = ffc("config.namespaces.predefined[].defaultkey", "A default signing key for blockchain transactions within this namespace", i18n.StringType) - ConfigNamespacesPredefinedKeyNormalization = ffc("config.namespaces.predefined[].asset.manager.keynormalization", "Mechanism to normalize keys before using them. Valid options are `blockchain_plugin` - use blockchain plugin (default) or `none` - do not attempt normalization", i18n.StringType) + ConfigNamespacesPredefinedDefaultKey = ffc("config.namespaces.predefined[].defaultKey", "A default signing key for blockchain transactions within this namespace", i18n.StringType) + ConfigNamespacesPredefinedKeyNormalization = ffc("config.namespaces.predefined[].asset.manager.keyNormalization", "Mechanism to normalize keys before using them. Valid options are `blockchain_plugin` - use blockchain plugin (default) or `none` - do not attempt normalization", i18n.StringType) ConfigNamespacesMultipartyEnabled = ffc("config.namespaces.predefined[].multiparty.enabled", "Enables multi-party mode for this namespace (defaults to true if an org name or key is configured, either here or at the root level)", i18n.BooleanType) ConfigNamespacesMultipartyOrgName = ffc("config.namespaces.predefined[].multiparty.org.name", "A short name for the local root organization within this namespace", i18n.StringType) ConfigNamespacesMultipartyOrgDesc = ffc("config.namespaces.predefined[].multiparty.org.description", "A description for the local root organization within this namespace", i18n.StringType) diff --git a/internal/identity/identitymanager.go b/internal/identity/identitymanager.go index 267268acd..730164a9e 100644 --- a/internal/identity/identitymanager.go +++ b/internal/identity/identitymanager.go @@ -134,7 +134,7 @@ func (im *identityManager) NormalizeSigningKey(ctx context.Context, inputKey str } // If the caller is not confident that the blockchain plugin/connector should be used to resolve, // for example it might be a different blockchain (Eth vs Fabric etc.), or it has its own - // verification/management of keys, it should set `namespaces.predefined[].asset.manager.keynormalization: "none"` in the config. + // verification/management of keys, it should set `namespaces.predefined[].asset.manager.keyNormalization: "none"` in the config. if keyNormalizationMode != KeyNormalizationBlockchainPlugin { return inputKey, nil } diff --git a/test/e2e/gateway/tokens_only.go b/test/e2e/gateway/tokens_only.go index aca4b32f9..022140312 100644 --- a/test/e2e/gateway/tokens_only.go +++ b/test/e2e/gateway/tokens_only.go @@ -63,7 +63,7 @@ func (suite *TokensOnlyTestSuite) TestTokensOnlyNamespaces() { "name": testNamespace, "asset": map[string]interface{}{ "manager": map[string]interface{}{ - "keynormalization": "none", + "keyNormalization": "none", }, }, "plugins": []string{"database0", suite.connector},