Skip to content

Conversation

@sgoral-splunk
Copy link
Contributor

@sgoral-splunk sgoral-splunk commented Sep 5, 2024

Issue number:ADDON-74237

Summary

Added support for default and custom name field validation

Changes

  • RestModel now has an additional parameter "special_fields"
  • RestEndpoint now has two additional methods for executing custom validations
  • _pre_request decorator has new method "basic_name_validation" for basic validations

User experience

Name field will be validated on the server side

Checklist

If your change doesn't seem to apply, please leave them unchecked.

@sgoral-splunk sgoral-splunk changed the title fix: add default validation for name field feat: add default and custom validations for name field Sep 17, 2024
@sgoral-splunk sgoral-splunk marked this pull request as ready for review September 17, 2024 08:16
@sgoral-splunk sgoral-splunk requested a review from a team as a code owner September 17, 2024 08:16
lplonka-splunk
lplonka-splunk previously approved these changes Sep 25, 2024
@hetangmodi-crest
Copy link
Contributor

Integration test are failing, can you please fix it.

@vtsvetkov-splunk vtsvetkov-splunk removed the request for review from artemrys October 1, 2024 10:52
artemrys
artemrys previously approved these changes Oct 8, 2024

class RestModel:
def __init__(self, fields, name=None):
def __init__(self, fields, name=None, special_fields: List[RestField] = None):
Copy link
Member

Choose a reason for hiding this comment

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

nit: Optional[List[RestField]]

"displayName": "Demo",
"schemaVersion": "0.0.3"
"schemaVersion": "0.0.8",
"_uccVersion": "5.45.0"
Copy link
Member

Choose a reason for hiding this comment

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

nit: _uccVersion is a run time configuration

@sgoral-splunk sgoral-splunk merged commit 1681309 into develop Oct 9, 2024
16 of 17 checks passed
@sgoral-splunk sgoral-splunk deleted the fix/add_defult_name_validation branch October 9, 2024 11:59
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2024
@srv-rr-github-token
Copy link
Contributor

🎉 This PR is included in version 6.4.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@srv-rr-github-token
Copy link
Contributor

🎉 This PR is included in version 6.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants