-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new Java SDK #6656
Merged
Merged
Add new Java SDK #6656
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6122b78
Use OpenAPI codegen 7.0.0 to generate new Java client
arielshaqed 6c4d75d
Generated Java client
arielshaqed 696c318
Add legacy publish action
arielshaqed 20e4b6f
Instruct Linguist to fold clients/java-legacy in GitHub
arielshaqed df4cba6
`make gen` to generate new clients
arielshaqed 91b37b3
[CR] Tell OpenAPI codegen to skip git_push.sh
arielshaqed 2230176
make gen again
arielshaqed File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,9 @@ PROTOC=$(DOCKER) run --rm -v $(shell pwd):/mnt $(PROTOC_IMAGE) | |
CLIENT_JARS_BUCKET="s3://treeverse-clients-us-east/" | ||
|
||
# https://openapi-generator.tech | ||
OPENAPI_GENERATOR_IMAGE=openapitools/openapi-generator-cli:v5.3.0 | ||
OPENAPI_LEGACY_GENERATOR_IMAGE=openapitools/openapi-generator-cli:v5.3.0 | ||
OPENAPI_LEGACY_GENERATOR=$(DOCKER) run --user $(UID_GID) --rm -v $(shell pwd):/mnt $(OPENAPI_LEGACY_GENERATOR_IMAGE) | ||
OPENAPI_GENERATOR_IMAGE=openapitools/openapi-generator-cli:v7.0.0 | ||
OPENAPI_GENERATOR=$(DOCKER) run --user $(UID_GID) --rm -v $(shell pwd):/mnt $(OPENAPI_GENERATOR_IMAGE) | ||
|
||
GOLANGCI_LINT_VERSION=v1.53.3 | ||
|
@@ -113,7 +115,7 @@ client-python: api/swagger.yml ## Generate SDK for Python client | |
# remove the build folder as it also holds lakefs_client folder which keeps because we skip it during find | ||
rm -rf clients/python/build; cd clients/python && \ | ||
find . -depth -name lakefs_client -prune -o ! \( -name Gemfile -or -name Gemfile.lock -or -name _config.yml -or -name .openapi-generator-ignore -or -name templates -or -name setup.mustache -or -name client.mustache \) -delete | ||
$(OPENAPI_GENERATOR) generate \ | ||
$(OPENAPI_LEGACY_GENERATOR) generate \ | ||
-i /mnt/$< \ | ||
-g python \ | ||
-t /mnt/clients/python/templates \ | ||
|
@@ -124,18 +126,32 @@ client-python: api/swagger.yml ## Generate SDK for Python client | |
-c /mnt/clients/python-codegen-config.yaml \ | ||
-o /mnt/clients/python | ||
|
||
client-java: api/swagger.yml ## Generate SDK for Java (and Scala) client | ||
rm -rf clients/java | ||
$(OPENAPI_GENERATOR) generate \ | ||
client-java-legacy: api/swagger.yml api/java-gen-ignore ## Generate legacy SDK for Java (and Scala) client | ||
rm -rf clients/java-legacy | ||
$(OPENAPI_LEGACY_GENERATOR) generate \ | ||
-i /mnt/$< \ | ||
--ignore-file-override /mnt/api/java-gen-ignore \ | ||
-g java \ | ||
--invoker-package io.lakefs.clients.api \ | ||
--http-user-agent "lakefs-java-sdk/$(PACKAGE_VERSION)" \ | ||
--additional-properties=hideGenerationTimestamp=true,artifactVersion=$(PACKAGE_VERSION),parentArtifactId=lakefs-parent,parentGroupId=io.lakefs,parentVersion=0,groupId=io.lakefs,artifactId='api-client',artifactDescription='lakeFS OpenAPI Java client',artifactUrl=https://lakefs.io,apiPackage=io.lakefs.clients.api,modelPackage=io.lakefs.clients.api.model,mainPackage=io.lakefs.clients.api,[email protected],developerName='Treeverse lakeFS dev',developerOrganization='lakefs.io',developerOrganizationUrl='https://lakefs.io',licenseName=apache2,licenseUrl=http://www.apache.org/licenses/,scmConnection=scm:git:[email protected]:treeverse/lakeFS.git,scmDeveloperConnection=scm:git:[email protected]:treeverse/lakeFS.git,scmUrl=https://github.com/treeverse/lakeFS \ | ||
--http-user-agent "lakefs-java-sdk/$(PACKAGE_VERSION)-legacy" \ | ||
--additional-properties hideGenerationTimestamp=true,artifactVersion=$(PACKAGE_VERSION),parentArtifactId=lakefs-parent,parentGroupId=io.lakefs,parentVersion=0,groupId=io.lakefs,artifactId='api-client',artifactDescription='lakeFS OpenAPI Java client legacy SDK',artifactUrl=https://lakefs.io,apiPackage=io.lakefs.clients.api,modelPackage=io.lakefs.clients.api.model,mainPackage=io.lakefs.clients.api,[email protected],developerName='Treeverse lakeFS dev',developerOrganization='lakefs.io',developerOrganizationUrl='https://lakefs.io',licenseName=apache2,licenseUrl=http://www.apache.org/licenses/,scmConnection=scm:git:[email protected]:treeverse/lakeFS.git,scmDeveloperConnection=scm:git:[email protected]:treeverse/lakeFS.git,scmUrl=https://github.com/treeverse/lakeFS \ | ||
-o /mnt/clients/java-legacy | ||
|
||
client-java: api/swagger.yml api/java-gen-ignore ## Generate SDK for Java (and Scala) client | ||
rm -rf clients/java | ||
mkdir -p clients/java | ||
cp api/java-gen-ignore clients/java/.openapi-generator-ignore | ||
$(OPENAPI_GENERATOR) generate \ | ||
-i /mnt/api/swagger.yml \ | ||
-g java \ | ||
--invoker-package io.lakefs.clients.sdk \ | ||
--http-user-agent "lakefs-java-sdk/$(PACKAGE_VERSION)-v1" \ | ||
--additional-properties disallowAdditionalPropertiesIfNotPresent=false,useSingleRequestParameter=true,hideGenerationTimestamp=true,artifactVersion=$(PACKAGE_VERSION),parentArtifactId=lakefs-parent,parentGroupId=io.lakefs,parentVersion=0,groupId=io.lakefs,artifactId='sdk-client',artifactDescription='lakeFS OpenAPI Java client',artifactUrl=https://lakefs.io,apiPackage=io.lakefs.clients.sdk,modelPackage=io.lakefs.clients.sdk.model,mainPackage=io.lakefs.clients.sdk,[email protected],developerName='Treeverse lakeFS dev',developerOrganization='lakefs.io',developerOrganizationUrl='https://lakefs.io',licenseName=apache2,licenseUrl=http://www.apache.org/licenses/,scmConnection=scm:git:[email protected]:treeverse/lakeFS.git,scmDeveloperConnection=scm:git:[email protected]:treeverse/lakeFS.git,scmUrl=https://github.com/treeverse/lakeFS \ | ||
-o /mnt/clients/java | ||
|
||
.PHONY: clients client-python client-java | ||
clients: client-python client-java | ||
|
||
.PHONY: clients client-python client-java client-java-legacy | ||
clients: client-python client-java client-java-legacy | ||
|
||
package-python: client-python | ||
$(DOCKER) run --user $(UID_GID) --rm -v $(shell pwd):/mnt -e HOME=/tmp/ -w /mnt/clients/python $(PYTHON_IMAGE) /bin/bash -c \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Files to ignore (skip) when generating Java client | ||
maven.yml | ||
.github/ | ||
git_push.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
java/** linguist-generated | ||
python/** linguist-generated | ||
python/Gemfile linguist-generated=false | ||
python/Gemfile.lock linguist-generated=false | ||
python/_config.yml linguist-generated=false | ||
java/** linguist-generated | ||
java-legacy/** linguist-generated | ||
python/** linguist-generated | ||
python/Gemfile linguist-generated=false | ||
python/Gemfile.lock linguist-generated=false | ||
python/_config.yml linguist-generated=false |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now really re-done.