Skip to content

Add missing scenarios for xml handling#10063

Open
timotheeguerin wants to merge 3 commits intomicrosoft:mainfrom
timotheeguerin:http-specs-xml-gaps
Open

Add missing scenarios for xml handling#10063
timotheeguerin wants to merge 3 commits intomicrosoft:mainfrom
timotheeguerin:http-specs-xml-gaps

Conversation

@timotheeguerin
Copy link
Member

And reorganize/add mapping to the guide

@microsoft-github-policy-service microsoft-github-policy-service bot added the lib:http-specs For issues/prs related to the @typespec/http-specs package label Mar 17, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 17, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-specs@10063

commit: 37df2ec

age: int32;
}

@doc("Contains fields of arrays of primitive types.")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those models have just been moved to be next to the operations they are used in to make it easier to look at each scenario

@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

❌ There is undocummented changes. Run chronus add to add a changeset or click here.

The following packages have changes but are not documented.

  • @typespec/http-specs
Show changes

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Expands the payload/xml HTTP specs to cover additional XML serialization scenarios (renaming, nested models, array wrapping/unwrapping variants, attributes, and namespaces) and wires them into the mock server so Spector scenarios can be executed end-to-end.

Changes:

  • Added new XML payload fixtures and scenario handlers in the mock API for additional XML shapes.
  • Extended the TypeSpec spec with new models and scenario interfaces covering renaming, nesting, array wrapping/unwrapping, attributes, and namespaces.
  • Refactored model documentation from @doc(...) decorators to TypeSpec doc comments (/** ... */) and regrouped shared types.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/http-specs/specs/payload/xml/mockapi.ts Adds XML example strings and registers corresponding GET/PUT mock scenario handlers for the new routes.
packages/http-specs/specs/payload/xml/main.tsp Adds new XML models + scenario interfaces (routes) to exercise additional XML mapping behaviors, including namespaces and renamed elements/attributes.

You can also share your feedback on Copilot code review. Take the survey.

@azure-sdk
Copy link
Collaborator

azure-sdk commented Mar 17, 2026

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants