Open ziyeqf opened 2 years ago
@ziyeqf we don't currently support this API Version? https://github.com/hashicorp/go-azure-sdk/tree/main/resource-manager/securityinsights/
@ziyeqf we don't currently support this API Version? https://github.com/hashicorp/go-azure-sdk/tree/main/resource-manager/securityinsights/
Current version is 2021-09-01-preview
rather than 2022-07-01-preview
, and this issue found when tried to add 2022-07-01-preview
The issue also exists in 2021-09-01-preview
. See #1719 for details.
This issue derives from extracting the inlined model at https://github.com/hashicorp/pandora/blob/2e81b696982b908365a38b12921127ed64285584/tools/importer-rest-api-specs/components/parser/models.go#L159
This probably wants to be something similar to https://github.com/hashicorp/pandora/blob/2e81b696982b908365a38b12921127ed64285584/tools/importer-rest-api-specs/components/parser/models.go#L469
@tombuildsstuff this issue still exist on SecurityInsights@2022-07-01-preview
, it seems the importer does not handle nested AllOf
Swagger piece:
"MLBehaviorAnalyticsAlertRuleTemplate": {
"properties": {
"properties": {
"allOf": [
{
"$ref": "#/definitions/AlertRuleTemplateWithMitreProperties"
}
]}
}
"AlertRuleTemplateWithMitreProperties": {
"allOf": [
{
"$ref": "#/definitions/AlertRuleTemplatePropertiesBase"
}
],
"properties": {
},
"type": "object"
}
Then the generated SDK file MLBehaviorAnalyticsAlertRuleTemplateProperties
contains properties from MLBehaviorAnalyticsAlertRuleTemplate
and AlertRuleTemplateWithMitreProperties
, but not contains properites from AlertRuleTemplatePropertiesBase
generated
MLBehaviorAnalyticsAlertRuleTemplateProperties
missing all ofAlertRuleTemplateWithMitreProperties
resource-manager/securityinsights/2022-07-01-preview/alertruletemplates/model_mlbehavioranalyticsalertruletemplateproperties.go:6