Alerting: Fix API spec generation (#37852)

* Alerting: Fix API spec generation

* Apply suggestion from code review

Co-authored-by: gotjosh <josue@grafana.com>
This commit is contained in:
Sofia Papagiannaki
2021-08-13 16:15:53 +03:00
committed by GitHub
co-authored by gotjosh
parent f3f3fcc727
commit 7a01fb369d
4 changed files with 68 additions and 109 deletions
@@ -16,6 +16,12 @@ spec.json: $(GO_PKG_FILES)
quay.io/goswagger/swagger:$(SWAGGER_TAG) \
generate spec -m -o $@
ensure_go-swagger_mac:
@hash swagger &>/dev/null || (brew tap go-swagger/go-swagger && brew install go-swagger)
spec.json-mac: ensure_go-swagger_mac $(GO_PKG_FILES)
swagger generate spec -m -w $(API_DIR) -o spec.json
post.json: spec.json
go run cmd/clean-swagger/main.go -if $(<) -of $@