Skip to content

Fix further dsl-reference.md / schema/workflow.yaml mismatches#1161

Open
dimastbk wants to merge 1 commit into
serverlessworkflow:mainfrom
dimastbk:fix/dsl-reference-schema-mismatches-2
Open

Fix further dsl-reference.md / schema/workflow.yaml mismatches#1161
dimastbk wants to merge 1 commit into
serverlessworkflow:mainfrom
dimastbk:fix/dsl-reference-schema-mismatches-2

Conversation

@dimastbk

Copy link
Copy Markdown
Contributor

Follow-up to the mismatches reported in #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.

Copilot AI review requested due to automatic review settings June 30, 2026 13:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md to match schema constraints and types (AsyncAPI args optionality, catch error filtering path, duration key casing, pull policy enum values, issuers typing, etc.).
  • Standardizes script language token usage to js across docs and an example.
  • Updates schema/workflow.yaml to require OAuth2/OIDC inline authority + grant, and renames errorFilter.detailserrorFilter.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.

Comment thread dsl-reference.md
Comment thread dsl-reference.md Outdated
Comment thread dsl-reference.md Outdated
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>
@dimastbk dimastbk force-pushed the fix/dsl-reference-schema-mismatches-2 branch from 38e5e46 to 8987433 Compare June 30, 2026 13:20
@ricardozanini

Copy link
Copy Markdown
Member

Regarding this:

Standardize the script language token on js (as used by the Java SDK), replacing javascript in dsl-reference.md, dsl.md and the example.

I don't think js change should be supported by the usage in the Java SDK, but by the Mozilla standard.

Unfortunately, what I have found is that JavaScript is a trademark owned by Oracle, and the "official" name is supposed to be ECMAScript (es). I don't think this name is as popular as javascript thou.

Having said that, I think js or javascript is fine. The SDK should actually follow the spec, not the other way around. But I'm fine changing this to js for short. I don't have a strong opinion about it.

@cdavernas

Copy link
Copy Markdown
Member

@ricardozanini Same here. Whatever you guys fancy, both are ubiquitous enough anyways.

Comment thread dsl-reference.md

> [!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`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants