]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Optionnal quote because the frontend does not use it
authoradev <adev2000@gmail.com>
Sun, 24 Nov 2019 09:44:26 +0000 (10:44 +0100)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 27 Nov 2019 13:38:35 +0000 (14:38 +0100)
src/Wallabag/AnnotationBundle/Entity/Annotation.php
src/Wallabag/AnnotationBundle/Form/NewAnnotationType.php
src/Wallabag/ApiBundle/Controller/AnnotationRestController.php

index ee7c19310108b904d6ac1c6533b00b14d996841d..a180d504786c866686a70e34b8510d133e9e3b11 100644 (file)
@@ -60,7 +60,6 @@ class Annotation
     /**
      * @var string
      *
-     * @Assert\NotNull()
      * @Assert\Length(
      *     max = 10000,
      *     maxMessage = "validator.quote_length_too_high"
index aac6445c82e9aa066205ac4bec7bf1eb43f7a312..48bc2c59d1085f24a4182a1e0d3d0b399a6ecc28 100644 (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, [
index e5b3eb27fcc385152ff6a21499228ba4f8e334db..66693189ace14771445b2d42999372d34687838d 100644 (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"},
      *      }
      * )
      *