RA-Consulting-GmbH / openscenario.api.test

Apache License 2.0
38 stars 11 forks source link

XML export wrong for ParameterAssignments element #203

Open shankarpatali-stla opened 11 months ago

shankarpatali-stla commented 11 months ago

Describe the bug When exporting a scenario to XML with the OpenScenarioXmlExporterV1_2, then the elements for Entities/ScenarioObject/CatalogReference/ParameterAssignments are wrong.The parent element is ParameterAssignment and the child elements are ParameterAssignments. Instead the parent element must be ParameterAssignments and the child elements must be ParameterAssignment. Maybe because ParameterAssignments is a wrapped list, it needed some manual implementation and was therefore not according to the schema.

See also: https://www.asam.net/static_downloads/ASAM_OpenSCENARIO_V1.2.0_Model_Documentation/modelDocumentation/content/ParameterAssignment.html

Error is e.g. here: https://github.com/RA-Consulting-GmbH/openscenario.api.test/blob/6c6d6c43764029033b35987d1b8d69cea3a873f0/cpp/openScenarioLib/generated/v1_2/export/xml/OpenScenarioXmlExporterV1_2.cpp#L975

To Reproduce Steps to reproduce the behavior:

  1. parse xosc scenario with parameter declarations
  2. write xosc scenario with OpenScenarioXmlExporterV1_2
  3. investigate tiny xml output

Expected behavior xml output contains ParameterAssignments as parent element and ParameterAssignment as child

Screenshots image

ahege commented 10 months ago

Thank you for your ticket. We will investigate the bug as soon as we can. We are planning a bugfix release for October.

arauschert commented 2 months ago

Basically the error happens for all occurrences of ParameterAssignments. We also detected it for Entities/ScenarioObject/ObjectController/CatalogReference/ParameterAssignments