Skip to content

Commit 9b9fbf9

Browse files
authored
Makefile reduce output openapi generator cli (#9715)
* openapi generator cli reduce the output log level * Makefile: reduce the output log messages from openapi-generator
1 parent e2264ec commit 9b9fbf9

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

Makefile

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ CLIENT_JARS_BUCKET="s3://treeverse-clients-us-east/"
99

1010
# https://openapi-generator.tech
1111
OPENAPI_GENERATOR_IMAGE=treeverse/openapi-generator-cli:v7.0.1.4
12-
OPENAPI_GENERATOR=$(DOCKER) run --user $(UID_GID) --rm -v $(shell pwd):/mnt $(OPENAPI_GENERATOR_IMAGE)
12+
OPENAPI_GENERATOR=$(DOCKER) run -e JAVA_OPTS="-Dlog.level=error" --user $(UID_GID) --rm -v $(shell pwd):/mnt $(OPENAPI_GENERATOR_IMAGE)
13+
PY_OPENAPI_GENERATOR=$(DOCKER) run -e JAVA_OPTS="-Dlog.level=error" -e PYTHON_POST_PROCESS_FILE="/mnt/clients/python-static/pydantic.sh" --user $(UID_GID) --rm -v $(shell pwd):/mnt $(OPENAPI_GENERATOR_IMAGE)
14+
1315
OPENAPI_RUST_GENERATOR_IMAGE=openapitools/openapi-generator-cli:v7.5.0
14-
OPENAPI_RUST_GENERATOR=$(DOCKER) run --user $(UID_GID) --rm -v $(shell pwd):/mnt $(OPENAPI_RUST_GENERATOR_IMAGE)
15-
PY_OPENAPI_GENERATOR=$(DOCKER) run -e PYTHON_POST_PROCESS_FILE="/mnt/clients/python-static/pydantic.sh" --user $(UID_GID) --rm -v $(shell pwd):/mnt $(OPENAPI_GENERATOR_IMAGE)
16+
OPENAPI_RUST_GENERATOR=$(DOCKER) run -e JAVA_OPTS="-Dlog.level=error" --user $(UID_GID) --rm -v $(shell pwd):/mnt $(OPENAPI_RUST_GENERATOR_IMAGE)
1617

1718
GOLANGCI_LINT=github.com/golangci/golangci-lint/v2/cmd/[email protected]
1819
BUF_CLI_VERSION=v1.54.0
@@ -91,9 +92,10 @@ tools: ## Install tools
9192
$(GOCMD) install github.com/bufbuild/buf/cmd/buf@$(BUF_CLI_VERSION)
9293

9394
client-python: api/swagger.yml ## Generate SDK for Python client - openapi generator version 7.0.0
94-
rm -rf clients/python
95-
mkdir -p clients/python
96-
cp clients/python-static/.openapi-generator-ignore clients/python
95+
@rm -rf clients/python
96+
@mkdir -p clients/python
97+
@cp clients/python-static/.openapi-generator-ignore clients/python
98+
@echo "Generating Python client SDK"
9799
$(PY_OPENAPI_GENERATOR) generate \
98100
-i /mnt/$< \
99101
-g python \
@@ -107,18 +109,20 @@ client-python: api/swagger.yml ## Generate SDK for Python client - openapi gene
107109
-o /mnt/clients/python
108110

109111
sdk-rust: api/swagger.yml ## Generate SDK for Rust client - openapi generator version 7.1.0
110-
rm -rf clients/rust
111-
mkdir -p clients/rust
112+
@rm -rf clients/rust
113+
@mkdir -p clients/rust
114+
@echo "Generating Rust client SDK"
112115
$(OPENAPI_RUST_GENERATOR) generate \
113116
-i /mnt/api/swagger.yml \
114117
-g rust \
115118
--additional-properties=infoName=Treeverse,[email protected],packageName=lakefs_sdk,packageVersion=$(PACKAGE_VERSION),packageUrl=https://github.com/treeverse/lakeFS/tree/master/clients/rust \
116119
-o /mnt/clients/rust
117120

118121
client-java: api/swagger.yml api/java-gen-ignore ## Generate SDK for Java (and Scala) client
119-
rm -rf clients/java
120-
mkdir -p clients/java
121-
cp api/java-gen-ignore clients/java/.openapi-generator-ignore
122+
@rm -rf clients/java
123+
@mkdir -p clients/java
124+
@cp api/java-gen-ignore clients/java/.openapi-generator-ignore
125+
@echo "Generating Java client SDK"
122126
$(OPENAPI_GENERATOR) generate \
123127
-i /mnt/api/swagger.yml \
124128
-g java \

0 commit comments

Comments
 (0)