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 config validation code #129

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

Conversation

LaumiH
Copy link

@LaumiH LaumiH commented Oct 8, 2024

I noticed that the validation of SMF config fields contains unnecessary code and does not use govalidator throughout. Instead, custom Validate() functions are written, which in most cases only call govalidator.ValidateStruct().

Using the possibility to add custom validators, I have added a few of them for complex nested structs in the UserPlaneInformation struct.

In addition, I have added unit tests to make sure the validation of my new functions works as expected.

inb4 confusion: I have rebased my changes on my other open PR #120, because it also makes changes to the configuration of UPNodes.

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