diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SymfonyServerCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SymfonyServerCodegen.java index cbac5e779af..b1a0877a473 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SymfonyServerCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SymfonyServerCodegen.java @@ -332,6 +332,7 @@ public Map postProcessModels(Map objs) { final String importType = var.datatype.replaceFirst("\\[\\]$", ""); final String dataType = extractSimpleName(var.datatype); final boolean isScalarType = typeMapping.containsValue(importType); + var.vendorExtensions.put("x-fullType", var.datatype); if (!isScalarType) { var.vendorExtensions.put("x-typeAnnotation", dataType.endsWith("[]") ? "array" : dataType); imports.add(importType); diff --git a/modules/swagger-codegen/src/main/resources/php-symfony/model_generic.mustache b/modules/swagger-codegen/src/main/resources/php-symfony/model_generic.mustache index b00366590c2..58cbf36a935 100644 --- a/modules/swagger-codegen/src/main/resources/php-symfony/model_generic.mustache +++ b/modules/swagger-codegen/src/main/resources/php-symfony/model_generic.mustache @@ -13,7 +13,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple * @var array[] */ protected static $_attributes = [{{#vars}} - '{{name}}' => ['{{baseName}}', '{{{datatype}}}', {{#dataFormat}}'{{{dataFormat}}}'{{/dataFormat}}{{^dataFormat}}null{{/dataFormat}}, '{{setter}}', '{{getter}}'],{{/vars}} + '{{name}}' => ['{{baseName}}', '{{{vendorExtensions.x-fullType}}}', {{#dataFormat}}'{{{dataFormat}}}'{{/dataFormat}}{{^dataFormat}}null{{/dataFormat}}, '{{setter}}', '{{getter}}'],{{/vars}} ]; {{#vars}}{{#isEnum}}{{#allowableValues}}{{#enumVars}} const {{enumName}}_{{{name}}} = {{{value}}};