Azure / typespec-azure

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

Replace direct OpenAPI extension reference to add `x-ms-azure-resource` with internal decorator #1123

Closed allenjzhang closed 2 weeks ago

allenjzhang commented 3 weeks ago

Removed direct reference to OpenAPI extension x-ms-azure-resource in ARM library and replaced with @Azure.ResourceManager.Private.azureResourceBase decorator. It is only used internally on base resource types. autorest emitter has been updated to check the decorator and still emit x-ms-azure-resource extension in swagger.

azure-sdk commented 3 weeks ago

All changed packages have been documented.

Show changes ### `@azure-tools/typespec-autorest` - _feature_ [✏️](https://github.com/allenjzhang/typespec-azure/edit/azhang_RemoveAzureResource/.chronus/changes/azhang_RemoveAzureResource-2024-6-3-12-45-15.md?pr=/Azure/typespec-azure/pull/1123) > Removed direct reference to OpenAPI extension `x-ms-azure-resource` in ARM library and replaced with `@Azure.ResourceManager.Private.azureResourceBase` decorator. It is only used internally on base resource types. `autorest` emitter has been updated to check the decorator and still emit `x-ms-azure-resource` extension in swagger. ### `@azure-tools/typespec-azure-resource-manager` - _feature_ [✏️](https://github.com/allenjzhang/typespec-azure/edit/azhang_RemoveAzureResource/.chronus/changes/azhang_RemoveAzureResource-2024-6-3-12-45-15.md?pr=/Azure/typespec-azure/pull/1123) > Removed direct reference to OpenAPI extension `x-ms-azure-resource` in ARM library and replaced with `@Azure.ResourceManager.Private.azureResourceBase` decorator. It is only used internally on base resource types. `autorest` emitter has been updated to check the decorator and still emit `x-ms-azure-resource` extension in swagger.
azure-sdk commented 3 weeks ago

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

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