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

Bug fix: Policy templates field validation #125

Conversation

davidjwbbc
Copy link
Contributor

These fix issues with the validation of fields in the Policy Templates where the field type is a string restricted by a regex in the OpenAPI and fixes a bug in number range validation for integer types.

This addresses #120, #121, #122 and #124.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entire file feels like it contains functions that might come in handy for other Application Functions, such as the Data Collection AF. I'm wondering whether we should factor it out as a shared library that lives in rt-common-shared?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine to do the additional JSON input parameter validation here. But would be good to move these validations into the autogenerated parsing code eventually. Maybe we create a backlog issue for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, we need to look at getting the the validation in the templates to match regex's.
I'll raise a backlog ticket for that and another to look at handling the enumerated types with string catch-all better.

@davidjwbbc davidjwbbc merged commit 82cd065 into 5G-MAG:development Jan 22, 2024
@davidjwbbc davidjwbbc deleted the bug-fix/policy-templates-field-validation branch January 22, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment