You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This requires updating the dependencies so that typespec-autorest depends on typespec-azure-resource-manager
Add a new decorator @conditionaFlattening which marks a resource as flattened, depending on emitter settings. and an accessor isConditionallyFlattened, both of these apply to model properties
Replace all template instances using @OpenApi.extension("x-ms-client-flatten": true) with the @conditionalFlattening` decorator.
Add a new option in typespec-autorest arm-resource-flattening with values true and false, defaulting to false. If this option is true, use the isConditionallyFlattened accessor to determine whether to add an x-ms-client-flatten: true to the property representation in OpenAPI
Update azure-rest-api-specs, with the new flag set to true in ARM projects
The text was updated successfully, but these errors were encountered:
markcowl
changed the title
Make 'x-ms-client-flatten' conditional
Make 'x-ms-client-flatten' in typespec-azure-resource-manager templates conditional
Apr 19, 2024
Upgrade tsp version of converter to 0.58
Uptake changes from
- Azure/typespec-azure#709
1. For brownfield: add flag `arm-resource-flattening`, add
`@@flattenProperty` to properties if needed, direct use of
Azure.ResourceManager.XXXResource allows us not need
`x-ms-client-flatten` any more.
2. For greenfield: no flag `arm-resource-flattening`, no
`@@flattenProperty`
- Azure/typespec-azure#862
Remove all the workaround for Azure.ResourceManager.XXXResource.
---------
Co-authored-by: Pan Shao <[email protected]>
This requires updating the dependencies so that typespec-autorest depends on typespec-azure-resource-manager
@conditionaFlattening
which marks a resource as flattened, depending on emitter settings. and an accessor isConditionallyFlattened, both of these apply to model properties@OpenApi.extension("x-ms-client-flatten": true) with the
@conditionalFlattening` decorator.arm-resource-flattening
with valuestrue
andfalse
, defaulting to false. If this option is true, use theisConditionallyFlattened
accessor to determine whether to add anx-ms-client-flatten
:true
to the property representation in OpenAPIThe text was updated successfully, but these errors were encountered: