Hi,
I'm currently working on adding more metadata on resource attributes and operation
parameters or replies [1].
As an example I added the fact that an attribute of type STRING is in fact a filesystem
path or an URL [2].
To show how this kind of metadata could be helpful I have updated the CLI so that it uses
the filesystem path completer and to try to
validate the operation parameters :
for example checking that an URL has a correct format before executing an operation.
This led me to provide more validation : checking that an integer is in the valid range,
etc.
Brian rightfully pointed out that in some case we are defining than an operation parameter
is defined a certain type while the handler
supports multiple types :
for example the DeploymentAddhandler.CONTENT_ALL should get a LIST of only one object
but supports getting the object directly.
So I'm wondering about adding support for range or type validation for
'complex' types as it may break existing valid (as in accepted even
if wrong) operations.
What do you think ? Do you see other edge cases like this one ?
Emmanuel
1:
https://issues.jboss.org/browse/WFCORE-74
2:
https://github.com/ehsavoie/wildfly-core/tree/WFCORE-74