[php-symfony] fix double quoting string defaults values (#9126)

quoting for default values is already done in:
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java#L533
This commit is contained in:
lerminou 2021-04-04 04:40:16 +02:00 committed by GitHub
parent c9716fcebb
commit 7cf6ee1957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -416,14 +416,6 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg
if (param.isContainer) {
param.vendorExtensions.put("x-comment-type", param.dataType + "[]");
}
// Quote default values for strings
// @todo: The default values for headers, forms and query params are handled
// in DefaultCodegen fromParameter with no real possibility to override
// the functionality. Thus we are handling quoting of string values here
if ("string".equals(param.dataType) && param.defaultValue != null && !param.defaultValue.isEmpty()) {
param.defaultValue = "'" + param.defaultValue + "'";
}
}
// Create a variable to display the correct return type in comments for interfaces