Skip to content

feat: forward cookies when resolving remote refs in API validation - #2281

Open
Aastha204 wants to merge 1 commit into
asyncapi:masterfrom
Aastha204:feat/cookie-ref-resolver
Open

feat: forward cookies when resolving remote refs in API validation#2281
Aastha204 wants to merge 1 commit into
asyncapi:masterfrom
Aastha204:feat/cookie-ref-resolver

Conversation

@Aastha204

Copy link
Copy Markdown

Description

  • Forwards the incoming Cookie header when the API validation middleware resolves remote $refs
  • Extends createHttpWithAuthResolver and ValidationService to accept an optional cookie parameter
  • Removes the obsolete TODO resolvers stub in validation.middleware.ts
  • Adds unit tests for cookie present, absent, empty, and auth+cookie together

Related issue(s)
Fixes #1985

Test results

New resolver tests (4 passing):

image

Existing ValidationService tests still pass (8 passing, no regressions):

image

Documentation

No user-facing documentation update required — this is an internal middleware change with no new CLI flags or API endpoints. Release notes are handled by the changeset file (.changeset/cookie-ref-resolver.md).

@changeset-bot

changeset-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ff14dc7

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

This PR includes changesets to release 1 package
Name Type
@asyncapi/cli 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

@sonarqubecloud

Copy link
Copy Markdown

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

Labels

None yet

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add cookie-based resolvers for request validation

1 participant