Skip to content

Sync typespec-java core: support XML serialization - #4987

Merged
weidongxu-microsoft merged 2 commits into
release/july-2026from
weidongxu-microsoft/sync-typespec-java-xml
Jul 21, 2026
Merged

Sync typespec-java core: support XML serialization#4987
weidongxu-microsoft merged 2 commits into
release/july-2026from
weidongxu-microsoft/sync-typespec-java-xml

Conversation

@weidongxu-microsoft

@weidongxu-microsoft weidongxu-microsoft commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Update packages/typespec-java/core-commit.json to microsoft/typespec d012e83 (Support XML serialization in http-client-java generator, Support XML serialization in http-client-java generator microsoft/typespec#11305).
  • Sync emitter test src/tsp from core via SyncTests.ps1 (adds emitter-tests/src/test/java/payload/xml XmlTests).
  • emitter-tests/Generate.ps1: stop removing payload/xml specs now that the emitter supports XML models.
  • Add chronus changelog entry (fix) mirroring the upstream XML serialization change.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:java Issues for @azure-tools/typespec-java emitter label Jul 21, 2026
@azure-sdk-automation

azure-sdk-automation Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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

The following packages have changes but are not documented.

  • @azure-tools/typespec-autorest

The following packages have already been documented:

  • @azure-tools/typespec-java
Show changes

@azure-tools/typespec-java - fix ✏️

Support XML serialization for models: generate XmlSerializer helper classes and use the XML ObjectSerializer overload of toObject/fromObject in convenience methods for XML request/response bodies.

@pkg-pr-new

pkg-pr-new Bot commented Jul 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@azure-tools/typespec-autorest@4987
npm i https://pkg.pr.new/@azure-tools/typespec-java@4987

commit: 771e310

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

You can try these changes here

🛝 Playground 🌐 Website

@weidongxu-microsoft
weidongxu-microsoft force-pushed the weidongxu-microsoft/sync-typespec-java-xml branch from e4892f4 to 3044c26 Compare July 21, 2026 06:44
- Update core-commit.json to microsoft/typespec d012e83 (XML serialization, microsoft/typespec#11305).
- Sync emitter test src/tsp via SyncTests.ps1 (adds payload/xml XmlTests).
- Generate.ps1: stop removing the payload/xml specs folder so xml is generated, matching core (which no longer skips xml).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: cd6f2e08-d6d3-42ae-affd-bc71e98086f7
@weidongxu-microsoft
weidongxu-microsoft force-pushed the weidongxu-microsoft/sync-typespec-java-xml branch from 3044c26 to b2da5b7 Compare July 21, 2026 06:46
@weidongxu-microsoft
weidongxu-microsoft marked this pull request as ready for review July 21, 2026 06:47
Comment thread .chronus/changes/typespec-java-dpg-xml-2026-07-21-14-26-0.md Outdated
@weidongxu-microsoft
weidongxu-microsoft merged commit 3ab3887 into release/july-2026 Jul 21, 2026
28 of 29 checks passed
@weidongxu-microsoft
weidongxu-microsoft deleted the weidongxu-microsoft/sync-typespec-java-xml branch July 21, 2026 07:13
weidongxu-microsoft added a commit that referenced this pull request Jul 21, 2026
Hotfix (patch) release of `@azure-tools/typespec-java` **0.45.7 ->
0.45.8** from `release/july-2026`.

Includes the XML serialization sync fix (#4987).

Version bump via `pnpm chronus version --ignore-policies`:
- `packages/typespec-java/package.json` -> 0.45.8
- `packages/typespec-java/CHANGELOG.md` (Bug Fixes)
- removed the consumed `.chronus/changes` entry
- `packages/typespec-java/emitter-tests/package.json` -> 0.45.8 (version
+ `@azure-tools/typespec-java` .tgz dependency)

Core submodule unchanged. Backmerge to `main` to follow after publish.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
XiaofeiCao added a commit to XiaofeiCao/typespec-azure that referenced this pull request Jul 22, 2026
…Azure#5014)

Backmerge of `release/july-2026` into `main`.

The auto-backmerge workflow failed for Azure#5013 due to the known same-day
branch-name collision (the `backmerge/release/july-2026-2026-07-22`
branch was already created by Azure#5012's run). Fast-forwarded the branch to
the current release head and opening this PR manually.

Brings into `main`:
- typespec-java 0.45.8 (XML serialization support, Azure#4987/Azure#4990)
- typespec-java 0.45.9 (XML serializer gated to azure-v1 + skip raw
bytes, Azure#5012/Azure#5013)
- PowerShell script sync (core-submodule handling)

**Rebase merge** this PR (do not squash) to preserve the release-line
history.

---------

Co-authored-by: Xiaofei Cao <92354331+XiaofeiCao@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:java Issues for @azure-tools/typespec-java emitter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants