data-weave-cli
data-weave-cli copied to clipboard
Using readUrl with classpath
Describe the bug So im trying to write a Dataweave CLI script that loades the files from filesystem during runtime. The only command as i am aware of can read files from the filesystem i readUrl via classpath. (Maybe there's another one?) Now since this is not a Java-projekt i don't realy know where dataweave is tring to open the files from. Tried to read files from root-folder, from my current running folder, relative from the binary location and tried setting DW_HOME but nothing works. Is this a bug or do we only need some extra documenation on this?
Dataweave CLI rocks, thanks!
To Reproduce Trying to run this command
Example raml file
...
"resourceTypes":
"myResourseType": "folder1/folder2/file1.raml"
...
dw run -i api=api.raml 'input api application/yaml --- api.resourceTypes mapObject ((value, key) -> (key): readUrl(("classpath://" ++ value),"text/plain"))'
Expected behavior That i would have loaded a few files from my filesystem.
Desktop (please complete the following information):
- Linux 6.5.0-26-generic
- DW, Command Line : V1.0.34, Runtime : V2.6.0-SNAPSHOT