Skip to content
Merged
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
17 changes: 17 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ buildscript {
classpath 'com.palantir.gradle.revapi:gradle-revapi:1.7.0'
classpath 'com.gorylenko.gradle-git-properties:gradle-git-properties:2.4.1'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:3.0.0'
classpath 'org.openapitools:openapi-generator-gradle-plugin:6.6.0'
}
}

Expand Down Expand Up @@ -531,6 +532,13 @@ project(':iceberg-aws') {
classpath = sourceSets.integration.runtimeClasspath
jvmArgs += project.property('extraJvmArgs')
}

def s3SignerSpec = "$projectDir/src/main/resources/s3-signer-open-api.yaml"
tasks.register('validateS3SignerSpec', org.openapitools.generator.gradle.plugin.tasks.ValidateTask) {
inputSpec.set(s3SignerSpec)
recommend.set(true)
}
check.dependsOn('validateS3SignerSpec')
}

project(':iceberg-azure') {
Expand Down Expand Up @@ -964,6 +972,15 @@ project(':iceberg-snowflake') {
}
}

project(':iceberg-open-api') {
def restCatalogSpec = "$projectDir/rest-catalog-open-api.yaml"
tasks.register('validateRESTCatalogSpec', org.openapitools.generator.gradle.plugin.tasks.ValidateTask) {
inputSpec.set(restCatalogSpec)
recommend.set(true)
}
check.dependsOn('validateRESTCatalogSpec')
}

@Memoized
boolean versionFileExists() {
return file('version.txt').exists()
Expand Down
11 changes: 10 additions & 1 deletion open-api/rest-catalog-open-api.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,16 @@ class AssertDefaultSortOrderId(TableRequirement):


class ViewRequirement(BaseModel):
__root__: Any = Field(..., discriminator='type')
type: str


class AssertViewUUID(ViewRequirement):
"""
The view UUID must match the requirement's `uuid`
"""

type: Literal['assert-view-uuid']
uuid: str


class RegisterTableRequest(BaseModel):
Expand Down
50 changes: 25 additions & 25 deletions open-api/rest-catalog-open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2603,26 +2603,26 @@ components:
propertyName: type
mapping:
assert-view-uuid: '#/components/schemas/AssertViewUUID'
type: object
required:
- type
properties:
type:
type: "string"
type: object
required:
- type
properties:
type:
type: "string"

AssertViewUUID:
allOf:
- $ref: "#/components/schemas/ViewRequirement"
description: The view UUID must match the requirement's `uuid`
required:
- type
- uuid
properties:
type:
type: string
enum: [ "assert-view-uuid" ]
uuid:
type: string
AssertViewUUID:
allOf:
- $ref: "#/components/schemas/ViewRequirement"
description: The view UUID must match the requirement's `uuid`
required:
- type
- uuid
properties:
type:
type: string
enum: [ "assert-view-uuid" ]
uuid:
type: string

LoadTableResult:
description: |
Expand Down Expand Up @@ -3334,12 +3334,12 @@ components:
application/json:
schema:
$ref: '#/components/schemas/IcebergErrorResponse'
example: {
"error": {
"message": "The server does not support this operation",
"type": "UnsupportedOperationException",
"code": 406
} }
example: {
"error": {
"message": "The server does not support this operation",
"type": "UnsupportedOperationException",
"code": 406
} }

CreateNamespaceResponse:
description:
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ include 'dell'
include 'snowflake'
include 'delta-lake'
include 'kafka-connect'
include 'open-api'

project(':bom').name = 'iceberg-bom'
project(':api').name = 'iceberg-api'
Expand All @@ -67,6 +68,7 @@ project(':dell').name = 'iceberg-dell'
project(':snowflake').name = 'iceberg-snowflake'
project(':delta-lake').name = 'iceberg-delta-lake'
project(':kafka-connect').name = 'iceberg-kafka-connect'
project(':open-api').name = 'iceberg-open-api'

if (null != System.getProperty("allVersions")) {
System.setProperty("flinkVersions", System.getProperty("knownFlinkVersions"))
Expand Down