Skip to content

Commit 4bb6d30

Browse files
committed
feat: replace an existing policy
- ReplacePolicy will take an id of the existing policy and replace it with the provided policy body. - raystack/proton#318 Signed-off-by: Kush Sharma <thekushsharma@gmail.com>
1 parent 0898f4e commit 4bb6d30

8 files changed

+4864
-3876
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ TAG := $(shell git rev-list --tags --max-count=1)
44
VERSION := $(shell git describe --tags ${TAG})
55
.PHONY: build check fmt lint test test-race vet test-cover-html help install proto ui
66
.DEFAULT_GOAL := build
7-
PROTON_COMMIT := "eb24a09e48f7f746b07006daae47f9434ef70ec4"
7+
PROTON_COMMIT := "fb2728da650fe4c198c09a3ed2eee9a77278cd94"
88

99
ui:
1010
@echo " > generating ui build"

docs/docs/apis/frontier-service-replace-policy.api.mdx

+401
Large diffs are not rendered by default.

docs/docs/apis/sidebar.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/apidocs.swagger.yaml

+51
Original file line numberDiff line numberDiff line change
@@ -3778,6 +3778,55 @@ paths:
37783778
$ref: '#/definitions/v1beta1PolicyRequestBody'
37793779
tags:
37803780
- Policy
3781+
/v1beta1/policies/{id}/replace:
3782+
post:
3783+
summary: Replace policy
3784+
description: Deletes an existing policy and create new.
3785+
operationId: FrontierService_ReplacePolicy
3786+
responses:
3787+
"200":
3788+
description: A successful response.
3789+
schema:
3790+
$ref: '#/definitions/v1beta1ReplacePolicyResponse'
3791+
"400":
3792+
description: Bad Request - The request was malformed or contained invalid parameters.
3793+
schema:
3794+
$ref: '#/definitions/rpcStatus'
3795+
"401":
3796+
description: Unauthorized - Authentication is required
3797+
schema:
3798+
$ref: '#/definitions/rpcStatus'
3799+
"403":
3800+
description: Forbidden - User does not have permission to access the resource
3801+
schema:
3802+
$ref: '#/definitions/rpcStatus'
3803+
"404":
3804+
description: Not Found - The requested resource was not found
3805+
schema:
3806+
$ref: '#/definitions/rpcStatus'
3807+
"500":
3808+
description: Internal Server Error. Returned when theres is something wrong with Frontier server.
3809+
schema:
3810+
$ref: '#/definitions/rpcStatus'
3811+
default:
3812+
description: An unexpected error response.
3813+
schema:
3814+
$ref: '#/definitions/rpcStatus'
3815+
parameters:
3816+
- name: id
3817+
in: path
3818+
required: true
3819+
type: string
3820+
- name: body
3821+
in: body
3822+
required: true
3823+
schema:
3824+
type: object
3825+
properties:
3826+
body:
3827+
$ref: '#/definitions/v1beta1PolicyRequestBody'
3828+
tags:
3829+
- Policy
37813830
/v1beta1/preferences:
37823831
get:
37833832
summary: List platform preferences
@@ -7922,6 +7971,8 @@ definitions:
79227971
type: object
79237972
v1beta1RemoveOrganizationUserResponse:
79247973
type: object
7974+
v1beta1ReplacePolicyResponse:
7975+
type: object
79257976
v1beta1Resource:
79267977
type: object
79277978
properties:

0 commit comments

Comments
 (0)