From 7b8120fa1b430c327dfcceb5d7ab4bca2294ff34 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Wed, 8 Oct 2025 11:30:40 +0300 Subject: [PATCH] minor refactoring --- .../thingsboard/server/controller/DeviceController.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/controller/DeviceController.java b/application/src/main/java/org/thingsboard/server/controller/DeviceController.java index 4941c0383f..a5efdc1ca4 100644 --- a/application/src/main/java/org/thingsboard/server/controller/DeviceController.java +++ b/application/src/main/java/org/thingsboard/server/controller/DeviceController.java @@ -219,13 +219,9 @@ public class DeviceController extends BaseController { @ResponseBody public Device saveDeviceWithCredentials(@Parameter(description = "The JSON object with device and credentials. See method description above for example.") @Valid @RequestBody SaveDeviceWithCredentialsRequest deviceAndCredentials, - @Parameter(description = "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. " + - "If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. " + - "UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.") + @Parameter(description = NAME_CONFLICT_POLICY_DESC) @RequestParam(name = "policy", defaultValue = "FAIL") NameConflictPolicy policy, - @Parameter(description = "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. " + - "For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for device name 'thermostat', " + - "created device will have name like 'thermostat-7fsh4f'.") + @Parameter(description = NAME_CONFLICT_SEPARATOR_DESC) @RequestParam(name = "separator", defaultValue = "_") String separator) throws ThingsboardException { Device device = deviceAndCredentials.getDevice(); DeviceCredentials credentials = deviceAndCredentials.getCredentials();