jsonschema2pojo
jsonschema2pojo copied to clipboard
Support using '-' as CLI argument to read from stdin
idea I had was to enable using - as reading from standard input so you can do something like:
curl https://api.github.com/users/maxandersen | jbang --debug org.jsonschema2pojo:jsonschema2pojo-cli:1.1.3-SNAPSHOT --source - --target out -T json
would that be interesting ? (if yes I'll investigate adding tests for it)
things I noticed doing this that i'm not sure is expected or bugs:
when treating input as schema the same url is requested multiple times in ContentResolver requiring me to add a cache for standard input...maybe should instead do it generically instead of reading url multiple times?
when treating input as json then content resolvers are NOT used but instead read directly so had to add - handling of urls redundantly.
wdyt ?
Anyone with a comment ?
This is a nice little addition max, thanks for submitting.
It's been a while since I replied and updated based on comments.
Any chance or merging this?