forked from loafle/openapi-generator-original
* fix for allowable values, #4645 * fixed string values * rebuilt for #4645
This commit is contained in:
@@ -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}}
|
||||
|
||||
Reference in New Issue
Block a user