flyrain commented on code in PR #808:
URL: https://github.com/apache/polaris/pull/808#discussion_r1940042220


##########
spec/rest-catalog-open-api.yaml:
##########
@@ -3977,6 +4241,151 @@ components:
           items:
             type: integer
           description: "List of equality field IDs"
+    
+    Policy:
+      type: object
+      required:
+        - owner_id
+        - policy-id
+        - policy-type
+        - name
+        - content
+        - version
+      properties:
+        owner-id:
+          type: string
+        policy-id:
+          type: string
+        policy-type:
+          type: string
+        name:
+          type: string
+        description: 
+          type: string
+        content:
+          $ref: '#/components/schemas/PolicyContent'
+        version:
+          type: integer
+        created-at-ms:
+          type: integer
+          format: int64
+        updated-at-ms: 
+          type: integer
+          format: int64
+
+    PolicyContent: {}
+
+    CreatePolicyRequest:
+      type: object
+      required:
+        - name
+        - type
+        - content

Review Comment:
   Depends on the schema, we should consider an empty content valid, if a 
schema doesn't enforce anything, which is rare. Otherwise, the policy is 
invalid. 
   
   We are trying to answer the question like, are we going to allow a invalid 
policy content to be persisted? I guess we should. WDYT?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to