Fix further dsl-reference.md / schema/workflow.yaml mismatches#1161
Fix further dsl-reference.md / schema/workflow.yaml mismatches#1161dimastbk wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Aligns the DSL documentation, examples, and JSON Schema to resolve lingering mismatches (follow-up to #1156), ensuring the written reference matches the authoritative schema and SDK conventions.
Changes:
- Updates
dsl-reference.mdto match schema constraints and types (AsyncAPI args optionality, catch error filtering path, duration key casing, pull policy enum values,issuerstyping, etc.). - Standardizes script language token usage to
jsacross docs and an example. - Updates
schema/workflow.yamlto require OAuth2/OIDC inlineauthority+grant, and renameserrorFilter.details→errorFilter.detail.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| schema/workflow.yaml | Requires OAuth2/OIDC inline authority/grant and renames errorFilter.details to detail. |
| examples/run-script-with-stdin-and-arguments.yaml | Switches script language to js in the example. |
| dsl.md | Updates the script example language token from javascript to js. |
| dsl-reference.md | Multiple doc updates to match schema (AsyncAPI requirements, run workflow namespace, catch errors filter path, enums, duration casing, and issuer typing). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: | ||
| script: | ||
| language: javascript | ||
| language: js |
Follow-up to the mismatches reported in serverlessworkflow#1156: Doc alignments (dsl-reference.md): - Add the required `namespace` property to the Run -> Workflow Process table. - Remove the spurious `extension` value from the extension `extend` enum (there is no "extension" task type). - Mark AsyncAPI `channel`/`operation` as optional; they are mutually alternative depending on the AsyncAPI version, not both required. - Document catch `errors.with` as the static error filter, matching the schema and examples. - Lowercase the Duration property names (days, hours, ...) to match the schema keys. - Document the `pullPolicy` enum values (ifNotPresent, always, never). - Change `issuers` from `uri-template[]` to `string[]` to match the schema and RFC 7519 (StringOrURI). Script language token (js): - Standardize the script language token on `js` (as used by the Java SDK), replacing `javascript` in dsl-reference.md, dsl.md and the example. Schema (schema/workflow.yaml): - Rename the errorFilter `details` property to `detail`, matching the `error` definition and RFC 7807. - Require `authority` and `grant` for inline OAuth2/OIDC authentication (oauth2AuthenticationProperties); `grant_type` is REQUIRED per RFC 6749 and neither field has a default. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Dmitriy <dimastbk@proton.me>
38e5e46 to
8987433
Compare
|
Regarding this:
I don't think Unfortunately, what I have found is that Having said that, I think |
|
@ricardozanini Same here. Whatever you guys fancy, both are ubiquitous enough anyways. |
|
|
||
| > [!NOTE] | ||
| > Exactly one of `channel` (AsyncAPI `v2.6.0`) or `operation` (AsyncAPI `v3.0.0`) **must** be set, paired with exactly one of `message` or `subscription`. | ||
|
|
There was a problem hiding this comment.
This should be enforced by the schema. Do you think you can do it?
@fjtirado since you are familiar with this implementation, does this change resonate with you?
Follow-up to the mismatches reported in #1156:
Doc alignments (dsl-reference.md):
namespaceproperty to the Run -> Workflow Process table.extensionvalue from the extensionextendenum (there is no "extension" task type).channel/operationas optional; they are mutually alternative depending on the AsyncAPI version, not both required.errors.withas the static error filter, matching the schema and examples.pullPolicyenum values (ifNotPresent, always, never).issuersfromuri-template[]tostring[]to match the schema and RFC 7519 (StringOrURI).Script language token (js):
js(as used by the Java SDK), replacingjavascriptin dsl-reference.md, dsl.md and the example.Schema (schema/workflow.yaml):
detailsproperty todetail, matching theerrordefinition and RFC 7807.authorityandgrantfor inline OAuth2/OIDC authentication (oauth2AuthenticationProperties);grant_typeis REQUIRED per RFC 6749 and neither field has a default.