Add missing scenarios for xml handling#10063
Add missing scenarios for xml handling#10063timotheeguerin wants to merge 3 commits intomicrosoft:mainfrom
Conversation
commit: |
| age: int32; | ||
| } | ||
|
|
||
| @doc("Contains fields of arrays of primitive types.") |
There was a problem hiding this comment.
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
|
❌ There is undocummented changes. Run The following packages have changes but are not documented.
Show changes |
There was a problem hiding this comment.
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.
|
You can try these changes here
|
And reorganize/add mapping to the guide