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

implement a way to validate class prop/methods when set/call #3029

Merged

Conversation

MohamedElmdary
Copy link
Member

@MohamedElmdary MohamedElmdary commented Jun 25, 2024

Description

implement a way to validate class prop/methods when set/call

Changes

  • feat: Add a class decrator with options to validate any needed prop/method
  • feat: Use Validate class decrator in ComputeCapacity class to throw error when needed
  • chore: Remove skip from tests and run them using SKIP_PROPS_VALIDATION=true env var

Related Issues

Documentation PR

For UI changes, Please provide the Documetation PR on info_grid

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstrings
  • Screenshots/Video attached (needed for UI changes)

Copy link
Contributor

@Mahmoud-Emad Mahmoud-Emad left a comment

Choose a reason for hiding this comment

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

Good job ya Rabe3 :)

packages/grid_client/src/helpers/validator.ts Outdated Show resolved Hide resolved
…om:threefoldtech/tfgrid-sdk-ts into development_2.6_implement_class_validation
Base automatically changed from development_2.6 to development July 2, 2024 12:42
@MohamedElmdary MohamedElmdary merged commit b45604f into development Jul 3, 2024
3 checks passed
@MohamedElmdary MohamedElmdary deleted the development_2.6_implement_class_validation branch July 3, 2024 08:02
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.

None yet

4 participants