update entry api documents

Signed-off-by: EINDEX <snowstarlbk@gmail.com>
This commit is contained in:
EINDEX 2024-11-04 21:48:55 +08:00
parent 89db5690a0
commit 3305a08ae2
No known key found for this signature in database

View file

@ -558,125 +558,82 @@ class EntryRestController extends WallabagRestController
* @Operation( * @Operation(
* tags={"Entries"}, * tags={"Entries"},
* summary="Create an entry.", * summary="Create an entry.",
* @OA\Parameter( * @OA\RequestBody(
* name="url",
* in="query",
* description="Url for the entry.",
* required=true, * required=true,
* @OA\Schema( * @OA\JsonContent(
* required={"url"},
* @OA\Property(
* property="url",
* type="string", * type="string",
* description="Url for the entry",
* example="http://www.test.com/article.html" * example="http://www.test.com/article.html"
* )
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="title", * property="title",
* in="query",
* description="Optional, we'll get the title from the page.",
* required=false,
* @OA\Schema(
* type="string", * type="string",
* ) * description="Optional, we'll get the title from the page"
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="tags", * property="tags",
* in="query",
* description="a comma-separated list of tags.",
* required=false,
* @OA\Schema(
* type="string", * type="string",
* description="A comma-separated list of tags",
* example="tag1,tag2,tag3" * example="tag1,tag2,tag3"
* )
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="archive", * property="archive",
* in="query",
* description="entry already archived",
* required=false,
* @OA\Schema(
* type="integer", * type="integer",
* enum={"1", "0"}, * enum={0,1},
* default="0" * default=0,
* ) * description="Entry already archived"
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="starred", * property="starred",
* in="query",
* description="entry already starred",
* required=false,
* @OA\Schema(
* type="integer", * type="integer",
* enum={"1", "0"}, * enum={0,1},
* default="0" * default=0,
* ) * description="Entry already starred"
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="content", * property="content",
* in="query", * type="string",
* description="Content of the entry", * description="Content of the entry"
* required=false,
* @OA\Schema(
* type="string"
* )
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="language", * property="language",
* in="query", * type="string",
* description="Language of the entry", * description="Language of the entry"
* required=false,
* @OA\Schema(
* type="string"
* )
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="preview_picture", * property="preview_picture",
* in="query", * type="string",
* description="Preview picture of the entry", * description="Preview picture of the entry"
* required=false,
* @OA\Schema(
* type="string"
* )
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="published_at", * property="published_at",
* in="query",
* description="Published date of the entry",
* required=false,
*
* @OA\Schema(
* type="string", * type="string",
* format="YYYY-MM-DDTHH:II:SS+TZ or a timestamp (integer)", * format="YYYY-MM-DDTHH:II:SS+TZ or a timestamp (integer)",
* ) * description="Published date of the entry"
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="authors", * property="authors",
* in="query", * type="string",
* description="Authors of the entry", * description="Authors of the entry",
* required=false,
* @OA\Schema(
* type="string",
* example="Name Firstname,author2,author3" * example="Name Firstname,author2,author3"
* )
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="public", * property="public",
* in="query",
* description="will generate a public link for the entry",
* required=false,
* @OA\Schema(
* type="integer", * type="integer",
* enum={"1", "0"}, * enum={0,1},
* default="0" * default=0,
* ) * description="Will generate a public link for the entry"
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="origin_url", * property="origin_url",
* in="query",
* description="Origin url for the entry (from where you found it).",
* required=false,
* @OA\Schema(
* type="string", * type="string",
* description="Origin url for the entry (from where you found it)",
* example="http://www.test.com/article.html" * example="http://www.test.com/article.html"
* ) * )
* )
* ), * ),
* @OA\Response( * @OA\Response(
* response="200", * response="200",
@ -785,105 +742,74 @@ class EntryRestController extends WallabagRestController
* pattern="\w+", * pattern="\w+",
* ) * )
* ), * ),
* @OA\Parameter( * @OA\RequestBody(
* name="title",
* in="query",
* description="",
* required=false, * required=false,
* @OA\Schema(type="string") * @OA\JsonContent(
* ), * @OA\Property(
* @OA\Parameter( * property="title",
* name="tags",
* in="query",
* description="a comma-separated list of tags.",
* required=false,
* @OA\Schema(
* type="string", * type="string",
* example="tag1,tag2,tag3", * description="Title of the entry"
* )
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="archive", * property="tags",
* in="query", * type="string",
* description="archived the entry.", * description="A comma-separated list of tags",
* required=false, * example="tag1,tag2,tag3"
* @OA\Schema( * ),
* @OA\Property(
* property="archive",
* type="integer", * type="integer",
* enum={"1", "0"}, * enum={0,1},
* default="0" * default=0,
* ) * description="Archive the entry"
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="starred", * property="starred",
* in="query",
* description="starred the entry.",
* required=false,
* @OA\Schema(
* type="integer", * type="integer",
* enum={"1", "0"}, * enum={0,1},
* default="0" * default=0,
* ) * description="Star the entry"
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="content", * property="content",
* in="query", * type="string",
* description="Content of the entry", * description="Content of the entry"
* required=false,
* @OA\Schema(type="string")
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="language", * property="language",
* in="query", * type="string",
* description="Language of the entry", * description="Language of the entry"
* required=false,
* @OA\Schema(type="string")
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="preview_picture", * property="preview_picture",
* in="query", * type="string",
* description="Preview picture of the entry", * description="Preview picture of the entry"
* required=false,
* @OA\Schema(type="string")
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="published_at", * property="published_at",
* in="query", * type="string",
* description="Published date of the entry", * format="YYYY-MM-DDTHH:II:SS+TZ or a timestamp (integer)",
* required=false, * description="Published date of the entry"
* @OA\Schema(
* type="datetime|integer",
* format="YYYY-MM-DDTHH:II:SS+TZ or a timestamp",
* )
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="authors", * property="authors",
* in="query", * type="string",
* description="Authors of the entry", * description="Authors of the entry",
* required=false, * example="Name Firstname,author2,author3"
* @OA\Schema(
* type="string",
* example="Name Firstname,author2,author3",
* )
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="public", * property="public",
* in="query",
* description="will generate a public link for the entry",
* required=false,
* @OA\Schema(
* type="integer", * type="integer",
* enum={"1", "0"}, * enum={0,1},
* default="0" * default=0,
* ) * description="Will generate a public link for the entry"
* ), * ),
* @OA\Parameter( * @OA\Property(
* name="origin_url", * property="origin_url",
* in="query",
* description="Origin url for the entry (from where you found it).",
* required=false,
* @OA\Schema(
* type="string", * type="string",
* example="http://www.test.com/article.html", * description="Origin url for the entry (from where you found it)",
* example="http://www.test.com/article.html"
* )
* ) * )
* ), * ),
* @OA\Response( * @OA\Response(