CyberfusionIO / cyberfusion-cluster-api-client

Cyberfusion Core API client
https://core-api.cyberfusion.io
MIT License
5 stars 3 forks source link

Deleting a `DatabaseUser` results into a validation failed on password #37

Closed mbardelmeijer closed 1 year ago

mbardelmeijer commented 1 year ago

Goal

I'm trying to delete a database user object. I'm getting the following exception when trying to delete it. It seems that the null factor for the database user password field isn't handled correctly.

Additional information

Cyberfusion\ClusterApi\Exceptions\ValidationException: The validation failed: `length_max: 255 failed on NULL, pattern: ^[ -~]+$ failed on NULL` in vendor/cyberfusion/cluster-api-client/src/Exceptions/ValidationException.php:11

#0 /vendor/cyberfusion/cluster-api-client/src/Support/Validator.php(210): Cyberfusion\ClusterApi\Exceptions\ValidationException::validationFailed()
#1 /vendor/cyberfusion/cluster-api-client/src/Models/DatabaseUser.php(68): Cyberfusion\ClusterApi\Support\Validator->validate()
#2 /vendor/cyberfusion/cluster-api-client/src/Models/DatabaseUser.php(143): Cyberfusion\ClusterApi\Models\DatabaseUser->setPassword()
#3 /vendor/cyberfusion/cluster-api-client/src/Endpoints/DatabaseUsers.php(64): Cyberfusion\ClusterApi\Models\DatabaseUser->fromArray()
#4 /vendor/cyberfusion/cluster-api-client/src/Endpoints/DatabaseUsers.php(166): Cyberfusion\ClusterApi\Endpoints\DatabaseUsers->get()
dvdheiden commented 1 year ago

Thank you for reporting this issue. I really need to make some time to solve: https://github.com/CyberfusionNL/cyberfusion-cluster-api-client/issues/7 but will fix this case ASAP.