Skip to content

[http-client-python] Apply includeRootSlashOption to operation level#9929

Open
Copilot wants to merge 3 commits intomainfrom
copilot/apply-includerootslashoption
Open

[http-client-python] Apply includeRootSlashOption to operation level#9929
Copilot wants to merge 3 commits intomainfrom
copilot/apply-includerootslashoption

Conversation

Copy link
Contributor

Copilot AI commented Mar 5, 2026

@clientOption("includeRootSlash", ...) was only resolved from the client hierarchy. This change checks the operation/method level first, falling back to the client hierarchy when unset.

  • Check getClientOptions(method, "includeRootSlash") before walking the client parent chain
  • Operation-level setting overrides client-level setting; absence preserves existing fallback behavior
// Operation-level override
#suppress "@azure-tools/typespec-client-generator-core/client-option" "workaround"
@clientOption("includeRootSlash", false, "python")
op myOperation(): void;
Original prompt

This section details on the original issue you should resolve

<issue_title>[http-client-python] Apply includeRootSlashOption to operation level</issue_title>
<issue_description>Currently, includeRootSlashOption is applied to client level, we want to also apply it to operation level, and operation level could override the client level setting.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…el fallback

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 5, 2026
Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
Copilot AI changed the title [WIP] Apply includeRootSlashOption to operation level [http-client-python] Apply includeRootSlashOption to operation level Mar 5, 2026
@tadelesh tadelesh marked this pull request as ready for review March 5, 2026 08:10
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 5, 2026

Open in StackBlitz

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

commit: 955645c

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

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.

[http-client-python] Apply includeRootSlashOption to operation level

3 participants