Skip to content

fix(workflow): use $sourceDescriptions for workflow references#2867

Open
harshit078 wants to merge 10 commits into
Redocly:mainfrom
harshit078:fix-respect-workflow-reference
Open

fix(workflow): use $sourceDescriptions for workflow references#2867
harshit078 wants to merge 10 commits into
Redocly:mainfrom
harshit078:fix-respect-workflow-reference

Conversation

@harshit078

@harshit078 harshit078 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

What/Why/How?

  • Added support for the Arazzo workflow reference form $sourceDescriptions.<name>.<workflowId>.
  • The previous $sourceDescriptions.<name>.workflows.<workflowId> form is still maintained.

Reference

#2826

Testing

Screenshots (optional)

Check yourself

  • This PR follows the contributing guide
  • All new/updated code is covered by tests
  • Core code changed? - Tested with other Redocly products (internal contributions only)
  • New package installed? - Tested in different environments (browser/node)
  • Documentation update has been considered

Security

  • The security impact of the change has been considered
  • Code follows company security practices and guidelines

Note

Low Risk
Localized change to context path parsing with backward compatibility and broad test updates; no auth or data-layer impact.

Overview
Adds Arazzo-compliant external workflow references as $sourceDescriptions.<name>.<workflowId> (without a .workflows. segment) in get-value-from-context resolution, so Respect can resolve referenced workflows the way the spec describes.

The older $sourceDescriptions.<name>.workflows.<workflowId> syntax still works. For the spec form, if the third segment is not a matching workflowId, resolution falls back to a property on the source description (e.g. $sourceDescriptions.test.url).

Tests and flow-runner examples were updated to the spec form, with explicit coverage for legacy paths and spec fallbacks.

Reviewed by Cursor Bugbot for commit d692b6c. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d692b6c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@redocly/respect-core Patch
@redocly/cli Patch
@redocly/openapi-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@harshit078 harshit078 changed the title respect workflow references must use $sourceDescriptions fix(workflow): use $sourceDescriptions for workflow references Jun 15, 2026
@harshit078 harshit078 marked this pull request as ready for review June 15, 2026 10:07
@harshit078 harshit078 requested review from a team as code owners June 15, 2026 10:07
@harshit078

Copy link
Copy Markdown
Contributor Author

Hi @DmitryAnansky , Can you review the PR and check it ? Thanks !

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Performance Benchmark (Lower is Faster)

CLI Version Bundle Lint Check Config
cli-latest ▓ 1.00x ± 0.02 ▓ 1.00x ± 0.01 ▓ 1.00x (Fastest)
cli-next ▓ 1.00x (Fastest) ▓ 1.00x (Fastest) ▓ 1.01x ± 0.01

if (workflow) {
return workflow;
}
}

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.

Probably we need to handle case with

    if (isLegacyForm) {
      return undefined;
    }

Comment thread packages/respect-core/src/modules/context-parser/get-value-from-context.ts Outdated
@DmitryAnansky

Copy link
Copy Markdown
Contributor

Could you please update existing tests to use correct and not legacy format?

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 658bf13. Configure here.

@harshit078 harshit078 requested a review from DmitryAnansky June 23, 2026 08:03
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.

2 participants