Skip to content

Remove @conditionalClientFlatten and config arm-resource-flattening #2284

@pshao25

Description

@pshao25

Here is some background for these two sets of decorators for flattening purpose.

  1. @conditionalClientFlatten and its config arm-resource-flattening in Azure.ResourceManager
  2. @flattenProperty in TCGC

Previously,

  1. Swagger emitter only emits @conditionalClientFlatten. It doesn't emit @flattenProperty because @flattenProperty is only allowed in client.tsp
  2. TCGC emits @flattenProperty and @conditionalClientFlatten.

Therefore we need both of them.

Now,

  1. According to Two resources with one properties flattens while the other not #1931, @flattenProperty is agreed to be put into main.tsp, so swagger emitter can emit it. See this.
  2. TCGC emits @flattenProperty.

Therefore @flattenProperty suffices for both scenarios.

Considering these two decorators are so confusing that we always take several hours/days to make people understand, and even ourselves cannot understand it easily, it seems we could remove @conditionalClientFlatten and its config arm-resource-flattening to improve the usability.

Sub-issues

Metadata

Metadata

Labels

breaking-changeA change that might cause specs or code to breakepiclib:azure-resource-managerIssues for @azure-tools/typespec-azure-core library

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions