diff --git a/modules/openapi-generator/src/main/resources/php-symfony/model_variables.mustache b/modules/openapi-generator/src/main/resources/php-symfony/model_variables.mustache index 38959f360eb2..e6bb7ea9a594 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/model_variables.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/model_variables.mustache @@ -7,6 +7,9 @@ * @SerializedName("{{baseName}}") {{#required}} * @Assert\NotNull() + {{^isPrimitiveType}} + * @Assert\Valid() + {{/isPrimitiveType}} {{/required}} {{#isEnum}} {{#isContainer}}