Skip to content

Commit e26516d

Browse files
committed
recodegen
1 parent 95a3410 commit e26516d

17 files changed

Lines changed: 577 additions & 404 deletions

File tree

java/lance-catalog-apache-client/.openapi-generator/FILES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ docs/GetNamespaceResponse.md
88
docs/GetTableResponse.md
99
docs/ListNamespacesResponse.md
1010
docs/NamespaceApi.md
11+
docs/TableApi.md
1112
pom.xml
1213
src/main/AndroidManifest.xml
1314
src/main/java/com/lancedb/lance/catalog/client/apache/ApiClient.java
@@ -21,6 +22,7 @@ src/main/java/com/lancedb/lance/catalog/client/apache/ServerConfiguration.java
2122
src/main/java/com/lancedb/lance/catalog/client/apache/ServerVariable.java
2223
src/main/java/com/lancedb/lance/catalog/client/apache/StringUtil.java
2324
src/main/java/com/lancedb/lance/catalog/client/apache/api/NamespaceApi.java
25+
src/main/java/com/lancedb/lance/catalog/client/apache/api/TableApi.java
2426
src/main/java/com/lancedb/lance/catalog/client/apache/auth/ApiKeyAuth.java
2527
src/main/java/com/lancedb/lance/catalog/client/apache/auth/Authentication.java
2628
src/main/java/com/lancedb/lance/catalog/client/apache/auth/HttpBasicAuth.java

