Skip to content

Commit c97ae7f

Browse files
authored
chore: fix rebase between error model and table exists API (#57)
1 parent ff0825c commit c97ae7f

5 files changed

Lines changed: 38 additions & 38 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,13 @@ paths:
253253
"400":
254254
$ref: '#/components/responses/BadRequestErrorResponse'
255255
"401":
256-
$ref: '#/components/responses/UnauthorizedResponse'
256+
$ref: '#/components/responses/UnauthorizedErrorResponse'
257257
"403":
258-
$ref: '#/components/responses/ForbiddenResponse'
258+
$ref: '#/components/responses/ForbiddenErrorResponse'
259259
"404":
260-
$ref: '#/components/responses/NotFoundResponse'
260+
$ref: '#/components/responses/NotFoundErrorResponse'
261261
"503":
262-
$ref: '#/components/responses/ServiceUnavailableResponse'
262+
$ref: '#/components/responses/ServiceUnavailableErrorResponse'
263263
"5XX":
264264
$ref: '#/components/responses/ServerErrorResponse'
265265
summary: Check if a table exists

java/lance-catalog-springboot-server/src/main/java/com/lancedb/lance/catalog/server/springboot/api/TableApi.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ default ResponseEntity<GetTableResponse> registerTable(
408408
content = {
409409
@Content(
410410
mediaType = "application/json",
411-
schema = @Schema(implementation = ErrorModel.class))
411+
schema = @Schema(implementation = ErrorResponse.class))
412412
}),
413413
@ApiResponse(
414414
responseCode = "401",
@@ -417,23 +417,23 @@ default ResponseEntity<GetTableResponse> registerTable(
417417
content = {
418418
@Content(
419419
mediaType = "application/json",
420-
schema = @Schema(implementation = ErrorModel.class))
420+
schema = @Schema(implementation = ErrorResponse.class))
421421
}),
422422
@ApiResponse(
423423
responseCode = "403",
424424
description = "Forbidden. Authenticated user does not have the necessary permissions.",
425425
content = {
426426
@Content(
427427
mediaType = "application/json",
428-
schema = @Schema(implementation = ErrorModel.class))
428+
schema = @Schema(implementation = ErrorResponse.class))
429429
}),
430430
@ApiResponse(
431431
responseCode = "404",
432432
description = "A server-side problem that means can not find the specified resource.",
433433
content = {
434434
@Content(
435435
mediaType = "application/json",
436-
schema = @Schema(implementation = ErrorModel.class))
436+
schema = @Schema(implementation = ErrorResponse.class))
437437
}),
438438
@ApiResponse(
439439
responseCode = "503",
@@ -442,7 +442,7 @@ default ResponseEntity<GetTableResponse> registerTable(
442442
content = {
443443
@Content(
444444
mediaType = "application/json",
445-
schema = @Schema(implementation = ErrorModel.class))
445+
schema = @Schema(implementation = ErrorResponse.class))
446446
}),
447447
@ApiResponse(
448448
responseCode = "5XX",
@@ -451,7 +451,7 @@ default ResponseEntity<GetTableResponse> registerTable(
451451
content = {
452452
@Content(
453453
mediaType = "application/json",
454-
schema = @Schema(implementation = ErrorModel.class))
454+
schema = @Schema(implementation = ErrorResponse.class))
455455
})
456456
})
457457
@RequestMapping(

python/lance_catalog_urllib3_client/lance_catalog_urllib3_client/api/table_api.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -697,12 +697,12 @@ def table_exists(
697697

698698
_response_types_map: Dict[str, Optional[str]] = {
699699
'200': None,
700-
'400': "ErrorModel",
701-
'401': "ErrorModel",
702-
'403': "ErrorModel",
703-
'404': "ErrorModel",
704-
'503': "ErrorModel",
705-
'5XX': "ErrorModel",
700+
'400': "ErrorResponse",
701+
'401': "ErrorResponse",
702+
'403': "ErrorResponse",
703+
'404': "ErrorResponse",
704+
'503': "ErrorResponse",
705+
'5XX': "ErrorResponse",
706706
}
707707
response_data = self.api_client.call_api(
708708
*_param,
@@ -774,12 +774,12 @@ def table_exists_with_http_info(
774774

775775
_response_types_map: Dict[str, Optional[str]] = {
776776
'200': None,
777-
'400': "ErrorModel",
778-
'401': "ErrorModel",
779-
'403': "ErrorModel",
780-
'404': "ErrorModel",
781-
'503': "ErrorModel",
782-
'5XX': "ErrorModel",
777+
'400': "ErrorResponse",
778+
'401': "ErrorResponse",
779+
'403': "ErrorResponse",
780+
'404': "ErrorResponse",
781+
'503': "ErrorResponse",
782+
'5XX': "ErrorResponse",
783783
}
784784
response_data = self.api_client.call_api(
785785
*_param,
@@ -851,12 +851,12 @@ def table_exists_without_preload_content(
851851

852852
_response_types_map: Dict[str, Optional[str]] = {
853853
'200': None,
854-
'400': "ErrorModel",
855-
'401': "ErrorModel",
856-
'403': "ErrorModel",
857-
'404': "ErrorModel",
858-
'503': "ErrorModel",
859-
'5XX': "ErrorModel",
854+
'400': "ErrorResponse",
855+
'401': "ErrorResponse",
856+
'403': "ErrorResponse",
857+
'404': "ErrorResponse",
858+
'503': "ErrorResponse",
859+
'5XX': "ErrorResponse",
860860
}
861861
response_data = self.api_client.call_api(
862862
*_param,

rust/lance-catalog-reqwest-client/src/apis/table_api.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ pub enum RegisterTableError {
4646
#[derive(Debug, Clone, Serialize, Deserialize)]
4747
#[serde(untagged)]
4848
pub enum TableExistsError {
49-
Status400(models::ErrorModel),
50-
Status401(models::ErrorModel),
51-
Status403(models::ErrorModel),
52-
Status404(models::ErrorModel),
53-
Status503(models::ErrorModel),
54-
Status5XX(models::ErrorModel),
49+
Status400(models::ErrorResponse),
50+
Status401(models::ErrorResponse),
51+
Status403(models::ErrorResponse),
52+
Status404(models::ErrorResponse),
53+
Status503(models::ErrorResponse),
54+
Status5XX(models::ErrorResponse),
5555
UnknownValue(serde_json::Value),
5656
}
5757

spec/catalog.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,13 @@ paths:
252252
400:
253253
$ref: '#/components/responses/BadRequestErrorResponse'
254254
401:
255-
$ref: '#/components/responses/UnauthorizedResponse'
255+
$ref: '#/components/responses/UnauthorizedErrorResponse'
256256
403:
257-
$ref: '#/components/responses/ForbiddenResponse'
257+
$ref: '#/components/responses/ForbiddenErrorResponse'
258258
404:
259-
$ref: '#/components/responses/NotFoundResponse'
259+
$ref: '#/components/responses/NotFoundErrorResponse'
260260
503:
261-
$ref: '#/components/responses/ServiceUnavailableResponse'
261+
$ref: '#/components/responses/ServiceUnavailableErrorResponse'
262262
5XX:
263263
$ref: '#/components/responses/ServerErrorResponse'
264264

0 commit comments

Comments
 (0)