Treat empty string '' same as undefined for all string based properties#1846
Treat empty string '' same as undefined for all string based properties#1846DerManoMann wants to merge 1 commit intozircote:masterfrom
'' same as undefined for all string based properties#1846Conversation
|
imo: If you document it inside PHP as empty string, the swagger-php output should be an empty string. |
|
It's a tricky one IMO. The attribute should be the authority, so explicitly passing in The original issue was explicitly about hiding the docblock description - which works for annotations. Maybe it's time to give up feature parity and move on and require an empty string in the attribute, so it can be distinguished from the default of |
|
I agree that the attribute should be the authority and that we need a way to say "don't use the text from the docblock" But the change in AbstractAnnotation.php affects all properties, not just the description. When defining I'd like the Wouldn't updating the description in the attribute classes to: ?string $description = Generator::UNDEFINED,solve the issue? |
|
I know that the PR is not that great. Also, just using I'd love to avoid having to use it as it stops using proper type-hints, whereas something like Still looking for a solution that would work with |
|
Maybe I am overthinking this. Also this is really just an issue for string values that may fallback to phpdoc strings if not provided, so in reality it is limited to title/description/summary, iirc. Since those are |
|
Agree, we want proper type hints, adding the string type would cause confusion. |
|
Closing in favour of #1886 |
Related to #1668