Is there a way to include double quotes in descriptions?
/*
* @SWG\Definition(
* definition="Something",
* description="This could be a "foo" or a "bar" or something else."
*/
This generates the error:
[WARN] [Syntax Error] Expected Doctrine\Common\Annotations\DocLexer::T_CLOSE_PARENTHESIS, got 'foo' in ...
I've tried escaping them with backslashes, but that doesn't work (same error):
/*
* @SWG\Definition(
* definition="Something",
* description="This could be a \"foo\" or a \"bar\" or something else."
*/
Nor does using single quotes for the outer string:
/*
* @SWG\Definition(
* definition="Something",
* description='This could be a "foo" or a "bar" or something else.'
*/
Gives the error:
[WARN] [Syntax Error] Expected PlainValue, got ''' in ...
You can escape a " with a ".
description="This could be a ""foo"" or a ""bar"" or something else."
Thanks @bfanger !
Most helpful comment
You can escape a
"with a".description="This could be a ""foo"" or a ""bar"" or something else."