mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 10:03:33 -06:00
* AlertingNG: base API implementation * Pass the interface instead of the base impl * Ruler mock draft (WIP) * Update alerting-api dependency * Improve mock implementation
26 lines
717 B
Makefile
26 lines
717 B
Makefile
.DEFAULT_GOAL := all
|
|
|
|
swagger-codegen-api:
|
|
swagger-codegen generate -v \
|
|
-i https://grafana.github.io/alerting-api/post.json \
|
|
-l go-server \
|
|
-Dapis \
|
|
-o ../ \
|
|
--additional-properties packageName=api \
|
|
-t ./templates \
|
|
# --import-mappings eval.RelativeTimeRange="github.com/grafana/grafana/pkg/services/ngalert/eval" \
|
|
# --type-mappings RelativeTimeRange=eval.RelativeTimeRange
|
|
|
|
copy-files:
|
|
python move-and-rename.py
|
|
|
|
fix:
|
|
sed -i -e 's/apimodels\.\[\]PostableAlert/apimodels.PostableAlerts/' ../go/*.go
|
|
sed -i -e 's/apimodels\.\[\]UpdateDashboardAclCommand/apimodels.Permissions/' ../go/*.go
|
|
goimports -w -v ../go/*.go
|
|
rm ../go/*.go-e
|
|
|
|
clean:
|
|
rm -rf ../go
|
|
|
|
all: swagger-codegen-api fix copy-files clean |