Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable setting a rule to define, if a field is required #51

Closed
ClemensLinnhoff opened this issue Jan 2, 2024 · 1 comment · Fixed by #61
Closed

Enable setting a rule to define, if a field is required #51

ClemensLinnhoff opened this issue Jan 2, 2024 · 1 comment · Fixed by #61
Labels
feature request Proposals which enhance the interface or add additional features.

Comments

@ClemensLinnhoff
Copy link
Contributor

Describe the feature

Currently, a warning is given for all missing field. However, because it a lot of cases it does not make sense to fill every field. For example, in a sensor_view for a lidar sensor model, it does not make sense to output a warning, that the field "radar_sensor_view" is empty. But in that case I would still like to give a warning, if the (in this particular case) required field "lidar_sensor_view" is set.

Describe the solution you would like

Enable setting a rule "is_required" for specific field. This rule depends on the use case and cannot be automatically generated from the documentation in the proto files. (Unless some fields will be officially made mandatory in any case, as proposed in this issue: OpenSimulationInterface/open-simulation-interface#750)

Describe alternatives you have considered

Alternatively, I would remove the warning about empty fields at all, as there will most likely never be a case, where all existing fields in the entire interface are set.

Describe the backwards compatibility

It will break the behavior, that a warning is generated for every "missing" field. So there might be some backwards compatibility issues.

@ClemensLinnhoff ClemensLinnhoff added the feature request Proposals which enhance the interface or add additional features. label Jan 2, 2024
@ClemensLinnhoff ClemensLinnhoff mentioned this issue Jan 2, 2024
20 tasks
@ClemensLinnhoff ClemensLinnhoff linked a pull request Feb 1, 2024 that will close this issue
6 tasks
@ClemensLinnhoff
Copy link
Contributor Author

There are already field marked as mandatory in OSI, e.g. https://opensimulationinterface.github.io/osi-antora-generator/asamosi/V3.5.0/gen/structosi3_1_1TrafficAction_1_1ActionHeader.html#ab7266e5a5270ce51d00a861c276956c8

But this should not just be a note, this should be a rule that can be tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Proposals which enhance the interface or add additional features.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant