Badri,

We don't have a schema available (because we don't validate or test against
the schema). But to answer your specific question about the possible values
of the fields —

This code
<https://github.com/gocd/gocd/blob/3c001b1d376263e964495723fb76a4771ca8a705/plugin-infra/go-plugin-access/src/com/thoughtworks/go/plugin/access/notification/v2/StageNotificationDTO.java#L137-L147>
is
what is responsible for rendering the stage JSON. It seems like we're
stringifying some
<https://github.com/gocd/gocd/blob/3c001b1d376263e964495723fb76a4771ca8a705/domain/src/com/thoughtworks/go/domain/StageState.java>
enums
<https://github.com/gocd/gocd/blob/3c001b1d376263e964495723fb76a4771ca8a705/domain/src/com/thoughtworks/go/domain/StageResult.java>
from core. Would you mind submitting a PR to improve the documentation?


On Wed, Mar 22, 2017 at 5:48 AM Badri Janakiraman <[email protected]>
wrote:

> Hello
>
> I am trying to understand a couple of things about the StageStatusChange
> message.
>
>    1. Does it get sent when a stage starts AND finishes - or is it only
>    sent when one finishes? I assume both - but I wanted to check.
>    2. Are there samples for the content and structure of this message for
>    when the stage starts? Or if it gets re-run?
>
> I noticed that there is an example here:
> https://plugin-api.gocd.io/current/notifications/#stage-status-changed -
> but that seems to be for a simple stage completion for a stage with with
> exactly one job. How can we know what values to expect for the various
> fields like state and status at the stage and job levels? Is this just
> something that we have to run and see? Is there a JSON schema somewhere
> that gives us some information about the expected structure - similar to
> the plugin.xml schema that is published here
> <https://github.com/gocd/gocd/blob/master/plugin-infra/go-plugin-api/resources/plugin-descriptor.xsd>
> ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "go-cd" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to