In azure-rest-api-specs\specification\alertsmanagement\resource-manager\Microsoft.AlertsManagement\stable\2019-06-01\SmartDetectorAlertRulesApi.json
"required": [
"state",
"severity",
"frequency",
"detector",
"scope",
"actionGroups"
],
In generated code, detector is missing. And required parameters should not have default value None in custom function.