RA-Consulting-GmbH / openscenario.api.test

Apache License 2.0
38 stars 11 forks source link

Enforcing XORs due to downward compatibility and deprecations #163

Closed ahege closed 1 year ago

ahege commented 1 year ago

Is your feature request related to a problem? Please describe. Downward compatibility demands, that deprecated structures or attributes are still optional. When these structures are replaced by other structures, theses new structures are in an XOR context to those that are deprecated. This cannot be enforced by the schema.

A checker should reveal when deprecated structured conflict with new ones.

  1. When the context of the structures is mandatory, exactly one of them must set.
  2. When the context of the structures is optional, non or exactly one must be set.

Describe the solution you'd like Make checker that checks esch case. take the cases from the change history.

Describe alternatives you've considered Don't check the violations. This possibility makes a scenario mor error prone.

ahege commented 1 year ago

GeoPosition (Property height deprecated. With version 1.2. Use altitude instead.) GeoPosition (Property latitude deprecated. With version 1.2. Use latitudeDeg instead) GeoPosition (Property longitude deprecated. With version 1.2. Use longitudeDeg instead) OverrideBreakAction (Property value deprecated. With version 1.2. Use brakeInput instead.) OverrideGearaction (Property number deprecated. With version 1.2. Use automatic gear or manual gear.) OverrideParkingBrakeAction(Property value deprecated. With version 1.2. Use brakeInput instead.) Sun Property intensity deprecated. With version 1.2. Use illuminance instead. TrafficSourceAction: Property velocity deprecated. With version 1.2. Use speed instead Traffic SwarmAction Property velocity deprecated. With version 1.2. Use initialSpeedRange instead. Wheather: Property cloudState deprecated. With version 1.2. Use fractionalCloudCover instead.

From 1.1 Clothoid: Property curvatureDot deprecated. With version 1.1. Use instead curvaturePrime DistanceCondition: Property alongRoute deprecated. With version 1.1. Use "coordinateSystem" and "relativeDistanceType". Precipitation: Property intensity deprecated. With version 1.1. Use instead precipitationIntensity.