mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
15 lines
380 B
Makefile
15 lines
380 B
Makefile
|
.DEFAULT_GOAL := openapi
|
||
|
|
||
|
API_DIR = pkg/api
|
||
|
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
|