forked from loafle/openapi-generator-original
php: Do not HTML escape patterns
This commit is contained in:
parent
dd1ed12318
commit
8f98a6d6f5
@ -149,8 +149,8 @@ use \{{invokerPackage}}\ObjectSerializer;
|
||||
}
|
||||
{{/minimum}}
|
||||
{{#pattern}}
|
||||
if ({{^required}}!is_null(${{paramName}}) && {{/required}}!preg_match("{{pattern}}", ${{paramName}})) {
|
||||
throw new \InvalidArgumentException('invalid value for "{{paramName}}" when calling {{classname}}.{{operationId}}, must conform to the pattern {{pattern}}.');
|
||||
if ({{^required}}!is_null(${{paramName}}) && {{/required}}!preg_match("{{{pattern}}}", ${{paramName}})) {
|
||||
throw new \InvalidArgumentException('invalid value for "{{paramName}}" when calling {{classname}}.{{operationId}}, must conform to the pattern {{{pattern}}}.');
|
||||
}
|
||||
{{/pattern}}
|
||||
|
||||
|
@ -155,8 +155,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
||||
|
||||
{{/minimum}}
|
||||
{{#pattern}}
|
||||
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}!preg_match("{{pattern}}", $this->container['{{name}}'])) {
|
||||
$invalid_properties[] = "invalid value for '{{name}}', must be conform to the pattern {{pattern}}.";
|
||||
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}!preg_match("{{{pattern}}}", $this->container['{{name}}'])) {
|
||||
$invalid_properties[] = "invalid value for '{{name}}', must be conform to the pattern {{{pattern}}}.";
|
||||
}
|
||||
|
||||
{{/pattern}}
|
||||
@ -209,7 +209,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
||||
}
|
||||
{{/minimum}}
|
||||
{{#pattern}}
|
||||
if (!preg_match("{{pattern}}", $this->container['{{name}}'])) {
|
||||
if (!preg_match("{{{pattern}}}", $this->container['{{name}}'])) {
|
||||
return false;
|
||||
}
|
||||
{{/pattern}}
|
||||
@ -270,8 +270,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
||||
}
|
||||
{{/minimum}}
|
||||
{{#pattern}}
|
||||
if (!preg_match("{{pattern}}", ${{name}})) {
|
||||
throw new \InvalidArgumentException('invalid value for ${{name}} when calling {{classname}}.{{operationId}}, must be conform to the pattern {{pattern}}.');
|
||||
if (!preg_match("{{{pattern}}}", ${{name}})) {
|
||||
throw new \InvalidArgumentException('invalid value for ${{name}} when calling {{classname}}.{{operationId}}, must be conform to the pattern {{{pattern}}}.');
|
||||
}
|
||||
{{/pattern}}
|
||||
{{/hasValidation}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user