Skip to content

[spector] fix case for payload/xml #9569

@msyyc

Description

@msyyc

For

get(): SimpleModel | XmlError;
,

  • SimpleModel is not wrapped with content-type header "application/xml" then its default content-type is "application/json"
  • XmlError defines content-type header as "application/xml"

It is very strange that response and error response has such different content-type.

Expected behavor:

We expect SimpleModel shall also be wrapped with content-type "application/xml" to keep consistent with error response like other cases in this file

NOTE:

  1. DO add changelog under .chronus/changes
  2. DO necessary check before commit.

Metadata

Metadata

Assignees

Labels

lib:http-specsFor issues/prs related to the @typespec/http-specs package

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions