Skip to content
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

flowDirective schema does not support task names #862

Closed
matthias-pichler opened this issue May 29, 2024 · 1 comment · Fixed by #863
Closed

flowDirective schema does not support task names #862

matthias-pichler opened this issue May 29, 2024 · 1 comment · Fixed by #863
Assignees
Labels
area: spec Changes in the Specification change: fix Something isn't working. Impacts in a minor version change.
Milestone

Comments

@matthias-pichler
Copy link
Collaborator

matthias-pichler commented May 29, 2024

What seems off:

the schema for the flow directive is:

{
  "flowDirective": {
    "type": "string",
    "enum": [
      "continue",
      "exit",
      "end"
    ],
    "default": "continue"
  }
}

while the docs mention that one can also specify the name of a task: https://github.com/serverlessworkflow/specification/blob/v1.0.0-alpha1/dsl.md#task-flow

and since flowDirective is also used in the schema for the switch task the examples would not pass validation: https://github.com/serverlessworkflow/specification/blob/v1.0.0-alpha1/dsl-reference.md#switch

What you expected to be:

{
  "flowDirective": {
    "anyOf": [
      {
        "type": "string",
        "enum": [
          "continue",
          "exit",
          "end"
        ],
        "default": "continue"
      },
      {
        "type": "string"
      }
    ]
  }
}

Anything else we need to know?:

Environment:

  • Specification version used: 1.0.0-alpha1
@ricardozanini
Copy link
Member

Thanks @matthias-pichler-warrify! I'll take a look at it today.

@ricardozanini ricardozanini added change: fix Something isn't working. Impacts in a minor version change. area: spec Changes in the Specification labels May 29, 2024
ricardozanini added a commit to ricardozanini/sw-specification that referenced this issue May 29, 2024
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
@ricardozanini ricardozanini modified the milestones: v1.0.0, v1.0.0-alpha2 May 29, 2024
cdavernas added a commit that referenced this issue May 29, 2024
Fix #862 - Switch 'then' must accept free strings
@github-project-automation github-project-automation bot moved this from Backlog to Done in Progress Tracker May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: spec Changes in the Specification change: fix Something isn't working. Impacts in a minor version change.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants