Giuseppe Barbieri
01/12/2024, 11:58 AMItai Admi
01/12/2024, 12:12 PMGiuseppe Barbieri
01/12/2024, 12:13 PMItai Admi
01/12/2024, 12:15 PMBarak Amar
Giuseppe Barbieri
01/12/2024, 12:22 PMSure. I'll let the product discuss this first and follow up with you next week. Is that ok?sure
Giuseppe Barbieri
01/12/2024, 12:23 PMdid you try the openapi kotlin generator?no, not yet
Barak Amar
Giuseppe Barbieri
01/12/2024, 12:24 PMGiuseppe Barbieri
01/12/2024, 12:25 PMGiuseppe Barbieri
01/12/2024, 12:25 PMBarak Amar
api/
folder.
You can follow instructions from https://openapi-generator.tech/ or the project above how to run the code generation.
Note it is not part of the lakefs project.
Later today I can share specific commands to execute as an example.Giuseppe Barbieri
01/12/2024, 1:28 PMBarak Amar
docker run --rm -it -v $(pwd):/code openapitools/openapi-generator-cli generate -i <https://raw.githubusercontent.com/treeverse/lakeFS/master/api/swagger.yml> -g kotlin --package-name lakefs_sdk -o /code/kotlin
Barak Amar
Barak Amar
Giuseppe Barbieri
01/16/2024, 10:13 AMsudo docker run --rm -it -v $(pwd):/code openapitools/openapi-generator-cli generate -i <https://raw.githubusercontent.com/treeverse/lakeFS/master/api/swagger.yml> -g python --package-name lakefs_sdk -o /code/python
Giuseppe Barbieri
01/16/2024, 10:14 AMConfiguration
class, there is no such class in kotlinBarak Amar
// Use the API client, which automatically authenticates
ApiClient.username = "AKIAIOSFODNN7EXAMPLE"
ApiClient.password = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
// Create a new API client for the repositories API
val repoApi = RepositoriesApi()
val repositoryList = repoApi.listRepositories()
// Print the list of repositories (first page)
for (repo in repositoryList.results) {
println("Repo: ${repo.id} (${repo.storageNamespace})")
}
With the above code I'm using -Dlakefs_sdk.baseUrl=<http://localhost:8000/api/v1>
to control my server endpoint.Barak Amar
Giuseppe Barbieri
01/16/2024, 1:44 PMclients/python
isn't generated?Barak Amar
clients/python
is generated code - it is python package lakefs-sdk
.
The code under client/python-wrapper
is the high-level python code (not generated) - it is the python package lakefs
documented https://docs.lakefs.io/integrations/python.html#using-the-lakefs-sdkGiuseppe Barbieri
01/16/2024, 2:50 PMGiuseppe Barbieri
01/16/2024, 2:50 PMBarak Amar
Giuseppe Barbieri
01/17/2024, 11:44 AMBarak Amar
-Dlakefs_sdk.baseUrl=<http://localhost:8000/api/v1>
or pass it as part of each API constructor.