Skip to content

fix(spec-api): correct ModelWithDatetime rfc3339 value and remove invalid prettier call in XML validation#9995

Merged
weidongxu-microsoft merged 7 commits intomainfrom
copilot/fix-xml-test-case-error
Mar 13, 2026
Merged

fix(spec-api): correct ModelWithDatetime rfc3339 value and remove invalid prettier call in XML validation#9995
weidongxu-microsoft merged 7 commits intomainfrom
copilot/fix-xml-test-case-error

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

  • Revert normalizeXmlDatetimes from spec-api/src/request-validations.ts (restore plain deepEqual) — no prettier issues (only deletions + shortening an existing line)
  • In mockapi.ts, add modelWithDatetimeNoMs constant and custom PUT handler for ModelWithDatetime accepting both .000Z and bare Z forms
  • Add changelog entry for @typespec/http-specs and @typespec/spec-api

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits March 11, 2026 08:47
…d UndefinedParserError

Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
…o .000 milliseconds)

Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
@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 11, 2026
Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
…atetime XML test

Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 11, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-specs@9995
npm i https://pkg.pr.new/@typespec/spec-api@9995

commit: 9515a38

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@github-actions
Copy link
Contributor

All changed packages have been documented.

  • @typespec/http-specs
  • @typespec/spec-api
Show changes

@typespec/http-specs - fix ✏️

Accept both 2022-08-26T18:38:00.000Z and 2022-08-26T18:38:00Z as valid RFC3339 UTC datetime forms in the ModelWithDatetime XML scenario.

@typespec/spec-api - fix ✏️

Remove prettier used for ValidationError message, in validateXmlBodyEquals.

@weidongxu-microsoft weidongxu-microsoft added this pull request to the merge queue Mar 13, 2026
Merged via the queue into main with commit c329865 Mar 13, 2026
24 checks passed
@weidongxu-microsoft weidongxu-microsoft deleted the copilot/fix-xml-test-case-error branch March 13, 2026 01:58
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.

5 participants