Files
grafana/pkg/services/ngalert/api/tooling/Makefile
T
Owen Diehl e065e19583 Fix/ngalert generation (#33172)
* fixes pkg names & alerting openapi generation

* cleans up api generation, uses docker & removes python
2021-04-20 13:12:32 -04:00

15 lines
384 B
Makefile

.DEFAULT_GOAL := openapi
API_DIR = definitions
GO_PKG_FILES = $(shell find $(API_DIR) -name *.go -print)
spec.json: $(GO_PKG_FILES)
swagger generate spec -m -w $(API_DIR) -o $@
post.json: spec.json
go run cmd/clean-swagger/main.go -if $(<) -of $@
.PHONY: openapi
openapi: post.json
docker run --rm -p 80:8080 -v $$(pwd):/tmp -e SWAGGER_FILE=/tmp/$(<) swaggerapi/swagger-editor