From 451803b230084d5553962c2b3e3b2a921e9545e8 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:29:40 +0100 Subject: [feature] Fetch + create domain permissions from subscriptions nightly (#3635) * peepeepoopoo * test domain perm subs * swagger * envparsing * dries your wets * start on docs * finish up docs * copy paste errors * rename actions package * rename force -> skipCache * move obfuscate parse nearer to where err is checked * make higherPrios a simple slice * don't use receiver for permsFrom funcs * add more context to error logs * defer finished log * use switch for permType instead of if/else * thanks linter, love you <3 * validate csv headers before full read * use bufio scanner --- docs/api/swagger.yaml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'docs/api') diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index 235309ba9..322b79b16 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -6436,6 +6436,46 @@ paths: summary: Remove a domain permission subscription. tags: - admin + /api/v1/admin/domain_permission_subscriptions/{id}/test: + post: + description: |- + The response body will be a list of domain permissions that *would* be created by this subscription, OR an error message. + + This is useful in cases where you want to check that your instance can actually fetch + parse a list. + operationId: domainPermissionSubscriptionTest + parameters: + - description: ID of the domain permission draft. + in: path + name: id + required: true + type: string + produces: + - application/json + responses: + "200": + description: Either an array of domain permissions, OR an error message of the form `{"error":"[ERROR MESSAGE HERE]"}` indicating why the list could not be fetched. + schema: + items: + $ref: '#/definitions/domain' + type: array + "400": + description: bad request + "401": + description: unauthorized + "403": + description: forbidden + "406": + description: not acceptable + "409": + description: conflict + "500": + description: internal server error + security: + - OAuth2 Bearer: + - admin + summary: Test one domain permission subscription by making your instance fetch and parse it *without creating permissions*. + tags: + - admin /api/v1/admin/domain_permission_subscriptions/preview: get: description: This view allows you to see the order in which domain permissions will actually be fetched and created. -- cgit v1.2.3