forked from wallabag/wallabag
Merge pull request #4161 from aaa2000/bug-empty-quote
API return an error with empty quote
This commit is contained in:
@ -17,7 +17,8 @@ class NewAnnotationType extends AbstractType
|
||||
'empty_data' => '',
|
||||
])
|
||||
->add('quote', null, [
|
||||
'empty_data' => null,
|
||||
'empty_data' => '',
|
||||
'trim' => false,
|
||||
])
|
||||
->add('ranges', CollectionType::class, [
|
||||
'entry_type' => RangeType::class,
|
||||
|
||||
@ -37,8 +37,8 @@ class AnnotationRestController extends WallabagRestController
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="ranges", "dataType"="array", "requirement"="\w+", "description"="The range array for the annotation"},
|
||||
* {"name"="quote", "dataType"="string", "required"=false, "description"="Optional, quote for the annotation"},
|
||||
* {"name"="text", "dataType"="string", "required"=true, "description"=""},
|
||||
* {"name"="quote", "dataType"="string", "description"="The annotated text"},
|
||||
* {"name"="text", "dataType"="string", "required"=true, "description"="Content of annotation"},
|
||||
* }
|
||||
* )
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user