I'm trying to generate proxy classes from a pretty big ERP OData endpoint, and the tool fails with the error: argument list too long: odata-cli
I've created a pipe of commands to exclude all types but one, and it is valid but fails due to a great amount of -est argument length.
$ odata-cli generate -m "https://.....dynamics.com/data/" -o "." -fn "ERPODataClient" -ucc -iue -est "$(cat ConnectedService.json | jq '.ExtendedData.ExcludedSchemaTypes' | sed '1d;$d' | sed 's/[ "]//g' | awk -v d="" '{s=(NR==1?s:s d)$0}END{print s}')" -ebo "$(cat ConnectedService.json | jq '.ExtendedData.ExcludedBoundOperations' | sed '1d;$d' | sed 's/[ "]//g' | sed 's/(.*//g' | sed 's/$/,/g' | awk -v d="" '{s=(NR==1?s:s d)$0}END{print s}'TypeV2)"
I want tool to be able to read input args from .json config like in Visual Studio extension which generates ConnectedService.json file from which it executes the generation of proxy classes.
If I add in the pipe head -n 100 to limit to 100 lines which I concatenate into -est and -ebo argument, then all is okay.
odata-cli generate -m "https://foo-test.sandbox.operations.dynamics.com/data/" -o "." -fn "ERPODataClient" -ucc -iue -est "$(cat ConnectedService.json | jq '.ExtendedData.ExcludedSchemaTypes' | sed '1d;$d' | sed 's/[ "]//g' | head -n 100 | awk -v d="" '{s=(NR==1?s:s d)$0}END{print s}')" -ebo "$(cat ConnectedService.json | jq '.ExtendedData.ExcludedBoundOperations' | sed '1d;$d' | sed 's/[ "]//g' | sed 's/(.*//g' | sed 's/$/,/g' | head -n 100 | awk -v d="" '{s=(NR==1?s:s d)$0}END{print s}'TypeV2)"
I'm trying to generate proxy classes from a pretty big ERP OData endpoint, and the tool fails with the error:
argument list too long: odata-cliI've created a pipe of commands to exclude all types but one, and it is valid but fails due to a great amount of
-estargument length.I want tool to be able to read input args from .json config like in Visual Studio extension which generates
ConnectedService.jsonfile from which it executes the generation of proxy classes.If I add in the pipe
head -n 100to limit to 100 lines which I concatenate into-estand-eboargument, then all is okay.