java/lance-catalog-apache-client/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ Class | Method | HTTP request | Description
117117
*NamespaceApi* | [**createNamespace**](docs/NamespaceApi.md#createNamespace) | **POST** /v1/namespaces | Create a new namespace. A catalog can manage one or more namespaces. A namespace is used to manage one or more tables. There are three modes when trying to create a namespace: * CREATE: Create the namespace if it does not exist. If a namespace of the same name already exists, the operation fails with 400. * EXIST_OK: Create the namespace if it does not exist. If a namespace of the same name already exists, the operation succeeds and the existing namespace is kept. * OVERWRITE: Create the namespace if it does not exist. If a namespace of the same name already exists, the existing namespace is dropped and a new namespace with this name with no table is created.
118118
*NamespaceApi* | [**dropNamespace**](docs/NamespaceApi.md#dropNamespace) | **DELETE** /v1/namespaces/{ns} | Drop a namespace from the catalog. Namespace must be empty.
119119
*NamespaceApi* | [**getNamespace**](docs/NamespaceApi.md#getNamespace) | **GET** /v1/namespaces/{ns} | Get information about a namespace
120-
*NamespaceApi* | [**getTable**](docs/NamespaceApi.md#getTable) | **GET** /v1/namespaces/{ns}/tables/{table} | Get a table from the catalog
121120
*NamespaceApi* | [**listNamespaces**](docs/NamespaceApi.md#listNamespaces) | **GET** /v1/namespaces | List all namespaces in the catalog.
122121
*NamespaceApi* | [**namespaceExists**](docs/NamespaceApi.md#namespaceExists) | **HEAD** /v1/namespaces/{ns} | Check if a namespace exists
122+
*TableApi* | [**getTable**](docs/TableApi.md#getTable) | **GET** /v1/namespaces/{ns}/tables/{table} | Get a table from the catalog
123123

124124

125125
## Documentation for Models

java/lance-catalog-apache-client/api/openapi.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ paths:
173173
- $ref: '#/components/parameters/namespace'
174174
/v1/namespaces/{ns}/tables/{table}:
175175
get:
176-
description: Get a table's detailed properties under a specified namespace from
177-
the catalog.".
176+
description: Get a table's detailed information under a specified namespace
177+
from the catalog.
178178
operationId: GetTable
179179
parameters:
180180
- $ref: '#/components/parameters/namespace'
@@ -196,7 +196,7 @@ paths:
196196
$ref: '#/components/responses/ServerErrorResponse'
197197
summary: Get a table from the catalog
198198
tags:
199-
- Namespace
199+
- Table
200200
x-accepts:
201201
- application/json
202202
parameters:

java/lance-catalog-apache-client/docs/NamespaceApi.md

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ All URIs are relative to *http://localhost:2333*
77
| [**createNamespace**](NamespaceApi.md#createNamespace) | **POST** /v1/namespaces | Create a new namespace. A catalog can manage one or more namespaces. A namespace is used to manage one or more tables. There are three modes when trying to create a namespace: * CREATE: Create the namespace if it does not exist. If a namespace of the same name already exists, the operation fails with 400. * EXIST_OK: Create the namespace if it does not exist. If a namespace of the same name already exists, the operation succeeds and the existing namespace is kept. * OVERWRITE: Create the namespace if it does not exist. If a namespace of the same name already exists, the existing namespace is dropped and a new namespace with this name with no table is created. |
88
| [**dropNamespace**](NamespaceApi.md#dropNamespace) | **DELETE** /v1/namespaces/{ns} | Drop a namespace from the catalog. Namespace must be empty. |
99
| [**getNamespace**](NamespaceApi.md#getNamespace) | **GET** /v1/namespaces/{ns} | Get information about a namespace |
10-
| [**getTable**](NamespaceApi.md#getTable) | **GET** /v1/namespaces/{ns}/tables/{table} | Get a table from the catalog |
1110
| [**listNamespaces**](NamespaceApi.md#listNamespaces) | **GET** /v1/namespaces | List all namespaces in the catalog. |
1211
| [**namespaceExists**](NamespaceApi.md#namespaceExists) | **HEAD** /v1/namespaces/{ns} | Check if a namespace exists |
1312

@@ -224,80 +223,6 @@ No authorization required
224223
| **5XX** | A server-side problem that might not be addressable from the client side. Used for server 5xx errors without more specific documentation in individual routes. | - |
225224

226225

227-
## getTable
228-
229-
> GetTableResponse getTable(ns, table)
230-
231-
Get a table from the catalog
232-
233-
Get a table's detailed properties under a specified namespace from the catalog.\".
234-
235-
### Example
236-
237-
```java
238-
// Import classes:
239-
import com.lancedb.lance.catalog.client.apache.ApiClient;
240-
import com.lancedb.lance.catalog.client.apache.ApiException;
241-
import com.lancedb.lance.catalog.client.apache.Configuration;
242-
import com.lancedb.lance.catalog.client.apache.models.*;
243-
import com.lancedb.lance.catalog.client.apache.api.NamespaceApi;
244-
245-
public class Example {
246-
public static void main(String[] args) {
247-
ApiClient defaultClient = Configuration.getDefaultApiClient();
248-
defaultClient.setBasePath("http://localhost:2333");
249-
250-
NamespaceApi apiInstance = new NamespaceApi(defaultClient);
251-
String ns = "ns_example"; // String | The name of the namespace.
252-
String table = "table_example"; // String | A table name.
253-
try {
254-
GetTableResponse result = apiInstance.getTable(ns, table);
255-
System.out.println(result);
256-
} catch (ApiException e) {
257-
System.err.println("Exception when calling NamespaceApi#getTable");
258-
System.err.println("Status code: " + e.getCode());
259-
System.err.println("Reason: " + e.getResponseBody());
260-
System.err.println("Response headers: " + e.getResponseHeaders());
261-
e.printStackTrace();
262-
}
263-
}
264-
}
265-
```
266-
267-
### Parameters
268-
269-
270-
| Name | Type | Description | Notes |
271-
|------------- | ------------- | ------------- | -------------|
272-
| **ns** | **String**| The name of the namespace. | |
273-
| **table** | **String**| A table name. | |
274-
275-
### Return type
276-
277-
[**GetTableResponse**](GetTableResponse.md)
278-
279-
### Authorization
280-
281-
No authorization required
282-
283-
### HTTP request headers
284-
285-
- **Content-Type**: Not defined
286-
- **Accept**: application/json
287-
288-
289-
### HTTP response details
290-
| Status code | Description | Response headers |
291-
|-------------|-------------|------------------|
292-
| **200** | Table properties result when loading a table | - |
293-
| **400** | Indicates a bad request error. It could be caused by an unexpected request body format or other forms of request validation failure, such as invalid json. Usually serves application/json content, although in some cases simple text/plain content might be returned by the server's middleware. | - |
294-
| **401** | Unauthorized. The request lacks valid authentication credentials for the operation. | - |
295-
| **403** | Forbidden. Authenticated user does not have the necessary permissions. | - |
296-
| **404** | A server-side problem that means can not find the specified resource. | - |
297-
| **503** | The service is not ready to handle the request. The client should wait and retry. The service may additionally send a Retry-After header to indicate when to retry. | - |
298-
| **5XX** | A server-side problem that might not be addressable from the client side. Used for server 5xx errors without more specific documentation in individual routes. | - |
299-
300-
301226
## listNamespaces
302227

303228
> ListNamespacesResponse listNamespaces()
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# TableApi
2+
3+
All URIs are relative to *http://localhost:2333*
4+
5+
| Method | HTTP request | Description |
6+
|------------- | ------------- | -------------|
7+
| [**getTable**](TableApi.md#getTable) | **GET** /v1/namespaces/{ns}/tables/{table} | Get a table from the catalog |
8+
9+
10+
11+
## getTable
12+
13+
> GetTableResponse getTable(ns, table)
14+
15+
Get a table from the catalog
16+
17+
Get a table's detailed information under a specified namespace from the catalog.
18+
19+
### Example
20+
21+
```java
22+
// Import classes:
23+
import com.lancedb.lance.catalog.client.apache.ApiClient;
24+
import com.lancedb.lance.catalog.client.apache.ApiException;
25+
import com.lancedb.lance.catalog.client.apache.Configuration;
26+
import com.lancedb.lance.catalog.client.apache.models.*;
27+
import com.lancedb.lance.catalog.client.apache.api.TableApi;
28+
29+
public class Example {
30+
public static void main(String[] args) {
31+
ApiClient defaultClient = Configuration.getDefaultApiClient();
32+
defaultClient.setBasePath("http://localhost:2333");
33+
34+
TableApi apiInstance = new TableApi(defaultClient);
35+
String ns = "ns_example"; // String | The name of the namespace.
36+
String table = "table_example"; // String | A table name.
37+
try {
38+
GetTableResponse result = apiInstance.getTable(ns, table);
39+
System.out.println(result);
40+
} catch (ApiException e) {
41+
System.err.println("Exception when calling TableApi#getTable");
42+
System.err.println("Status code: " + e.getCode());
43+
System.err.println("Reason: " + e.getResponseBody());
44+
System.err.println("Response headers: " + e.getResponseHeaders());
45+
e.printStackTrace();
46+
}
47+
}
48+
}
49+
```
50+
51+
### Parameters
52+
53+
54+
| Name | Type | Description | Notes |
55+
|------------- | ------------- | ------------- | -------------|
56+
| **ns** | **String**| The name of the namespace. | |
57+
| **table** | **String**| A table name. | |
58+
59+
### Return type
60+
61+
[**GetTableResponse**](GetTableResponse.md)
62+
63+
### Authorization
64+
65+
No authorization required
66+
67+
### HTTP request headers
68+
69+
- **Content-Type**: Not defined
70+
- **Accept**: application/json
71+
72+
73+
### HTTP response details
74+
| Status code | Description | Response headers |
75+
|-------------|-------------|------------------|
76+
| **200** | Table properties result when loading a table | - |
77+
| **400** | Indicates a bad request error. It could be caused by an unexpected request body format or other forms of request validation failure, such as invalid json. Usually serves application/json content, although in some cases simple text/plain content might be returned by the server's middleware. | - |
78+
| **401** | Unauthorized. The request lacks valid authentication credentials for the operation. | - |
79+
| **403** | Forbidden. Authenticated user does not have the necessary permissions. | - |
80+
| **404** | A server-side problem that means can not find the specified resource. | - |
81+
| **503** | The service is not ready to handle the request. The client should wait and retry. The service may additionally send a Retry-After header to indicate when to retry. | - |
82+
| **5XX** | A server-side problem that might not be addressable from the client side. Used for server 5xx errors without more specific documentation in individual routes. | - |
83+

java/lance-catalog-apache-client/src/main/java/com/lancedb/lance/catalog/client/apache/api/NamespaceApi.java

Lines changed: 0 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import com.lancedb.lance.catalog.client.apache.model.CreateNamespaceRequest;
2222
import com.lancedb.lance.catalog.client.apache.model.CreateNamespaceResponse;
2323
import com.lancedb.lance.catalog.client.apache.model.GetNamespaceResponse;
24-
import com.lancedb.lance.catalog.client.apache.model.GetTableResponse;
2524
import com.lancedb.lance.catalog.client.apache.model.ListNamespacesResponse;
2625

2726
import com.fasterxml.jackson.core.type.TypeReference;
@@ -268,88 +267,6 @@ public GetNamespaceResponse getNamespace(String ns, Map<String, String> addition
268267
localVarReturnType);
269268
}
270269

271-
/**
272-
* Get a table from the catalog Get a table&#39;s detailed properties under a specified namespace
273-
* from the catalog.\&quot;.
274-
*
275-
* @param ns The name of the namespace. (required)
276-
* @param table A table name. (required)
277-
* @return GetTableResponse
278-
* @throws ApiException if fails to make API call
279-
*/
280-
public GetTableResponse getTable(String ns, String table) throws ApiException {
281-
return this.getTable(ns, table, Collections.emptyMap());
282-
}
283-
284-
/**
285-
* Get a table from the catalog Get a table&#39;s detailed properties under a specified namespace
286-
* from the catalog.\&quot;.
287-
*
288-
* @param ns The name of the namespace. (required)
289-
* @param table A table name. (required)
290-
* @param additionalHeaders additionalHeaders for this call
291-
* @return GetTableResponse
292-
* @throws ApiException if fails to make API call
293-
*/
294-
public GetTableResponse getTable(String ns, String table, Map<String, String> additionalHeaders)
295-
throws ApiException {
296-
Object localVarPostBody = null;
297-
298-
// verify the required parameter 'ns' is set
299-
if (ns == null) {
300-
throw new ApiException(400, "Missing the required parameter 'ns' when calling getTable");
301-
}
302-
303-
// verify the required parameter 'table' is set
304-
if (table == null) {
305-
throw new ApiException(400, "Missing the required parameter 'table' when calling getTable");
306-
}
307-
308-
// create path and map variables
309-
String localVarPath =
310-
"/v1/namespaces/{ns}/tables/{table}"
311-
.replaceAll(
312-
"\\{" + "ns" + "\\}", apiClient.escapeString(apiClient.parameterToString(ns)))
313-
.replaceAll(
314-
"\\{" + "table" + "\\}",
315-
apiClient.escapeString(apiClient.parameterToString(table)));
316-
317-
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
318-
String localVarQueryParameterBaseName;
319-
List<Pair> localVarQueryParams = new ArrayList<Pair>();
320-
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
321-
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
322-
Map<String, String> localVarCookieParams = new HashMap<String, String>();
323-
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
324-
325-
localVarHeaderParams.putAll(additionalHeaders);
326-
327-
final String[] localVarAccepts = {"application/json"};
328-
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
329-
330-
final String[] localVarContentTypes = {};
331-
332-
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
333-
334-
String[] localVarAuthNames = new String[] {};
335-
336-
TypeReference<GetTableResponse> localVarReturnType = new TypeReference<GetTableResponse>() {};
337-
return apiClient.invokeAPI(
338-
localVarPath,
339-
"GET",
340-
localVarQueryParams,
341-
localVarCollectionQueryParams,
342-
localVarQueryStringJoiner.toString(),
343-
localVarPostBody,
344-
localVarHeaderParams,
345-
localVarCookieParams,
346-
localVarFormParams,
347-
localVarAccept,
348-
localVarContentType,
349-
localVarAuthNames,
350-
localVarReturnType);
351-
}
352-
353270
/**
354271
* List all namespaces in the catalog.
355272
*

0 commit comments

Comments
 (0)