-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Harden-expression-and-condition-capabilities #77
Harden-expression-and-condition-capabilities #77
Conversation
Love where this is going. Fantastic work Frank. I am approving this as I don't see any major issue with it at this time, but as agreed we'll discuss next workflows meeting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
Happy to approve as-is, but left a comment in case anyone else has an opinion?
versions/1.0.0.md
Outdated
---|:---:|--- | ||
<a name="criterionContext"></a>context | `{expression}` | A [runtime expression](#runtime-expressions) used to set the context for the condition to be applied on. If `type` is specified, then the `context` MUST be provided (e.g. `$response.body` would set the context that a JSONPath query expression could be applied to). | ||
<a name="criterionCondition"></a>condition | `string` | **REQUIRED**. The condition to apply. Conditions can be simple (e.g. `$statusCode == 200` which applies a operator on a value obtained from a runtime expression), or a regex, or a JSONPath expression. For regex and [JSONPath](https://datatracker.ietf.org/doc/draft-ietf-jsonpath-base/21/), the `type` and `context` MUST be specified. | ||
<a name="criterionType"></a>type | `string` | The type of condition to be applied. If specified, the options allowed are `regex` or `JSONPath`. If omitted, then the condition is assumed to be simple, which at most combines literals, operators and [Runtime Expressions](#runtime-expressions). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in two minds about this myself - but should be add a simple
type which is the default type, instead of having an implicit simple type if none is specified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was very much on the fence here. For completeness, it's probably better to have it as part of allowed values. I doubt, I'd ever write it but no harm in allowing folks to be explicit if they want to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extended to now support simple
I will update some of the verbiage around Step.successCriteria (to highlight its and AND operation) and also within Action Success/Failure (it's an OR). |
@ndenny @kevin-postman I've made the additional changes as we discussed yesterday. If all are happy, let's merge |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
fixes #44