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
1 change: 1 addition & 0 deletions api/polaris-catalog-service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ val policyManagementModels =
"LoadPolicyResponse",
"PolicyIdentifier",
"Policy",
"ApplicablePolicy",
"PolicyAttachmentTarget",
"AttachPolicyRequest",
"DetachPolicyRequest",
Expand Down
24 changes: 21 additions & 3 deletions spec/generated/bundled-polaris-catalog-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
26 changes: 23 additions & 3 deletions spec/polaris-catalog-apis/policy-apis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -633,15 +653,15 @@ components:
GetApplicablePoliciesResponse:
type: object
required:
- policies
- applicable-policies
properties:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will need to change this as well.

   required:
        - policies

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:
Expand Down