Azure / typespec-azure

About TypeSpec Azure Libraries
https://azure.github.io/typespec-azure/
MIT License
8 stars 28 forks source link

replace `tspNamespace` with `crossLanguageDefinitionId` in enum, model, union and array types #1075

Closed ArcturusZhang closed 1 week ago

ArcturusZhang commented 1 week ago

Fixes https://github.com/Azure/typespec-azure/issues/1073

Per offline discussion, crossLanguageDefinitionId is actually a much better candidate of telling people the originate of this type, therefore this should solve all of our requirement and we no longer need a tspNamespace anymore.

azure-sdk commented 1 week ago

All changed packages have been documented.

Show changes ### `@azure-tools/typespec-client-generator-core` - _feature_ [✏️](https://github.com/ArcturusZhang/typespec-azure/edit/remove-tspnamespace-add-crosslanguagedefinitionid/.chronus/changes/remove-tspnamespace-add-crosslanguagedefinitionid-2024-5-25-16-6-39.md?pr=/Azure/typespec-azure/pull/1075) > Replace `tspNamespace` with `crossLanguageDefinitionId`.,> - Remove `tspNamespace` in `SdkEnumType`, `SdkModelType`, `SdkUnionType`, `SdkArrayType`.,> - Add `crossLanguageDefinitionId` to `SdkUnionType` and `SdkArrayType`.
azure-sdk commented 1 week ago

You can try these changes at https://cadlplayground.z22.web.core.windows.net/typespec-azure/prs/1075/

Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/typespec-azure/prs/1075/