Fix/ngalert generation (#33172)

* fixes pkg names & alerting openapi generation

* cleans up api generation, uses docker & removes python
This commit is contained in:
Owen Diehl
2021-04-20 13:12:32 -04:00
committed by GitHub
parent 8db3eb90ae
commit e065e19583
20 changed files with 157 additions and 123 deletions
@@ -32,6 +32,18 @@ func main() {
log.Fatal(err)
}
info, ok := data["info"].(map[string]interface{})
if info == nil {
log.Fatal("expecting 'info' field")
}
if !ok {
log.Fatal("unable to turn info field into map[string]interface{}")
}
if info["title"] == nil {
info["title"] = "Unified Alerting API"
}
definitions, ok := data["definitions"]
if !ok {
log.Fatal("no definitions")