On 8/18/15 4:28 AM, Jeff Mesnil wrote:
> On 14 Aug 2015, at 08:32, Stuart Douglas <stuart.w.douglas(a)gmail.com> wrote:
>
> I have a PR that builds on Brian's work for the web migrate op:
https://github.com/wildfly/wildfly/pull/7931
>
> Output is:
>
> Standard EAP config (no warnings or errors):
>
> [standalone@localhost:9999 /] /subsystem=web:migrate
> {
> "outcome" => "success",
> "result" => {"migration-warnings" => []}
> }
I wonder if we should generalize this and move the warnings outside the result.
The warnings could go in the response headers for example as a LIST of STRING.
The result output would be something like:
{
"outcome" : "success",
"result" : { … }
"response-headers" : [{
"warnings" : [
“warning 1”,
“warning 2”
]
}]
}
This would help our clients (CLI and HAL) handle them appropriately regardless of the
invoked operation. And this would not “pollute” the operation’s result type.
A general warning response header sounds ok, but I don't think we have
time to implement that for WF 10. It's easy enough for the simple case,
but less so for stuff like composite ops that result in updates to
multiple processes in a domain.
jeff
--
Brian Stansberry
Senior Principal Software Engineer
JBoss by Red Hat