HonahX commented on code in PR #808: URL: https://github.com/apache/polaris/pull/808#discussion_r1939870404
########## spec/rest-catalog-open-api.yaml: ########## @@ -1595,6 +1595,261 @@ paths: $ref: '#/components/responses/ServiceUnavailableResponse' 5XX: $ref: '#/components/responses/ServerErrorResponse' + + /v1/{prefix}/namespaces/{namespace}/policies: + parameters: + - $ref: '#/components/parameters/prefix' + - $ref: '#/components/parameters/namespace' + + post: + tags: + - Catalog API + summary: 'Create a policy in the given namespace' + operationId: createPolicy + description: + Create a policy in the given namespace + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreatePolicyRequest' + responses: + 200: + $ref: '#/components/responses/CreatePolicyResponse' + 400: + $ref: '#/components/responses/BadRequestErrorResponse' + 401: + $ref: '#/components/responses/UnauthorizedResponse' + 403: + $ref: '#/components/responses/ForbiddenResponse' + 419: + $ref: '#/components/responses/AuthenticationTimeoutResponse' + 503: + $ref: '#/components/responses/ServiceUnavailableResponse' + 5XX: + $ref: '#/components/responses/ServerErrorResponse' + + /v1/{prefix}/namespaces/{namespace}/policies/{policy}: + parameters: + - $ref: '#/components/parameters/prefix' + - $ref: '#/components/parameters/namespace' + - $ref: '#/components/parameters/policy' + + get: + tags: + - Catalog API + summary: 'Get a policy' + operationId: getPolicy + description: + Get a policy from the catalog + + + The response contains the policy's metadata and content + responses: + 200: + $ref: '#/components/responses/LoadPolicyResponse' + 400: + $ref: '#/components/responses/BadRequestErrorResponse' + 401: + $ref: '#/components/responses/UnauthorizedResponse' + 403: + $ref: '#/components/responses/ForbiddenResponse' + 404: + description: + Not Found - NoSuchPolicyException, policy to get does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/IcebergErrorResponse' + examples: + PolicyToGetDoesNotExist: + $ref: '#/components/examples/NoSuchPolicyError' + 419: + $ref: '#/components/responses/AuthenticationTimeoutResponse' + 503: + $ref: '#/components/responses/ServiceUnavailableResponse' + 5XX: + $ref: '#/components/responses/ServerErrorResponse' + + put: + tags: + - Catalog API + summary: Update a policy + operationId: updatePolicy + description: + Update a policy Review Comment: I added more description for this operation : ) -- 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: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org