forked from t2y/openapi-gin-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (17 loc) · 639 Bytes
/
Copy pathMakefile
File metadata and controls
25 lines (17 loc) · 639 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.PHONY: mod build clean test
MAVEN_SITE = http://central.maven.org
OPENAPI_GENERATOR_VERSION = 4.1.2
OPENAPI_GENERATOR_JAR = openapi-generator-cli-$(OPENAPI_GENERATOR_VERSION).jar
all: build
download:
curl -L $(MAVEN_SITE)/maven2/org/openapitools/openapi-generator-cli/$(OPENAPI_GENERATOR_VERSION)/$(OPENAPI_GENERATOR_JAR) -o $(OPENAPI_GENERATOR_JAR)
generate:
java -jar $(OPENAPI_GENERATOR_JAR) generate --input-spec spec/openapi.yaml --template-dir templates --output . --generator-name go-gin-server
mod:
go mod init github.com/t2y/openapi-gin-sample
build:
go build -o main main.go
clean:
rm -f main
test:
go test .