Standardize softwareType to lowercase everywhere

- ConfigManager.buildConfig() now lowercases softwareType
- Updated config JSON defaults to lowercase
- childRegistrationUtils lowercases softwareType on extraction
- Closes #8

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Rene De Ren
2026-03-11 15:06:41 +01:00
parent 89aec9a7eb
commit f95ef43f05
3 changed files with 4 additions and 4 deletions

View File

@@ -59,7 +59,7 @@
}, },
"functionality": { "functionality": {
"softwareType": { "softwareType": {
"default": "pumpingStation", "default": "pumpingstation",
"rules": { "rules": {
"type": "string", "type": "string",
"description": "Specified software type used to locate the proper default configuration." "description": "Specified software type used to locate the proper default configuration."
@@ -150,7 +150,7 @@
} }
}, },
"type": { "type": {
"default": "pumpingStation", "default": "pumpingstation",
"rules": { "rules": {
"type": "string", "type": "string",
"description": "Specific asset type used to identify this configuration." "description": "Specific asset type used to identify this configuration."

View File

@@ -6,7 +6,7 @@ class ChildRegistrationUtils {
} }
async registerChild(child, positionVsParent, distance) { async registerChild(child, positionVsParent, distance) {
const { softwareType } = child.config.functionality; const softwareType = (child.config.functionality.softwareType || '').toLowerCase();
const { name, id } = child.config.general; const { name, id } = child.config.general;
this.logger.debug(`Registering child: ${name} (${id}) as ${softwareType} at ${positionVsParent}`); this.logger.debug(`Registering child: ${name} (${id}) as ${softwareType} at ${positionVsParent}`);

View File

@@ -295,7 +295,7 @@ class ValidationUtils {
value.y = uniqueY; value.y = uniqueY;
} }
// Validate that y values are numbers // Validate that y values are numbers
else if (!this.areNumbers(value.y)) { if (!this.areNumbers(value.y)) {
this.logger.warn(`Dimension '${name}' key '${key}' has non-numeric y values. Ignoring this key.`); this.logger.warn(`Dimension '${name}' key '${key}' has non-numeric y values. Ignoring this key.`);
return false; return false;
} }