From 2a5c17b261cee4a1dd1f25e85ed709410afdc13c Mon Sep 17 00:00:00 2001 From: solimant Date: Mon, 19 Aug 2024 13:39:35 +0000 Subject: [PATCH] Add ListActions Signed-off-by: solimant --- .../src/schema/openapi.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/plugins/scaffolder-backend/src/schema/openapi.yaml b/plugins/scaffolder-backend/src/schema/openapi.yaml index c76e918867..bde8677f2a 100644 --- a/plugins/scaffolder-backend/src/schema/openapi.yaml +++ b/plugins/scaffolder-backend/src/schema/openapi.yaml @@ -43,6 +43,38 @@ components: schema: $ref: '#/components/schemas/Error' schemas: + Action: + type: object + properties: + id: + type: string + description: + type: string + examples: + type: array + items: + $ref: '#/components/schemas/ActionExample' + schema: + type: object + properties: + input: + $ref: '#/components/schemas/JsonObject' + output: + $ref: '#/components/schemas/JsonObject' + required: + - id + description: The response shape for a single action in the `listActions` call to the `scaffolder-backend` + ActionExample: + type: object + properties: + description: + type: string + example: + type: string + required: + - description + - example + description: A single action example Error: type: object properties: @@ -86,6 +118,11 @@ components: properties: {} description: A type representing all allowed JSON object values. additionalProperties: {} + ListActionsResponse: + type: array + items: + $ref: '#/components/schemas/Action' + description: The response shape for the `listActions` call to the `scaffolder-backend` TemplateParameterSchema: type: object properties: @@ -162,3 +199,19 @@ paths: - $ref: '#/components/parameters/namespace' - $ref: '#/components/parameters/kind' - $ref: '#/components/parameters/name' + + /v2/actions: + get: + operationId: ListActions + description: Returns a list of all installed actions. + responses: + '200': + description: Ok + content: + application/json: + schema: + $ref: '#/components/schemas/ListActionsResponse' + security: + - {} + - JWT: [] + parameters: []