Skip to content

Record the enums found in all proto files for later access#3

Open
gingerbus wants to merge 1 commit into
aristanetworks:masterfrom
gingerbus:master
Open

Record the enums found in all proto files for later access#3
gingerbus wants to merge 1 commit into
aristanetworks:masterfrom
gingerbus:master

Conversation

@gingerbus
Copy link
Copy Markdown

Some tooling we use internally requires that we can validate against enums found not just in the current proto file, but also in imported proto files. If we retain the oracles generated during parse time for all proto files, we can refer back to them at a later validation time in our code to ensure the externally referred-to enum exists somewhere in the file dependencies.

Added a test to show the usage.

Allow access to the per-imported proto oracles to allow validation of
enum keys outside of the protobuf being parsed. Code which relies on
this library can only validate the enums parsed in the targeted
proto file. By exposing the enums found in the imported proto files we
can extend the validation to the set of all enums found during the
parse.
@gingerbus
Copy link
Copy Markdown
Author

@zmarcantel Gentle reminder...

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