Skip to content

Parameter in dotdict expressions: position dependency #194

@HolQue

Description

@HolQue

Data structure created implicitly:

${testdict.subKey.subKey.paramA} : "DEF",

Some parameters with name of existing keys:

"keyName_1" : "subKey",
"keyName_2" : "paramA",

Subkeys referenced by parameter:

This works:

${testdict.subKey.subKey.${keyName_2}} : "GHI"

Outcome:

{'keyName_1': 'subKey',
 'keyName_2': 'paramA',
 'testdict': {'subKey': {'subKey': {'paramA': 'GHI'}}}}

This causes an error:

${testdict.subKey.${keyName_1}.paramA} : "GHI"

Outcome:

Error: 'Invalid parameter format: ${testdict.subKey.${keyName_1}.paramA}'!

Seems that the proper outcome of parameters inside dot notation expressions depends on the position of the parameter inside the expression.

Crosscheck with not existing key:

"keyName_3" : "IAMNOTEXISTING",

This works like expected:

${testdict.subKey.subKey.${keyName_3}} : "JKL"

Outcome:

Error: 'The implicit creation of data structures based on nested parameter is not supported. ...

But position issue:

${testdict.subKey.${keyName_3}.paramA} : "JKL"

Outcome:

Error: 'Invalid parameter format: ${testdict.subKey.${keyName_3}.paramA}'!

The expected behavior should be clarified. The outcome should be aligned.

Metadata

Metadata

Assignees

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions