From 24bcf4b0eb4a5746469a047b571168c0ecdd7a9f Mon Sep 17 00:00:00 2001 From: guillecxb <guillesanzlopez@gmail.com> Date: Wed, 19 Mar 2025 18:53:23 +0100 Subject: [PATCH] add deletes to helper and register's swagger --- doc/swagger/helper_swagger.yaml | 49 ++++++++++++++++++++++ doc/swagger/register_swagger.yaml | 67 +++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) diff --git a/doc/swagger/helper_swagger.yaml b/doc/swagger/helper_swagger.yaml index 13d314b5..2581c118 100644 --- a/doc/swagger/helper_swagger.yaml +++ b/doc/swagger/helper_swagger.yaml @@ -453,6 +453,55 @@ paths: description: Parameter added successfully. "400": description: Missing 'param_path' or 'new_value' in request body. + /helper/removeConfigParam: + delete: + tags: + - Configuration + summary: Delete a specific parameter inside 'settings' + description: Removes a specific configuration parameter inside a 'settings' category. + operationId: RemoveConfigParam + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + param_path: + type: string + example: "settings.security_method_priority.oauth" + responses: + "200": + description: Parameter removed successfully. + "400": + description: Missing 'param_path' in request body. + "404": + description: No configuration found or parameter not removed. + + /helper/removeConfigCategory: + delete: + tags: + - Configuration + summary: Delete an entire category inside 'settings' + description: Removes an entire category inside 'settings'. + operationId: RemoveConfigCategory + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + category_name: + type: string + example: "new_policy_settings" + responses: + "200": + description: Category removed successfully. + "400": + description: Missing 'category_name' in request body. + "404": + description: No configuration found or category not removed. components: schemas: InvokersResponse: diff --git a/doc/swagger/register_swagger.yaml b/doc/swagger/register_swagger.yaml index 28ca751b..82265abe 100644 --- a/doc/swagger/register_swagger.yaml +++ b/doc/swagger/register_swagger.yaml @@ -314,7 +314,74 @@ paths: example: "Parameter 'certificates_expiry.new_config_ttl' added successfully" "400": description: Invalid request body + + /configuration/removeConfigParam: + delete: + summary: Remove a configuration parameter + description: Deletes a specific parameter in the register configuration. + tags: + - Configuration + security: + - bearerAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + param_path: + type: string + example: "settings.certificates_expiry.some_config" + responses: + "200": + description: Parameter removed successfully + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: "Parameter 'settings.certificates_expiry.some_config' removed successfully" + "400": + description: Missing 'param_path' in request body + "404": + description: Parameter not found + /configuration/removeConfigCategory: + delete: + summary: Remove a configuration category + description: Deletes an entire category in the register configuration. + tags: + - Configuration + security: + - bearerAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + category_name: + type: string + example: "deprecated_category" + responses: + "200": + description: Category removed successfully + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: "Category 'deprecated_category' removed successfully" + "400": + description: Missing 'category_name' in request body + "404": + description: Category not found components: securitySchemes: -- GitLab