fix for allowable values, #4645 (#4646)

* fix for allowable values, #4645

* fixed string values

* rebuilt for #4645
This commit is contained in:
Tony Tam
2017-01-24 20:11:49 -08:00
committed by wing328
parent 6e846e7463
commit 3476e83a36
5 changed files with 7 additions and 7 deletions

View File

@@ -128,7 +128,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
{{^isContainer}}
$allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}];
if (!in_array($this->container['{{name}}'], $allowed_values)) {
$invalid_properties[] = "invalid value for '{{name}}', must be one of #{allowed_values}.";
$invalid_properties[] = "invalid value for '{{name}}', must be one of {{#allowableValues}}{{#values}}'{{{this}}}'{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}.";
}
{{/isContainer}}