The fcli * rest call commands are expected to do input and record transformation by default, allowing this behavior to be disabled through the --no-transform option. However, there are some issues with this approach:
Users may expect to see the same record transformations as on other fcli commands.
For example, when calling fcli ssc rest call /api/v1/projectVersions, users may expect the project property to be renamed to application just like in the fcli ssc appversion list command
However, since most record transformations are defined at command-level rather than product level, such transformations will not take place and thus the rest call command above will output the project property as-is
The --no-transform option currently doesn't have any effect, as currently there is no way to 'override' the default input transformations performed by the product helper mixins
We can't really fix the first issue in a nice way (we'd need to move all command/entity-specific record transformations to the central product helper). We should however fix the second issue, as users may be interested in seeing the raw response data to access for example the SSC count, responseCode and links properties.
Apart from fixing the above, we may want to allow for extracting arbitrary data from the response using an SpEL expression (allowing to specify a property path, using collection selection/projection, ...).
The
fcli * rest call
commands are expected to do input and record transformation by default, allowing this behavior to be disabled through the--no-transform
option. However, there are some issues with this approach:fcli ssc rest call /api/v1/projectVersions
, users may expect theproject
property to be renamed toapplication
just like in thefcli ssc appversion list
commandrest call
command above will output theproject
property as-is--no-transform
option currently doesn't have any effect, as currently there is no way to 'override' the default input transformations performed by the product helper mixinsWe can't really fix the first issue in a nice way (we'd need to move all command/entity-specific record transformations to the central product helper). We should however fix the second issue, as users may be interested in seeing the raw response data to access for example the SSC
count
,responseCode
andlinks
properties.Apart from fixing the above, we may want to allow for extracting arbitrary data from the response using an SpEL expression (allowing to specify a property path, using collection selection/projection, ...).