diff --git a/src/xml_parser.py b/src/xml_parser.py index 56d995e..5301838 100644 --- a/src/xml_parser.py +++ b/src/xml_parser.py @@ -46,8 +46,8 @@ def add_connection(root: ET.Element, name: str, attr_list: list[str], descriptio predefined_commands = initialization.find("PredefinedCommands") if predefined_commands is None: 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-CodeServerPage{name}", Description=f"Get a specific page for {name}") + ET.SubElement(predefined_commands, "Command", Name=f"Get-AllCodeServerPages{name}") + ET.SubElement(predefined_commands, "Command", Name=f"Get-CodeServerPage{name}") schema = root.find("Schema") 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}") properties = ET.SubElement(new_class, "Properties") 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-CodeServerPage{name}", Path="conceptCodeId") 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: 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-CodeServerPage{name}", Path=sanitize_name(attr))