Skip to content

[http-client-csharp] Adopt Spector payload/head contentTypeHeaderInResponse scenario test#10723

Merged
JonathanCrd merged 3 commits into
microsoft:mainfrom
JonathanCrd:joncarde/spector-payload-head
May 19, 2026
Merged

[http-client-csharp] Adopt Spector payload/head contentTypeHeaderInResponse scenario test#10723
JonathanCrd merged 3 commits into
microsoft:mainfrom
JonathanCrd:joncarde/spector-payload-head

Conversation

@JonathanCrd
Copy link
Copy Markdown
Member

Summary

Adopt the contentTypeHeaderInResponse Spector scenario test for the payload/head spec. The generator already supports HEAD operations with response headers — this PR adds the missing test wiring.

Changes

  1. Project reference — Added Payload.Head.csproj reference to Spector.Tests.csproj
  2. Test class — Added HeadTests.cs with a [SpectorTest] for the ContentTypeHeaderInResponse operation
  3. Changelog — Internal change entry for @typespec/http-client-csharp

Validation

  • Build: 0 errors
  • Stub tests: 1 discovered, 1 Skipped (expected for stubs)
  • Real generator tests: 1 Passed against Spector mock server (HEAD returns 200 with Content-Type and x-ms-meta headers)

🤖 Created with JonathanCrd's copilot

Wire the existing generated Payload.Head stub project into the
Spector.Tests project by adding a ProjectReference entry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JonathanCrd JonathanCrd force-pushed the joncarde/spector-payload-head branch from 5fbe01d to aca6109 Compare May 19, 2026 04:51
@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label May 19, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 19, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-csharp@10723

commit: 25065c4

@github-actions
Copy link
Copy Markdown
Contributor

No changes needing a change description found.

Add test class for the Payload.Head scenario covering the
contentTypeHeaderInResponse HEAD operation with response headers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JonathanCrd JonathanCrd force-pushed the joncarde/spector-payload-head branch from aca6109 to 813a9bf Compare May 19, 2026 04:56
@azure-sdk-automation
Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@JonathanCrd JonathanCrd self-assigned this May 19, 2026
@JonathanCrd JonathanCrd marked this pull request as ready for review May 19, 2026 20:18
@JonathanCrd JonathanCrd added this pull request to the merge queue May 19, 2026
Merged via the queue into microsoft:main with commit a1945ce May 19, 2026
29 checks passed
@JonathanCrd JonathanCrd deleted the joncarde/spector-payload-head branch May 19, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants