Skip to content

feat(validation): check x-correlator documentation - #376

Merged
hdamker merged 2 commits into
camaraproject:mainfrom
LarryHu0217:codex/x-correlator-doc-371
Jul 16, 2026
Merged

feat(validation): check x-correlator documentation#376
hdamker merged 2 commits into
camaraproject:mainfrom
LarryHu0217:codex/x-correlator-doc-371

Conversation

@LarryHu0217

Copy link
Copy Markdown
Contributor

What type of PR is this?

enhancement/feature

What this PR does / why we need it:

Adds two warning-level Spectral rules that require every regular and callback operation to document the x-correlator request header parameter and every documented response to expose the corresponding response header. The custom function honors path-level parameters and Spectral-resolved local or external references.

Which issue(s) this PR fixes:

Fixes #371

Special notes for reviewers:

The focused regression coverage includes inline definitions, path-level inheritance, local component references, external references, success and error responses, and callbacks.

Test evidence:

  • python -m pytest validation/tests tooling_lib/tests -q (1214 passed, 4 skipped)
  • node --check linting/config/lint_function/*.js
  • npm ci --ignore-scripts using the repository-required npm 11.13.0

Changelog input

release-note
Add warning-level validation for x-correlator request parameter and response header documentation.

Additional documentation

docs

@hdamker hdamker 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.

(double post — see the identical review below)

@hdamker hdamker 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.

Thanks @LarryHu0217 — good implementation of #371. The external $ref resolution and the callback coverage match the proposal, and the regression tests are thorough. One small suggestion inline to keep the ruleset header changelog complete.

Comment thread linting/config/.spectral-r4.yaml
@hdamker
hdamker requested a review from wrathwolf July 15, 2026 17:14

@hdamker hdamker 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.

LGTM (EasyCLA status clarified as well)

@Kevsy Kevsy 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.

LGTM

@hdamker
hdamker merged commit 49bb5a9 into camaraproject:main Jul 16, 2026
8 checks passed
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.

Add validation rule: x-correlator documentation coverage (request parameter + response header)

3 participants