Skip to content

Commit 4841a78

Browse files
committed
spec: move impls to subfolder and fix various operations
1 parent 3e62c0d commit 4841a78

46 files changed

Lines changed: 1735 additions & 355 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
README.md
33
api/openapi.yaml
44
docs/CreateNamespaceRequest.md
5+
docs/CreateNamespaceResponse.md
56
docs/DropNamespaceRequest.md
7+
docs/DropNamespaceResponse.md
68
docs/ErrorResponse.md
79
docs/GetNamespaceRequest.md
810
docs/GetNamespaceResponse.md
@@ -35,7 +37,9 @@ src/main/java/com/lancedb/lance/namespace/client/apache/auth/Authentication.java
3537
src/main/java/com/lancedb/lance/namespace/client/apache/auth/HttpBasicAuth.java
3638
src/main/java/com/lancedb/lance/namespace/client/apache/auth/HttpBearerAuth.java
3739
src/main/java/com/lancedb/lance/namespace/client/apache/model/CreateNamespaceRequest.java
40+
src/main/java/com/lancedb/lance/namespace/client/apache/model/CreateNamespaceResponse.java
3841
src/main/java/com/lancedb/lance/namespace/client/apache/model/DropNamespaceRequest.java
42+
src/main/java/com/lancedb/lance/namespace/client/apache/model/DropNamespaceResponse.java
3943
src/main/java/com/lancedb/lance/namespace/client/apache/model/ErrorResponse.java
4044
src/main/java/com/lancedb/lance/namespace/client/apache/model/GetNamespaceRequest.java
4145
src/main/java/com/lancedb/lance/namespace/client/apache/model/GetNamespaceResponse.java

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public class NamespaceApiExample {
9191
NamespaceApi apiInstance = new NamespaceApi(defaultClient);
9292
CreateNamespaceRequest createNamespaceRequest = new CreateNamespaceRequest(); // CreateNamespaceRequest |
9393
try {
94-
GetNamespaceResponse result = apiInstance.createNamespace(createNamespaceRequest);
94+
CreateNamespaceResponse result = apiInstance.createNamespace(createNamespaceRequest);
9595
System.out.println(result);
9696
} catch (ApiException e) {
9797
System.err.println("Exception when calling NamespaceApi#createNamespace");
@@ -124,7 +124,9 @@ Class | Method | HTTP request | Description
124124
## Documentation for Models
125125

126126
- [CreateNamespaceRequest](docs/CreateNamespaceRequest.md)
127+
- [CreateNamespaceResponse](docs/CreateNamespaceResponse.md)
127128
- [DropNamespaceRequest](docs/DropNamespaceRequest.md)
129+
- [DropNamespaceResponse](docs/DropNamespaceResponse.md)
128130
- [ErrorResponse](docs/ErrorResponse.md)
129131
- [GetNamespaceRequest](docs/GetNamespaceRequest.md)
130132
- [GetNamespaceResponse](docs/GetNamespaceResponse.md)

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

Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ paths:
5252
required: true
5353
responses:
5454
"200":
55-
$ref: '#/components/responses/GetNamespaceResponse'
55+
$ref: '#/components/responses/CreateNamespaceResponse'
5656
"400":
5757
$ref: '#/components/responses/BadRequestErrorResponse'
5858
"401":
@@ -184,7 +184,7 @@ paths:
184184
required: true
185185
responses:
186186
"200":
187-
$ref: '#/components/responses/NamespaceExistsResponse'
187+
description: "Success, no content"
188188
"400":
189189
$ref: '#/components/responses/BadRequestErrorResponse'
190190
"401":
@@ -283,7 +283,7 @@ paths:
283283
required: true
284284
responses:
285285
"200":
286-
$ref: '#/components/responses/TableExistsResponse'
286+
description: "Success, no content"
287287
"400":
288288
$ref: '#/components/responses/BadRequestErrorResponse'
289289
"401":
@@ -333,18 +333,18 @@ components:
333333
$ref: '#/components/schemas/GetNamespaceResponse'
334334
description: "Returns a namespace, as well as any properties stored on the namespace\
335335
\ if namespace properties are supported by the server."
336-
DropNamespaceResponse:
336+
CreateNamespaceResponse:
337337
content:
338338
application/json:
339339
schema:
340-
$ref: '#/components/schemas/DropNamespaceResponse'
341-
description: Result of dropping a namespace
342-
NamespaceExistsResponse:
340+
$ref: '#/components/schemas/CreateNamespaceResponse'
341+
description: Result of creating a namespace
342+
DropNamespaceResponse:
343343
content:
344344
application/json:
345345
schema:
346-
$ref: '#/components/schemas/NamespaceExistsResponse'
347-
description: Result of checking if a namespace exists
346+
$ref: '#/components/schemas/DropNamespaceResponse'
347+
description: Result of dropping a namespace
348348
GetTableResponse:
349349
content:
350350
application/json:
@@ -357,12 +357,6 @@ components:
357357
schema:
358358
$ref: '#/components/schemas/RegisterTableResponse'
359359
description: Table properties result when registering a table
360-
TableExistsResponse:
361-
content:
362-
application/json:
363-
schema:
364-
$ref: '#/components/schemas/TableExistsResponse'
365-
description: Result of checking if a table exists
366360
BadRequestErrorResponse:
367361
content:
368362
application/json:
@@ -531,6 +525,26 @@ components:
531525
required:
532526
- mode
533527
- name
528+
CreateNamespaceResponse:
529+
example:
530+
parent:
531+
- parent
532+
- parent
533+
name: name
534+
properties:
535+
key: properties
536+
properties:
537+
name:
538+
type: string
539+
parent:
540+
items:
541+
type: string
542+
type: array
543+
properties:
544+
additionalProperties:
545+
type: string
546+
required:
547+
- name
534548
ListNamespacesRequest:
535549
example:
536550
parent:
@@ -640,7 +654,23 @@ components:
640654
required:
641655
- name
642656
DropNamespaceResponse:
643-
type: object
657+
example:
658+
parent:
659+
- parent
660+
- parent
661+
name: name
662+
properties:
663+
key: properties
664+
properties:
665+
name:
666+
type: string
667+
parent:
668+
items:
669+
type: string
670+
type: array
671+
properties:
672+
additionalProperties:
673+
type: string
644674
NamespaceExistsRequest:
645675
example:
646676
parent:
@@ -656,8 +686,6 @@ components:
656686
type: array
657687
required:
658688
- name
659-
NamespaceExistsResponse:
660-
type: object
661689
PageToken:
662690
description: |-
663691
An opaque token that allows pagination for list APIs (e.g. ListNamespaces).
@@ -773,6 +801,4 @@ components:
773801
required:
774802
- name
775803
- namespace
776-
TableExistsResponse:
777-
type: object
778804

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
3+
# CreateNamespaceResponse
4+
5+
6+
## Properties
7+
8+
| Name | Type | Description | Notes |
9+
|------------ | ------------- | ------------- | -------------|
10+
|**name** | **String** | | |
11+
|**parent** | **List<String>** | | [optional] |
12+
|**properties** | **Map<String, String>** | | [optional] |
13+
14+
15+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
3+
# DropNamespaceResponse
4+
5+
6+
## Properties
7+
8+
| Name | Type | Description | Notes |
9+
|------------ | ------------- | ------------- | -------------|
10+
|**name** | **String** | | [optional] |
11+
|**parent** | **List<String>** | | [optional] |
12+
|**properties** | **Map<String, String>** | | [optional] |
13+
14+
15+

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

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ All URIs are relative to *http://localhost:2333*
1414

1515
## createNamespace
1616

17-
> GetNamespaceResponse createNamespace(createNamespaceRequest)
17+
> CreateNamespaceResponse createNamespace(createNamespaceRequest)
1818
1919
Create a new namespace
2020

@@ -38,7 +38,7 @@ public class Example {
3838
NamespaceApi apiInstance = new NamespaceApi(defaultClient);
3939
CreateNamespaceRequest createNamespaceRequest = new CreateNamespaceRequest(); // CreateNamespaceRequest |
4040
try {
41-
GetNamespaceResponse result = apiInstance.createNamespace(createNamespaceRequest);
41+
CreateNamespaceResponse result = apiInstance.createNamespace(createNamespaceRequest);
4242
System.out.println(result);
4343
} catch (ApiException e) {
4444
System.err.println("Exception when calling NamespaceApi#createNamespace");
@@ -60,7 +60,7 @@ public class Example {
6060

6161
### Return type
6262

63-
[**GetNamespaceResponse**](GetNamespaceResponse.md)
63+
[**CreateNamespaceResponse**](CreateNamespaceResponse.md)
6464

6565
### Authorization
6666

@@ -75,7 +75,7 @@ No authorization required
7575
### HTTP response details
7676
| Status code | Description | Response headers |
7777
|-------------|-------------|------------------|
78-
| **200** | Returns a namespace, as well as any properties stored on the namespace if namespace properties are supported by the server. | - |
78+
| **200** | Result of creating a namespace | - |
7979
| **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. | - |
8080
| **401** | Unauthorized. The request lacks valid authentication credentials for the operation. | - |
8181
| **403** | Forbidden. Authenticated user does not have the necessary permissions. | - |
@@ -87,7 +87,7 @@ No authorization required
8787

8888
## dropNamespace
8989

90-
> Object dropNamespace(dropNamespaceRequest)
90+
> DropNamespaceResponse dropNamespace(dropNamespaceRequest)
9191
9292
Drop a namespace
9393

@@ -111,7 +111,7 @@ public class Example {
111111
NamespaceApi apiInstance = new NamespaceApi(defaultClient);
112112
DropNamespaceRequest dropNamespaceRequest = new DropNamespaceRequest(); // DropNamespaceRequest |
113113
try {
114-
Object result = apiInstance.dropNamespace(dropNamespaceRequest);
114+
DropNamespaceResponse result = apiInstance.dropNamespace(dropNamespaceRequest);
115115
System.out.println(result);
116116
} catch (ApiException e) {
117117
System.err.println("Exception when calling NamespaceApi#dropNamespace");
@@ -133,7 +133,7 @@ public class Example {
133133

134134
### Return type
135135

136-
**Object**
136+
[**DropNamespaceResponse**](DropNamespaceResponse.md)
137137

138138
### Authorization
139139

@@ -304,7 +304,7 @@ No authorization required
304304

305305
## namespaceExists
306306

307-
> Object namespaceExists(namespaceExistsRequest)
307+
> namespaceExists(namespaceExistsRequest)
308308
309309
Check if a namespace exists
310310

@@ -328,8 +328,7 @@ public class Example {
328328
NamespaceApi apiInstance = new NamespaceApi(defaultClient);
329329
NamespaceExistsRequest namespaceExistsRequest = new NamespaceExistsRequest(); // NamespaceExistsRequest |
330330
try {
331-
Object result = apiInstance.namespaceExists(namespaceExistsRequest);
332-
System.out.println(result);
331+
apiInstance.namespaceExists(namespaceExistsRequest);
333332
} catch (ApiException e) {
334333
System.err.println("Exception when calling NamespaceApi#namespaceExists");
335334
System.err.println("Status code: " + e.getCode());
@@ -350,7 +349,7 @@ public class Example {
350349

351350
### Return type
352351

353-
**Object**
352+
null (empty response body)
354353

355354
### Authorization
356355

@@ -365,7 +364,7 @@ No authorization required
365364
### HTTP response details
366365
| Status code | Description | Response headers |
367366
|-------------|-------------|------------------|
368-
| **200** | Result of checking if a namespace exists | - |
367+
| **200** | Success, no content | - |
369368
| **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. | - |
370369
| **401** | Unauthorized. The request lacks valid authentication credentials for the operation. | - |
371370
| **403** | Forbidden. Authenticated user does not have the necessary permissions. | - |

java/lance-namespace-apache-client/docs/TableApi.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ No authorization required
157157

158158
## tableExists
159159

160-
> Object tableExists(tableExistsRequest)
160+
> tableExists(tableExistsRequest)
161161
162162
Check if a table exists
163163

@@ -181,8 +181,7 @@ public class Example {
181181
TableApi apiInstance = new TableApi(defaultClient);
182182
TableExistsRequest tableExistsRequest = new TableExistsRequest(); // TableExistsRequest |
183183
try {
184-
Object result = apiInstance.tableExists(tableExistsRequest);
185-
System.out.println(result);
184+
apiInstance.tableExists(tableExistsRequest);
186185
} catch (ApiException e) {
187186
System.err.println("Exception when calling TableApi#tableExists");
188187
System.err.println("Status code: " + e.getCode());
@@ -203,7 +202,7 @@ public class Example {
203202

204203
### Return type
205204

206-
**Object**
205+
null (empty response body)
207206

208207
### Authorization
209208

@@ -218,7 +217,7 @@ No authorization required
218217
### HTTP response details
219218
| Status code | Description | Response headers |
220219
|-------------|-------------|------------------|
221-
| **200** | Result of checking if a table exists | - |
220+
| **200** | Success, no content | - |
222221
| **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. | - |
223222
| **401** | Unauthorized. The request lacks valid authentication credentials for the operation. | - |
224223
| **403** | Forbidden. Authenticated user does not have the necessary permissions. | - |

0 commit comments

Comments
 (0)