forked from loafle/openapi-generator-original
[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:
parent
c9716fcebb
commit
7cf6ee1957
@ -416,14 +416,6 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg
|
|||||||
if (param.isContainer) {
|
if (param.isContainer) {
|
||||||
param.vendorExtensions.put("x-comment-type", param.dataType + "[]");
|
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
|
// Create a variable to display the correct return type in comments for interfaces
|
||||||
|
Loading…
x
Reference in New Issue
Block a user