We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi
Looks possible to improve optional argument and reduce case with error. I've found an old issue at SO : https://stackoverflow.com/questions/21241675/service-with-many-optional-parameters-with-restler
In validator.ph at https://github.com/Luracast/Restler/blob/master/src/Data/Validator.php#L512
I propose to add this patch :
if (!$info->required && isset($info->default) && empty($input)) { $input = $info->default; }
After default value is checked as any other input and must be compliant with other annotation/configuration set.
In this case annotation must be set with :
@param string $state {@required false} {@default defaultvalue}
If this idea is not too bad I can propose a related pull request
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi
Looks possible to improve optional argument and reduce case with error.
I've found an old issue at SO : https://stackoverflow.com/questions/21241675/service-with-many-optional-parameters-with-restler
In validator.ph at https://github.com/Luracast/Restler/blob/master/src/Data/Validator.php#L512
I propose to add this patch :
After default value is checked as any other input and must be compliant with other annotation/configuration set.
In this case annotation must be set with :
If this idea is not too bad I can propose a related pull request
The text was updated successfully, but these errors were encountered: