sdk
sdk copied to clipboard
SM-837: Add Secret and Project Length Restrictions
Type of change
- [ ] Bug fix
- [x] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other
Objective
Add Secret and Project length restrictions for each field:
-
project_name
<= 500 -
secret_key
<= 500 -
secret_value
<= 3000 -
secret_note
<= 7000
Code changes
- error.rs: Add the FieldLengthExceeded error
- project/create.rs: Add and call the validate function
- project/mod.rs: Add the project_name max const
- project/update.rs: Add and call the validate function
- secret/create.rs: Add and call the validate function
- secret/mod.rs: Add the secret key, value, and note max const's
- secret/update.rs: Add and call the validate function
Before you submit
- Please add unit tests where it makes sense to do so (encouraged but not required)