Skip to content

feat(ls): validation resolve local reference#5113

Merged
lukaszzazulak merged 7 commits intomainfrom
feat/resolve-local-reference
Feb 16, 2026
Merged

feat(ls): validation resolve local reference#5113
lukaszzazulak merged 7 commits intomainfrom
feat/resolve-local-reference

Conversation

@lukaszzazulak
Copy link
Contributor

This PR fixes a validation gap where the presence of a path parameter reference caused the validator to incorrectly mark the document as valid without verifying that all required parameters were actually defined.

@lukaszzazulak lukaszzazulak requested a review from Copilot February 9, 2026 12:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a validation gap where $ref parameters in path/operation parameter lists could cause the path-template/parameter matching rule to incorrectly pass without verifying that referenced parameters are actually defined.

Changes:

  • Resolves local (#/...) $ref Parameter Objects during path template validation so referenced in: path + name are counted.
  • Updates validation tests to expect additional diagnostics when referenced path parameters don’t actually match the path template.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
packages/apidom-ls/src/services/validation/linter-functions.ts Adds local $ref resolution for parameter elements before building the set of path parameters used for template matching.
packages/apidom-ls/test/validate.ts Extends expected diagnostics to cover cases where $ref parameters previously masked missing required path params.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@robert-hebel-sb
Copy link
Contributor

Looks good; but should be verified with a test 🧪

@lukaszzazulak lukaszzazulak merged commit a230752 into main Feb 16, 2026
9 checks passed
@lukaszzazulak lukaszzazulak deleted the feat/resolve-local-reference branch February 16, 2026 11:01
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