This is an automated email from the ASF dual-hosted git repository.
yufei pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 3f42a7a80 Spec: Add 'inherited' and 'namespace' Fields to
GetApplicablePolicies API Response (#1277)
3f42a7a80 is described below
commit 3f42a7a80385bef6a13bd417d7a093ba2b41d625
Author: Honah (Jonas) J. <[email protected]>
AuthorDate: Wed Apr 9 15:08:06 2025 -0700
Spec: Add 'inherited' and 'namespace' Fields to GetApplicablePolicies API
Response (#1277)
---
api/polaris-catalog-service/build.gradle.kts | 1 +
.../generated/bundled-polaris-catalog-service.yaml | 24 +++++++++++++++++---
spec/polaris-catalog-apis/policy-apis.yaml | 26 +++++++++++++++++++---
3 files changed, 45 insertions(+), 6 deletions(-)
diff --git a/api/polaris-catalog-service/build.gradle.kts
b/api/polaris-catalog-service/build.gradle.kts
index 5f0a8134f..6cd15f88a 100644
--- a/api/polaris-catalog-service/build.gradle.kts
+++ b/api/polaris-catalog-service/build.gradle.kts
@@ -37,6 +37,7 @@ val policyManagementModels =
"CreatePolicyRequest",
"LoadPolicyResponse",
"Policy",
+ "ApplicablePolicy",
"PolicyAttachmentTarget",
"AttachPolicyRequest",
"DetachPolicyRequest",
diff --git a/spec/generated/bundled-polaris-catalog-service.yaml
b/spec/generated/bundled-polaris-catalog-service.yaml
index c0dd88cc4..2a817dd69 100644
--- a/spec/generated/bundled-polaris-catalog-service.yaml
+++ b/spec/generated/bundled-polaris-catalog-service.yaml
@@ -4005,18 +4005,36 @@ components:
properties:
target:
$ref: '#/components/schemas/PolicyAttachmentTarget'
+ ApplicablePolicy:
+ allOf:
+ - type: object
+ description: |
+ For policies returned by GetApplicablePolicies, there are 2
additional fields
+
+ - **inherited:** A boolean flag indicating whether the policy is
inherited from target's parents. For non-inheritable policy, it should always
be `false`.
+ - **namespace:** A list representing the hierarchical parent path
to the policy, ordered from higher level namespace to lower.
+ required:
+ - inherited
+ - namespace
+ properties:
+ inherited:
+ type: boolean
+ default: false
+ namespace:
+ $ref: '#/components/schemas/Namespace'
+ - $ref: '#/components/schemas/Policy'
GetApplicablePoliciesResponse:
type: object
required:
- - policies
+ - applicable-policies
properties:
next-page-token:
$ref: '#/components/schemas/PageToken'
- policies:
+ applicable-policies:
type: array
uniqueItems: true
items:
- $ref: '#/components/schemas/Policy'
+ $ref: '#/components/schemas/ApplicablePolicy'
responses:
BadRequestErrorResponse:
description: 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.
diff --git a/spec/polaris-catalog-apis/policy-apis.yaml
b/spec/polaris-catalog-apis/policy-apis.yaml
index 947e99114..9aa15620c 100644
--- a/spec/polaris-catalog-apis/policy-apis.yaml
+++ b/spec/polaris-catalog-apis/policy-apis.yaml
@@ -529,6 +529,26 @@ components:
version:
type: integer
+ ApplicablePolicy:
+ allOf:
+ - type: object
+ description: |
+ For policies returned by GetApplicablePolicies, there are 2
additional fields
+
+ - **inherited:** A boolean flag indicating whether the policy is
inherited from target's parents. For non-inheritable policy, it should always
be `false`.
+ - **namespace:** A list representing the hierarchical parent path
to the policy, ordered from higher level namespace to lower.
+ required:
+ - inherited
+ - namespace
+ properties:
+ inherited:
+ type: boolean
+ default: false
+ namespace:
+ $ref:
'../iceberg-rest-catalog-open-api.yaml#/components/schemas/Namespace'
+ - $ref: '#/components/schemas/Policy'
+
+
CreatePolicyRequest:
type: object
required:
@@ -633,15 +653,15 @@ components:
GetApplicablePoliciesResponse:
type: object
required:
- - policies
+ - applicable-policies
properties:
next-page-token:
$ref:
'../iceberg-rest-catalog-open-api.yaml#/components/schemas/PageToken'
- policies:
+ applicable-policies:
type: array
uniqueItems: true
items:
- $ref: '#/components/schemas/Policy'
+ $ref: '#/components/schemas/ApplicablePolicy'
responses:
CreatePolicyResponse: