Fix typos in xml generation

This commit is contained in:
Esa Kataja
2025-03-14 13:06:04 +02:00
parent 9ed4fbb7ef
commit 472b7d9df7
+4 -4
View File
@@ -46,8 +46,8 @@ def add_connection(root: ET.Element, name: str, attr_list: list[str], descriptio
predefined_commands = initialization.find("PredefinedCommands") predefined_commands = initialization.find("PredefinedCommands")
if predefined_commands is None: if predefined_commands is None:
predefined_commands = ET.SubElement(initialization, "PredefinedCommands") predefined_commands = ET.SubElement(initialization, "PredefinedCommands")
ET.SubElement(predefined_commands, "Command", Name=f"Get-AllCodeServerPages{name}", Description=f"Get all pages for {name}") ET.SubElement(predefined_commands, "Command", Name=f"Get-AllCodeServerPages{name}")
ET.SubElement(predefined_commands, "Command", Name=f"Get-CodeServerPage{name}", Description=f"Get a specific page for {name}") ET.SubElement(predefined_commands, "Command", Name=f"Get-CodeServerPage{name}")
schema = root.find("Schema") schema = root.find("Schema")
if schema is not None: if schema is not None:
@@ -55,7 +55,7 @@ def add_connection(root: ET.Element, name: str, attr_list: list[str], descriptio
new_class = ET.SubElement(schema, "Class", Name=f"CodeServerObject{name}") new_class = ET.SubElement(schema, "Class", Name=f"CodeServerObject{name}")
properties = ET.SubElement(new_class, "Properties") properties = ET.SubElement(new_class, "Properties")
property = ET.SubElement(properties, "Property", Name="conceptCodeId", DataType="String", IsMultivalue="false", IsAutoFill="false", IsUniqueKey="true") property = ET.SubElement(properties, "Property", Name="conceptCodeId", DataType="String", IsMultivalue="false", IsAutoFill="false", IsUniqueKey="true")
return_binding = ET.SubElement(property, "ReturnBinding") return_binding = ET.SubElement(property, "ReturnBindings")
ET.SubElement(return_binding, "Bind", CommandResultOf=f"Get-AllCodeServerPages{name}", Path="conceptCodeId") ET.SubElement(return_binding, "Bind", CommandResultOf=f"Get-AllCodeServerPages{name}", Path="conceptCodeId")
ET.SubElement(return_binding, "Bind", CommandResultOf=f"Get-CodeServerPage{name}", Path="conceptCodeId") ET.SubElement(return_binding, "Bind", CommandResultOf=f"Get-CodeServerPage{name}", Path="conceptCodeId")
mapping = ET.SubElement(property, "CommandMappings") mapping = ET.SubElement(property, "CommandMappings")
@@ -63,7 +63,7 @@ def add_connection(root: ET.Element, name: str, attr_list: list[str], descriptio
for attr in attr_list: for attr in attr_list:
property = ET.SubElement(properties, "Property", Name=sanitize_name(attr), DataType="String", IsMultivalue="false", IsAutoFill="false") property = ET.SubElement(properties, "Property", Name=sanitize_name(attr), DataType="String", IsMultivalue="false", IsAutoFill="false")
return_binding = ET.SubElement(property, "ReturnBinding") return_binding = ET.SubElement(property, "ReturnBindings")
ET.SubElement(return_binding, "Bind", CommandResultOf=f"Get-AllCodeServerPages{name}", Path=sanitize_name(attr)) ET.SubElement(return_binding, "Bind", CommandResultOf=f"Get-AllCodeServerPages{name}", Path=sanitize_name(attr))
ET.SubElement(return_binding, "Bind", CommandResultOf=f"Get-CodeServerPage{name}", Path=sanitize_name(attr)) ET.SubElement(return_binding, "Bind", CommandResultOf=f"Get-CodeServerPage{name}", Path=sanitize_name(attr))