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

Improve generation of the _choice suffix for ProtoBuf #540

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

TomGneuss
Copy link
Contributor

The method proto_naming.interface_name was previously unused since ProtoBuf does not support interfaces anyway. It is now used to generate the _choice suffix for message definitions that try to mimic polymorphism with the oneof keyword. This reduces the risk of inconsistent naming when generating the ProtoBuf message definitions.

As part of this PR, comments regarding ProtoBuf intricacies have been refined.

Also, the files for the ProtoBuf test cases have been moved slightly to align with the directory structure of the other generator tests.

Tom Gneuß added 7 commits March 10, 2025 15:42
trying to generate polymorphic protobuf messages leads to the necessary generation of choice messages.
naming them is now moved to the naming.py utilities
the directory structure for the protobuf generator test cases is now aligned with the other generators
bring back the two new lines between protobuf package name and message definitions
align the expected output of the protobuf generator with the latest version of aas-core-meta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant