The default values set in the constructor for PHP Model classes does not correctly reference self::.
I believe the offending code is this line:
|
$this->container['{{name}}'] = isset($data['{{name}}']) ? $data['{{name}}'] : {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}; |
example generated code:
$this->container['code'] = isset($data['code']) ? $data['code'] : CODE_200;
expected:
$this->container['code'] = isset($data['code']) ? $data['code'] : self::CODE_200;
The default values set in the constructor for PHP Model classes does not correctly reference self::.
I believe the offending code is this line:
openapi-generator/modules/openapi-generator/src/main/resources/php/model_generic.mustache
Line 164 in d9a6f4d
example generated code:
expected: