Azure / typespec-azure

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

Fix ArmResourcePatch templates and incorporate common-types updates Fix #859 #1081

Open markcowl opened 1 week ago

azure-sdk commented 1 week ago

All changed packages have been documented.

Show changes ### `@azure-tools/typespec-autorest` - _fix_ [✏️](https://github.com/markcowl/typespec-azure/edit/resource-patch/.chronus/changes/fix-patch-2024-5-13-3-36-28.md?pr=/Azure/typespec-azure/pull/1081) > Fix #383: Generate patch models for common-types ### `@azure-tools/typespec-azure-resource-manager` - _fix_ [✏️](https://github.com/markcowl/typespec-azure/edit/resource-patch/.chronus/changes/resource-patch-2024-5-27-2-24-51.md?pr=/Azure/typespec-azure/pull/1081) > Fix ArmResourcePatch templates and incorporate common-types updates Fix #859
azure-sdk commented 1 week ago

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

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

markcowl commented 1 week ago

The typespec-next PR for this is here: https://github.com/Azure/azure-rest-api-specs/pull/29617

was able to make these changes with a search and replace and then a tsp format:

search: ^    azure-resource-provider-folder: "resource-manager"
replace: 
    azure-resource-provider-folder: "resource-manager"
    emit-common-types-schema: "reference-only"
in: specification/**/tspconfig.yaml

search: ArmResourcePatch(Sync|Async)(\s*)<([\s\r\n]*)(\w+)([\s\r\n]*),([\s\r\n]*)(\w+)
replace:ArmCustomPatch$1$2<$3$4$5,$6Azure.ResourceManager.Foundations.ResourceUpdateModel<$4, $7>
in specification/**/*.tsp