Skip to content

Commit 7dfe5ac

Browse files
authored
chore: leverage .openapi-generator-ignore in python client generation (#82)
This PR uses the `.openapi-generator-ignore` file for the Python client generation, instead of running manual `rm` commands afterwards. The OpenAPI generator for the Python client requires the ignore file to be in the output directory. However, the generation metadata `.openapi-generator/` is something that can't be skipped in the python client generation, but there are some open PRs to address this across all clients which seem to have been open for a while now. For example: OpenAPITools/openapi-generator#15770.
1 parent 003912f commit 7dfe5ac

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

python/Makefile

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,8 @@ gen-python-urllib3-client: clean-python-urllib3-client
2020
-i ../spec/rest.yaml \
2121
-g python \
2222
-o lance_namespace_urllib3_client \
23-
--additional-properties=packageName=lance_namespace_urllib3_client,packageVersion=$(VERSION),library=urllib3
24-
# TODO: using .openapi-generator-ignore was not working, manually delete unused files for now
25-
rm -rf lance_namespace_urllib3_client/.github
26-
rm -rf lance_namespace_urllib3_client/.gitignore
27-
rm -rf lance_namespace_urllib3_client/.gitlab-ci.yml
28-
rm -rf lance_namespace_urllib3_client/.travis.yml
29-
rm -rf lance_namespace_urllib3_client/git_push.sh
30-
rm -rf lance_namespace_urllib3_client/requirements.txt
31-
rm -rf lance_namespace_urllib3_client/setup.cfg
32-
rm -rf lance_namespace_urllib3_client/setup.py
33-
rm -rf lance_namespace_urllib3_client/test-requirements.txt
34-
rm -rf lance_namespace_urllib3_client/tox.ini
35-
rm -rf lance_namespace_urllib3_client/.openapi-generator-ignore
23+
--additional-properties=packageName=lance_namespace_urllib3_client,packageVersion=$(VERSION),library=urllib3 \
24+
# Clean up OpenAPI Generator metadata after generation
3625
rm -rf lance_namespace_urllib3_client/.openapi-generator
3726

3827
build-python-urllib3-client: gen-python-urllib3-client
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.github
2+
.gitignore
3+
.gitlab-ci.yml
4+
.travis.yml
5+
git_push.sh
6+
requirements.txt
7+
setup.cfg
8+
setup.py
9+
test-requirements.txt
10+
tox.ini
11+
/.github/workflows/python.yml

0 commit comments

Comments
 (0)