-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (19 loc) · 778 Bytes
/
Makefile
File metadata and controls
26 lines (19 loc) · 778 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
26
VERSION ?= 2.9.0
.DEFAULT_GOAL:=help
.PHONY: help customise
help:
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-13s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
build: generate customise
generate:
docker run --rm -v `pwd`:/local -u `id -u ${USER}`:`id -g ${USER}` \
openapitools/openapi-generator-cli:v4.3.1 generate \
--strict-spec=true \
--additional-properties enumClassPrefix=true \
--additional-properties packageName=api \
--additional-properties packageVersion=$(VERSION) \
-i /local/openapi.yaml -g go -o /local/autogenerated
rm -f autogenerated/go.mod autogenerated/go.sum
customise:
sed -i 's/\[]map/map/ig' autogenerated/*.go
clean:
rm -r autogenerated