Implement "Reset to Initial/New Config" API and Services for Transformer
Title: #539 (closed) Implement "Reset to Initial/New Config" API and Services for Transformer
Description: Implement a reset configuration API and logic for the Transformer service that supports resetting the service configuration to its initial state or applying a new configuration file provided by the admin.
Requirements:
-
Reset Configuration API:
- Create
resetToConfig
method for the Transformer service. - Provide API endpoint:
POST /admin/transformerConfig/reset
. - Default behavior: reset to the initial configuration file used on the first start.
- Optional: allow the admin to provide a new configuration file that will replace the initial one.
- Validate the configuration before applying and ensure proper error handling.
- Log success and failure of the reset operation.
- Update Swagger to reflect this endpoint for the Transformer service.
- Create
-
Logging & Error Handling:
- Ensure proper logging for reset operations (both success and failure).
- Handle invalid configurations and provide detailed error feedback.
-
Unit & Integration Tests:
- Write tests to verify the reset behavior for both default and provided configuration scenarios.
- Ensure configurations are applied correctly and persist across service restarts.
Acceptance Criteria:
- The Transformer service supports "reset to initial/new config" functionality.
- The
POST /admin/transformerConfig/reset
endpoint is properly documented in Swagger. - Tests verify the reset behavior for both default and provided configuration file scenarios.
Edited by Rostislav Dublin (EPAM)