Skip to content

Comments

Revert @identifiers decorator and deprecate x-ms-identifiers generation#3779

Open
qiaozha wants to merge 4 commits intomainfrom
revert-identifiers-decorator
Open

Revert @identifiers decorator and deprecate x-ms-identifiers generation#3779
qiaozha wants to merge 4 commits intomainfrom
revert-identifiers-decorator

Conversation

@qiaozha
Copy link
Member

@qiaozha qiaozha commented Jan 15, 2026

Summary

This PR reverts the changes introduced in PR #1983 which added the @Identifiers decorator and automatic x-ms-identifiers generation from @key decorator.

Changes

  • ✅ Removed @Identifiers decorator from typespec-azure-resource-manager
  • ✅ Removed automatic x-ms-identifiers generation from @key decorator
  • ✅ Removed x-ms-identifiers generation logic from typespec-autorest emitter
  • ✅ Reverted to using @OpenAPI.extension("x-ms-identifiers", ...) for explicit specification
  • ✅ Removed related tests for @Identifiers decorator
  • ✅ Updated documentation to reflect the changes
  • ✅ Added deprecation changelog entry

Related Issues

Reverts: #1983

Breaking Changes

  • The @Identifiers decorator is no longer available
  • x-ms-identifiers is no longer automatically generated from @key decorators
  • Users must use @OpenAPI.extension("x-ms-identifiers", ...) to specify identifiers explicitly when needed

- Remove @Identifiers decorator from typespec-azure-resource-manager
- Remove automatic x-ms-identifiers generation from @key decorator
- Remove x-ms-identifiers generation logic from typespec-autorest
- Revert to using @OpenAPI.extension("x-ms-identifiers", ...)
- Remove related tests for @Identifiers decorator
- Update documentation to reflect the changes
- Add deprecation changelog entry

This reverts changes introduced in PR #1983
@microsoft-github-policy-service microsoft-github-policy-service bot added lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library emitter:autorest Issues for @azure-tools/typespec-autorest emitter labels Jan 15, 2026
@azure-sdk
Copy link
Collaborator

azure-sdk commented Jan 15, 2026

All changed packages have been documented.

  • @azure-tools/typespec-autorest
  • @azure-tools/typespec-azure-resource-manager
Show changes

@azure-tools/typespec-autorest - deprecation ✏️

Deprecated automatic x-ms-identifiers generation from @key decorator and removed the @Identifiers decorator. Use @OpenAPI.extension("x-ms-identifiers", ...) to specify identifiers explicitly when needed.

@azure-tools/typespec-azure-resource-manager - deprecation ✏️

Deprecated automatic x-ms-identifiers generation from @key decorator and removed the @Identifiers decorator. Use @OpenAPI.extension("x-ms-identifiers", ...) to specify identifiers explicitly when needed.

- Remove identifiers.test.ts that references deleted functions
- Replace @Identifiers with @OpenAPI.extension in library files
- Disable missing-x-ms-identifiers rule (mark as deprecated)
- Update rule message to indicate deprecation
@microsoft-github-policy-service microsoft-github-policy-service bot added the lib:azure-core Issues for @azure-tools/typespec-azure-core library label Jan 15, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 15, 2026

Open in StackBlitz

npm i https://pkg.pr.new/Azure/typespec-azure/@azure-tools/typespec-autorest@3779
npm i https://pkg.pr.new/Azure/typespec-azure/@azure-tools/typespec-azure-core@3779
npm i https://pkg.pr.new/Azure/typespec-azure/@azure-tools/typespec-azure-resource-manager@3779

commit: 7f940fc

@azure-sdk
Copy link
Collaborator

azure-sdk commented Jan 15, 2026

You can try these changes here

🛝 Playground 🌐 Website

@markcowl markcowl added the breaking-change A change that might cause specs or code to break label Jan 15, 2026
Copy link
Member

@timotheeguerin timotheeguerin left a comment

Choose a reason for hiding this comment

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

@qiaozha before this happens we need full confirmation from ARM team that this is uncesssary and this change cannot be done in such a breaking manner. It needs to be rolled out following the process we've established.

  1. deprecate only
  2. migrate everything in spec repo
  3. remove 1-2 sprint later

@timotheeguerin timotheeguerin added the int:azure-specs Run integration tests against azure-rest-api-specs label Jan 15, 2026
@microsoft-github-policy-service microsoft-github-policy-service bot added the stale Mark a PR that hasn't been recently updated and will be closed. label Feb 18, 2026
@microsoft-github-policy-service

Hi @@qiaozha. Your PR has had no update for 30 days and it is marked as a stale PR. If it is not updated within 30 days, the PR will automatically be closed. If you want to refresh the PR, please remove the stale label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change A change that might cause specs or code to break emitter:autorest Issues for @azure-tools/typespec-autorest emitter int:azure-specs Run integration tests against azure-rest-api-specs lib:azure-core Issues for @azure-tools/typespec-azure-core library lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library stale Mark a PR that hasn't been recently updated and will be closed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants