From b9d929db39ea1deb9420a26625b742c555c24504 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 08:21:37 +0000 Subject: [PATCH 1/2] Initial plan From 0cc4c558fc9bc5541abdc3217f742efadd877ed0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 08:33:49 +0000 Subject: [PATCH 2/2] Fix payload/xml XmlErrorValue response content-type for consistency Wrap SimpleModel with content-type "application/xml" header to match XmlError's content-type, ensuring consistent XML formatting for both success and error responses. Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> --- .../fix-payload-xml-content-type-2026-02-03-08-23-21.md | 7 +++++++ packages/http-specs/specs/payload/xml/main.tsp | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .chronus/changes/fix-payload-xml-content-type-2026-02-03-08-23-21.md diff --git a/.chronus/changes/fix-payload-xml-content-type-2026-02-03-08-23-21.md b/.chronus/changes/fix-payload-xml-content-type-2026-02-03-08-23-21.md new file mode 100644 index 00000000000..ae27da44ecd --- /dev/null +++ b/.chronus/changes/fix-payload-xml-content-type-2026-02-03-08-23-21.md @@ -0,0 +1,7 @@ +--- +changeKind: fix +packages: + - "@typespec/http-specs" +--- + +Fix payload/xml XmlErrorValue response to wrap SimpleModel with content-type "application/xml" for consistency with XmlError diff --git a/packages/http-specs/specs/payload/xml/main.tsp b/packages/http-specs/specs/payload/xml/main.tsp index b280bbe9758..4beab6443f0 100644 --- a/packages/http-specs/specs/payload/xml/main.tsp +++ b/packages/http-specs/specs/payload/xml/main.tsp @@ -329,5 +329,8 @@ interface XmlErrorValue { ``` """) @get - get(): SimpleModel | XmlError; + get(): { + @header("content-type") contentType: "application/xml"; + @body body: SimpleModel; + } | XmlError; }