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
The objects that vary by ComputeType are missing properties. This issue doesn't exist in 2022-01-01-preview but is present in 2022-02-01-preview and 2022-05-01.
For example, if you look at ComputeInstance in 2022-02-01-preview, you see only ComputeType. However, if you Iook at 2022-01-01-preview, you see a properties object.
The root cause for this is that the generator's discriminated union parser assumes a certain pattern in Swagger that Microsoft.MachineLearningServices is no longer following for ComputeType.
Usually, a discriminated union will be expressed using a combination of inherited and inlined properties, with each branch of the union extending a common base type and defining its own properties inline. The parser has a boolean flag (includeBaseProperties) that controls whether inherited properties are included in the generated type, with the assumption being that this would exclude the common base type's properties while still capturing the branch-specific, inline properties. It looks like Microsoft.MachineLearningServices went from inlining branch-specific properties in version 2022-01-01-preview to inheriting them in 2022-02-01-preview.
I believe this issue could be addressed by passing more specific information about which base properties to exclude to the parser, though I will need to do some investigation and testing to make sure that changes effects would be localized to issues like this.
Resource Type
Microsoft.MachineLearningServices workspaces/computes
Api Version
2022-02-01-preview
Issue Type
Missing property(s)
Other Notes
The objects that vary by ComputeType are missing properties. This issue doesn't exist in 2022-01-01-preview but is present in 2022-02-01-preview and 2022-05-01.
For example, if you look at ComputeInstance in 2022-02-01-preview, you see only ComputeType. However, if you Iook at 2022-01-01-preview, you see a properties object.
If you look at the REST API specification, you see the properties are still present.
Bicep Repro
No response
Confirm
The text was updated successfully, but these errors were encountered: