All Downloads are FREE. Search and download functionalities are using the official Maven repository.

php-flight.model_variables.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
    /**
    {{#description}}
     * {{.}}
     *
    {{/description}}
     * @var {{{vendorExtensions.x-comment-type}}}
     * @SerializedName("{{baseName}}")
{{#required}}
     * @Assert\NotNull()
     {{^isPrimitiveType}}
     * @Assert\Valid()
     {{/isPrimitiveType}}
{{/required}}
{{#isEnum}}
    {{#isContainer}}
     * @Assert\All({
    {{#items}}
     *   @Assert\Choice({ {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} })
    {{/items}}
     * })
    {{/isContainer}}
    {{^isContainer}}
     * @Assert\Choice({ {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} })
    {{/isContainer}}
{{/isEnum}}
{{#isContainer}}
     * @Assert\All({
    {{#items}}
     *   @Assert\Type("{{dataType}}")
    {{/items}}
     * })
     {{#isMap}}
     {{#items}}
     * @Type("array")
     {{/items}}
     {{/isMap}}
     {{^isMap}}
     {{#items}}
     {{#isEnumRef}}
     * @Accessor(getter="getSerialized{{nameInPascalCase}}")
     * @Type("array")
     {{/isEnumRef}}
     {{^isEnumRef}}
     * @Type("array<{{dataType}}>")
     {{/isEnumRef}}
     {{/items}}
     {{/isMap}}
{{/isContainer}}
{{^isContainer}}
    {{#isDate}}
     * @Assert\Type("\Date")
     * @Type("DateTime<'Y-m-d'>")
    {{/isDate}}
    {{#isDateTime}}
     * @Assert\Type("\DateTime"))
     * @Type("DateTime")
    {{/isDateTime}}
    {{#isEnumRef}}
        * @Accessor(getter="getSerialized{{nameInPascalCase}}")
        * @Type("string")
    {{/isEnumRef}}
    {{^isDate}}
    {{^isDateTime}}
    {{^isEnumRef}}
     * @Assert\Type("{{dataType}}")
     * @Type("{{dataType}}")
    {{/isEnumRef}}
    {{/isDateTime}}
    {{/isDate}}
{{/isContainer}}
{{#hasValidation}}
    {{#maxLength}}
     * @Assert\Length(
     *   max = {{.}}
     * )
    {{/maxLength}}
    {{#minLength}}
     * @Assert\Length(
     *   min = {{.}}
     * )
    {{/minLength}}
    {{#minimum}}
    {{#exclusiveMinimum}}
     * @Assert\GreaterThan({{minimum}})
    {{/exclusiveMinimum}}
    {{^exclusiveMinimum}}
     * @Assert\GreaterThanOrEqual({{minimum}})
    {{/exclusiveMinimum}}
    {{/minimum}}
    {{#maximum}}
    {{#exclusiveMaximum}}
     * @Assert\LessThan({{maximum}})
    {{/exclusiveMaximum}}
    {{^exclusiveMaximum}}
     * @Assert\LessThanOrEqual({{maximum}})
    {{/exclusiveMaximum}}
    {{/maximum}}
    {{#pattern}}
     * @Assert\Regex("/{{.}}/")
    {{/pattern}}
    {{#maxItems}}
     * @Assert\Count(
     *   max = {{.}}
     * )
    {{/maxItems}}
    {{#minItems}}
     * @Assert\Count(
     *   min = {{.}}
     * )
    {{/minItems}}
{{/hasValidation}}
     */
    public {{{vendorExtensions.x-parameter-type}}} ${{name}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy