Skip to content

Remove includeRootSlash client option logic from http-client-python - #9964

Merged
Chenjie Shi (tadelesh) merged 3 commits into
mainfrom
copilot/remove-includerootslashoption-logic
Mar 9, 2026
Merged

Chenjie Shi (tadelesh) merged 3 commits into
mainfrom
copilot/remove-includerootslashoption-logic

Conversation

Copilot AI commented Mar 9, 2026 •

Copy link
Copy Markdown
Contributor

The @clientOption("includeRootSlash") decorator was a workaround in the Python emitter to control stripping the leading slash from operation paths. This is a TypeSpec core concern and should not be solved via a custom decorator.

  • Removed getClientOptions import (only consumer)
  • Removed the client hierarchy walk that resolved the includeRootSlash option
  • Simplified URL to use operation.path directly instead of conditionally stripping the leading slash

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

This logic was using a customized decorator (@clientoption("includeRootSlash"))
to control stripping of the leading slash from operation paths. This is a
TypeSpec core issue and should not be handled with a customized decorator.

Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Mar 9, 2026
Copilot AI changed the title [WIP] Remove includeRootSlashOption logic from http-python-client Remove includeRootSlash client option logic from http-client-python Mar 9, 2026
@pkg-pr-new

pkg-pr-new Bot commented Mar 9, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-python@9964

commit: f0c8787

@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • ✅ @typespec/http-client-python
Show changes

@typespec/http-client-python - fix ✏️

Remove includeRootSlash client option logic, which should be handled at the TypeSpec core level

@tadelesh
Chenjie Shi (tadelesh) added this pull request to the merge queue Mar 9, 2026
Merged via the queue into main with commit b900cab Mar 9, 2026
26 checks passed
@tadelesh
Chenjie Shi (tadelesh) deleted the copilot/remove-includerootslashoption-logic branch March 9, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants