Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ header:
- 'LICENSE'
- 'NOTICE'
- '**/*.json'
# Files generated by openapi-generator
- 'crates/iceberg-rest-catalog-client/.openapi-generator'

comment: on-failure
24 changes: 24 additions & 0 deletions crates/iceberg-rest-catalog-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

/target/
**/*.rs.bk
Cargo.lock

.travis.yml
git_push.sh
rest-catalog-open-api.yaml
29 changes: 29 additions & 0 deletions crates/iceberg-rest-catalog-client/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

.gitignore
README.md
git_push.sh
.travis.yml
Cargo.toml
src/lib.rs
175 changes: 175 additions & 0 deletions crates/iceberg-rest-catalog-client/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
Cargo.toml
docs/AddPartitionSpecUpdate.md
docs/AddPartitionSpecUpdateAllOf.md
docs/AddSchemaUpdate.md
docs/AddSchemaUpdateAllOf.md
docs/AddSnapshotUpdate.md
docs/AddSnapshotUpdateAllOf.md
docs/AddSortOrderUpdate.md
docs/AddSortOrderUpdateAllOf.md
docs/AndOrExpression.md
docs/BaseUpdate.md
docs/CatalogApiApi.md
docs/CatalogConfig.md
docs/CommitReport.md
docs/CommitTableRequest.md
docs/CommitTableResponse.md
docs/ConfigurationApiApi.md
docs/CounterResult.md
docs/CreateNamespaceRequest.md
docs/CreateNamespaceResponse.md
docs/CreateTableRequest.md
docs/ErrorModel.md
docs/Expression.md
docs/GetNamespaceResponse.md
docs/IcebergErrorResponse.md
docs/ListNamespacesResponse.md
docs/ListTablesResponse.md
docs/ListType.md
docs/LiteralExpression.md
docs/LoadTableResult.md
docs/MapType.md
docs/MetadataLogInner.md
docs/MetricResult.md
docs/NotExpression.md
docs/NullOrder.md
docs/OAuth2ApiApi.md
docs/OAuthError.md
docs/OAuthTokenResponse.md
docs/PartitionField.md
docs/PartitionSpec.md
docs/RemovePropertiesUpdate.md
docs/RemovePropertiesUpdateAllOf.md
docs/RemoveSnapshotRefUpdate.md
docs/RemoveSnapshotsUpdate.md
docs/RemoveSnapshotsUpdateAllOf.md
docs/RenameTableRequest.md
docs/ReportMetricsRequest.md
docs/ScanReport.md
docs/Schema.md
docs/SchemaAllOf.md
docs/SetCurrentSchemaUpdate.md
docs/SetCurrentSchemaUpdateAllOf.md
docs/SetDefaultSortOrderUpdate.md
docs/SetDefaultSortOrderUpdateAllOf.md
docs/SetDefaultSpecUpdate.md
docs/SetDefaultSpecUpdateAllOf.md
docs/SetExpression.md
docs/SetLocationUpdate.md
docs/SetLocationUpdateAllOf.md
docs/SetPropertiesUpdate.md
docs/SetPropertiesUpdateAllOf.md
docs/SetSnapshotRefUpdate.md
docs/SetSnapshotRefUpdateAllOf.md
docs/Snapshot.md
docs/SnapshotLogInner.md
docs/SnapshotReference.md
docs/SnapshotSummary.md
docs/SortDirection.md
docs/SortField.md
docs/SortOrder.md
docs/StructField.md
docs/StructType.md
docs/TableIdentifier.md
docs/TableMetadata.md
docs/TableRequirement.md
docs/TableUpdate.md
docs/Term.md
docs/TimerResult.md
docs/TokenType.md
docs/TransformTerm.md
docs/Type.md
docs/UnaryExpression.md
docs/UpdateNamespacePropertiesRequest.md
docs/UpdateNamespacePropertiesResponse.md
docs/UpgradeFormatVersionUpdate.md
docs/UpgradeFormatVersionUpdateAllOf.md
src/apis/catalog_api_api.rs
src/apis/configuration.rs
src/apis/configuration_api_api.rs
src/apis/mod.rs
src/apis/o_auth2_api_api.rs
src/lib.rs
src/models/add_partition_spec_update.rs
src/models/add_partition_spec_update_all_of.rs
src/models/add_schema_update.rs
src/models/add_schema_update_all_of.rs
src/models/add_snapshot_update.rs
src/models/add_snapshot_update_all_of.rs
src/models/add_sort_order_update.rs
src/models/add_sort_order_update_all_of.rs
src/models/and_or_expression.rs
src/models/base_update.rs
src/models/catalog_config.rs
src/models/commit_report.rs
src/models/commit_table_request.rs
src/models/commit_table_response.rs
src/models/counter_result.rs
src/models/create_namespace_request.rs
src/models/create_namespace_response.rs
src/models/create_table_request.rs
src/models/error_model.rs
src/models/expression.rs
src/models/get_namespace_response.rs
src/models/iceberg_error_response.rs
src/models/list_namespaces_response.rs
src/models/list_tables_response.rs
src/models/list_type.rs
src/models/literal_expression.rs
src/models/load_table_result.rs
src/models/map_type.rs
src/models/metadata_log_inner.rs
src/models/metric_result.rs
src/models/mod.rs
src/models/model_type.rs
src/models/not_expression.rs
src/models/null_order.rs
src/models/o_auth_error.rs
src/models/o_auth_token_response.rs
src/models/partition_field.rs
src/models/partition_spec.rs
src/models/remove_properties_update.rs
src/models/remove_properties_update_all_of.rs
src/models/remove_snapshot_ref_update.rs
src/models/remove_snapshots_update.rs
src/models/remove_snapshots_update_all_of.rs
src/models/rename_table_request.rs
src/models/report_metrics_request.rs
src/models/scan_report.rs
src/models/schema.rs
src/models/schema_all_of.rs
src/models/set_current_schema_update.rs
src/models/set_current_schema_update_all_of.rs
src/models/set_default_sort_order_update.rs
src/models/set_default_sort_order_update_all_of.rs
src/models/set_default_spec_update.rs
src/models/set_default_spec_update_all_of.rs
src/models/set_expression.rs
src/models/set_location_update.rs
src/models/set_location_update_all_of.rs
src/models/set_properties_update.rs
src/models/set_properties_update_all_of.rs
src/models/set_snapshot_ref_update.rs
src/models/set_snapshot_ref_update_all_of.rs
src/models/snapshot.rs
src/models/snapshot_log_inner.rs
src/models/snapshot_reference.rs
src/models/snapshot_summary.rs
src/models/sort_direction.rs
src/models/sort_field.rs
src/models/sort_order.rs
src/models/struct_field.rs
src/models/struct_type.rs
src/models/table_identifier.rs
src/models/table_metadata.rs
src/models/table_requirement.rs
src/models/table_update.rs
src/models/term.rs
src/models/timer_result.rs
src/models/token_type.rs
src/models/transform_term.rs
src/models/unary_expression.rs
src/models/update_namespace_properties_request.rs
src/models/update_namespace_properties_response.rs
src/models/upgrade_format_version_update.rs
src/models/upgrade_format_version_update_all_of.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.6.0
35 changes: 35 additions & 0 deletions crates/iceberg-rest-catalog-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[package]
name = "icberg-rest-catalog-client"
version = "0.0.1"
authors = ["OpenAPI Generator team and contributors"]
description = "Defines the specification for the first version of the REST Catalog API. Implementations should ideally support both Iceberg table specs v1 and v2, with priority given to v2."
license = "Apache 2.0"
edition = "2021"

[dependencies]
serde = "^1.0"
serde_derive = "^1.0"
serde_with = "^2.0"
serde_json = "^1.0"
url = "^2.2"
uuid = { version = "^1.0", features = ["serde"] }
[dependencies.reqwest]
version = "^0.11"
features = ["json", "multipart"]
59 changes: 59 additions & 0 deletions crates/iceberg-rest-catalog-client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

# Rust API client for openapi

Defines the specification for the first version of the REST Catalog API. Implementations should ideally support both Iceberg table specs v1 and v2, with priority given to v2.

## Installation

Put the package under your project folder in a directory named `openapi` and add the following to `Cargo.toml` under `[dependencies]`:

```
openapi = { path = "./openapi" }
```

## Contributing

### Generate Code

To regenerate the client, run the following command:

```shell
export API_VERSION=1.3.1

curl "https://raw.githubusercontent.com/apache/iceberg/apache-iceberg-${API_VERSION}/open-api/rest-catalog-open-api.yaml" -o rest-catalog-open-api.yaml
openapi-generator generate \
-g rust \
-i rest-catalog-open-api.yaml \
-o .
```

NOTES:

- `API_VERSION` should be the latest released version of iceberg.
- `PACKAGE_VERSION` should be changed based on need.
- `openapi-generator` doesn't respect `HTTPS_PROXY`, users behind a proxy should use `curl` to download specs locally instead.

### Post-Generation Actions

After generation, please take following actions to make sure code is compilable:

- Code format: `cargo fmt`
- Fix licenses: `license-eye header fix`
31 changes: 31 additions & 0 deletions crates/iceberg-rest-catalog-client/docs/AddPartitionSpecUpdate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

# AddPartitionSpecUpdate

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**action** | **String** | |
**spec** | [**crate::models::PartitionSpec**](PartitionSpec.md) | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Loading