Fix TypeScript enum response imports for indexed endpoints - #8239
Shubham Padkonde (Shubham-Padkonde) wants to merge 10 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Fixes missing TypeScript enum response imports for indexed endpoints by inspecting request-builder classes directly.
Changes:
- Corrects enum-object import discovery.
- Adds regression tests for ordinary and path-parameter endpoints.
- Documents the fix in the changelog.
| File | Description |
|---|---|
tests/Kiota.Builder.Tests/KiotaBuilderTests.TypeScriptEnumResponse.cs |
Adds regression coverage. |
src/Kiota.Builder/Refiners/TypeScriptRefiner.cs |
Corrects enum response import discovery. |
CHANGELOG.md |
Documents the fix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Shubham Padkonde (@Shubham-Padkonde) your behaviour is disruptive, opening about 30 PRs on the repos in a couple of hours time, most likely code that was AI generated and not tested/reviewed, will only clog our review pipeline. Please stop opening additional pull requests and work on the comments added to existing ones. We have turned on pull requests limits on this repository, and will proceed to blocking you at the organization level if additional pull requests are opened on other repositories before the already opened ones are reviewed and closed/or merged. |
|
Shubham Padkonde (@Shubham-Padkonde) this PR is conflicting, would you mind handling the conflicts when you have a minute please? |
|
This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged. |
|
Conflicts have been resolved. A maintainer will take a look shortly. |
|
This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged. |
|
Conflicts have been resolved. A maintainer will take a look shortly. |
|
This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged. |
|
Conflicts have been resolved. A maintainer will take a look shortly. |
|
This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged. |
|
Conflicts have been resolved. A maintainer will take a look shortly. |
Fixes #6884.
Enum response objects were imported by inspecting request-builder navigation properties. Builders reached through path parameters can instead be referenced by navigation methods, leaving their response metadata with an undefined enum object. Inspect each request-builder class directly so the import does not depend on the navigation shape.
Two regressions cover an ordinary endpoint and an endpoint with a path parameter. The latter fails before the change; the ordinary endpoint remains a passing control.
Developed with Codex assistance.
Validation:
UserAppGroupObjectbefore this fix. The entire generated client compiles after the fix with TypeScript 5.8.2 and Kiota TypeScript packages 1.0.0-preview.107.sendEnumreferences the exported enum object with all three expected values. No HTTP requests were sent.The unrelated full builder suite was not rerun for this TypeScript-only import change.