Skip to content

fix: mark the accessor to a deprecated path as deprecated, not the one under a deprecated parent - #8476

Merged
Vincent Biret (baywet) merged 1 commit into
microsoft:mainfrom
andreaTP:fix/navigation-property-deprecation
Oct 27, 2026
Merged

Vincent Biret (baywet) merged 1 commit into
microsoft:mainfrom
andreaTP:fix/navigation-property-deprecation

Conversation

@andreaTP

Copy link
Copy Markdown
Contributor

A navigation property took the deprecation of the path it is declared on, not of the path it leads to: a deprecated /legacy under a live /api was not flagged, and every child of a deprecated path was. It now takes the child path's deprecation.

GeneratesUritemplateHints.yaml gains a deprecated path and a deprecated operation; it generates and builds in all languages, and generation stays idempotent.

@andreaTP
Andrea Peruffo (andreaTP) requested a review from a team as a code owner October 27, 2026 12:52
Copilot AI balanced review requested due to automatic review settings October 27, 2026 12:52
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for opening this pull request! Please link it to an issue by adding the fixes syntax to the pull request description, for example: Fixes #1234.

Copilot AI 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.

🟢 Approval recommended

The narrow correction aligns with other navigation accessors, includes focused regression coverage, and has no identified blocking issues.

No open issues 🎉

What changed in this PR

Corrects navigation-property deprecation so an accessor reflects the child path it leads to, rather than its parent path.

Changes:

  • Uses the child node’s deprecation metadata when creating navigation properties.
  • Adds regression coverage and integration fixtures for deprecated endpoints and query parameters.
  • Documents the behavior correction in the changelog.
File Description
tests/​Kiota.Builder.Tests/​KiotaBuilderTests.cs Verifies deprecated child metadata and unaffected live accessors.
tests/​Kiota.Builder.IntegrationTests/​GeneratesUritemplateHints.yaml Adds a deprecated endpoint and query parameter.
src/​Kiota.Builder/​KiotaBuilder.cs Sources navigation-property deprecation from the child node.
CHANGELOG.md Describes the corrected deprecation behavior.

Review effort: Balanced

@baywet
Vincent Biret (baywet) added this pull request to the merge queue Oct 27, 2026
Merged via the queue into microsoft:main with commit f5eee35 Oct 27, 2026
341 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.

3 participants