Skip to content

Support HEAD check-existence operations in MPG#59366

Draft
haiyuazhang wants to merge 1 commit into
mainfrom
copilot/mpg-head-operation-provider
Draft

Support HEAD check-existence operations in MPG#59366
haiyuazhang wants to merge 1 commit into
mainfrom
copilot/mpg-head-operation-provider

Conversation

@haiyuazhang
Copy link
Copy Markdown
Member

Summary

  • Adds MPG support for ResourceOperationKind.CheckExistence HEAD operations on resource clients.
  • Emits Response<bool> / Task<Response<bool>> methods using clientName-derived operation names.
  • Keeps collection Exists behavior GET-based and updates the local Mgmt-TypeSpec test project to cover Head/HeadAsync generation.

Validation

  • dotnet test eng\packages\http-client-csharp-mgmt\generator\Azure.Generator.Management\test\Azure.Generator.Mgmt.Tests.csproj --no-restore --logger "console;verbosity=minimal"
  • eng\packages\http-client-csharp-mgmt\eng\scripts\Generate.ps1 -filter Mgmt-TypeSpec

Fixes #56996

Emit resource-level CheckExistence operations as HEAD-backed methods returning Response<bool>, preserving clientName-derived method names and keeping collection Exists GET-based. Update the local Mgmt-TypeSpec project to cover generated Head/HeadAsync output.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added CodeGen Issues that relate to code generation Mgmt This issue is related to a management package. labels May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CodeGen Issues that relate to code generation Mgmt This issue is related to a management package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MPG Generator] HEAD operations have plural resourceName in tspCodeModel, causing methods to be placed on parent resource instead of self

1 participant