Optionnal quote because the frontend does not use it

This commit is contained in:
adev 2019-11-24 10:44:26 +01:00 committed by Jeremy Benoist
parent 8197f08266
commit 86c1751186
No known key found for this signature in database
GPG key ID: 84290C294324D304
3 changed files with 3 additions and 4 deletions

View file

@ -60,7 +60,6 @@ class Annotation
/**
* @var string
*
* @Assert\NotNull()
* @Assert\Length(
* max = 10000,
* maxMessage = "validator.quote_length_too_high"

View file

@ -17,7 +17,7 @@ class NewAnnotationType extends AbstractType
'empty_data' => '',
])
->add('quote', null, [
'empty_data' => null,
'empty_data' => '',
'trim' => false,
])
->add('ranges', CollectionType::class, [

View file

@ -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"=true, "description"="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"},
* }
* )
*