Skip to content

Comments

refactor: improve config validation code#129

Open
LaumiH wants to merge 19 commits intofree5gc:mainfrom
LaumiH:improve_config_validation
Open

refactor: improve config validation code#129
LaumiH wants to merge 19 commits intofree5gc:mainfrom
LaumiH:improve_config_validation

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.

@LaumiH LaumiH changed the title Improve config validation code refactor: improve config validation code Oct 10, 2024
@ianchen0119
Copy link
Contributor

ianchen0119 commented Feb 25, 2025

Hi @LaumiH

I noticed that you've created a series of PR on SMF for a while.
If you need any support to merge the PR, please let me know.

Thanks for your contribution!

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.

2 participants