Skip to content

Commit

Permalink
feat: replace an existing policy
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
kushsharma committed Nov 7, 2023
1 parent 0898f4e commit 4bb6d30
Show file tree
Hide file tree
Showing 8 changed files with 4,864 additions and 3,876 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TAG := $(shell git rev-list --tags --max-count=1)
VERSION := $(shell git describe --tags ${TAG})
.PHONY: build check fmt lint test test-race vet test-cover-html help install proto ui
.DEFAULT_GOAL := build
PROTON_COMMIT := "eb24a09e48f7f746b07006daae47f9434ef70ec4"
PROTON_COMMIT := "fb2728da650fe4c198c09a3ed2eee9a77278cd94"

ui:
@echo " > generating ui build"
Expand Down
401 changes: 401 additions & 0 deletions docs/docs/apis/frontier-service-replace-policy.api.mdx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/docs/apis/sidebar.js

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions proto/apidocs.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3778,6 +3778,55 @@ paths:
$ref: '#/definitions/v1beta1PolicyRequestBody'
tags:
- Policy
/v1beta1/policies/{id}/replace:
post:
summary: Replace policy
description: Deletes an existing policy and create new.
operationId: FrontierService_ReplacePolicy
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v1beta1ReplacePolicyResponse'
"400":
description: Bad Request - The request was malformed or contained invalid parameters.
schema:
$ref: '#/definitions/rpcStatus'
"401":
description: Unauthorized - Authentication is required
schema:
$ref: '#/definitions/rpcStatus'
"403":
description: Forbidden - User does not have permission to access the resource
schema:
$ref: '#/definitions/rpcStatus'
"404":
description: Not Found - The requested resource was not found
schema:
$ref: '#/definitions/rpcStatus'
"500":
description: Internal Server Error. Returned when theres is something wrong with Frontier server.
schema:
$ref: '#/definitions/rpcStatus'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: id
in: path
required: true
type: string
- name: body
in: body
required: true
schema:
type: object
properties:
body:
$ref: '#/definitions/v1beta1PolicyRequestBody'
tags:
- Policy
/v1beta1/preferences:
get:
summary: List platform preferences
Expand Down Expand Up @@ -7922,6 +7971,8 @@ definitions:
type: object
v1beta1RemoveOrganizationUserResponse:
type: object
v1beta1ReplacePolicyResponse:
type: object
v1beta1Resource:
type: object
properties:
Expand Down
Loading

0 comments on commit 4bb6d30

Please sign in to comment.