test-fullautomation / python-jsonpreprocessor

A preprocessor for json files
Apache License 2.0
3 stars 2 forks source link

Import paths extracted from dictionaries and lists, not resolved #382

Open HolQue opened 2 days ago

HolQue commented 2 days ago

JSON:

"import_files" : {
                   "fileAA" : "./dynamic_imports/AA/imported.AA.jsonp",
                   "fileBB" : "./dynamic_imports/AA/BB/imported.BB.jsonp",
                   "fileCC" : "./dynamic_imports/AA/BB/CC/imported.CC.jsonp"
                 },
"[import]" : ${import_files}['fileAA']

Result:

Error: 'File '%import_files%['fileAA']' is not existing!'!

Alternative:

"[import]" : "${import_files}['fileAA']"

Result:

Error: 'File '%import_files%['fileAA']__ConvertParameterToString__' is not existing!'!

The same with import paths from lists.

Expected: Paths resolved and files imported.

HolQue commented 1 day ago

JPP_1109 JPP_1110

HolQue commented 12 hours ago

Alternatively both ways (with and without quotes) executed together:

"[import]" : ${import_files}['fileAA'],
"[import]" : "${import_files}['fileBB']"

Result:

'File '%import_files%['fileBB']__ConvertParameterToString__' is not existing!'!

This is related to the 'fileBB' error. The 'fileAA' error is not shown.

Expected: Already the first error ('fileAA') should stop the computation.