Commit Graph

88 Commits

Author SHA1 Message Date
a37ded9101 Move User entity to Core 2024-01-25 20:34:40 +01:00
0178c7356d Fix PHPStan errors 2024-01-22 19:15:54 +01:00
0a117958c9 Apply PHP-CS-Fixer fixes 2024-01-22 19:15:54 +01:00
0fff56ea68 ApiDoc: Add response description to WallabagRestController 2023-06-27 20:59:43 +02:00
5a5148707c Fix API allowed_registration
Two configuration options need to be enabled to allow user registration via the API:
1) fosuser_registration, which indicates whether registration is allowed at all (frontend and API)
2) api_user_registration, which indicates whether registration is allowed via the API
2023-03-28 20:12:55 +02:00
4f9c7a92a1 Update annotations to OpenApi 3
Most of the API annotations are directly converted. The changes in meaning are:
- Parameters "in body" is not supported anymore. These are changed to "in query" or to a request body (depending on the code).
2022-12-23 14:54:55 +01:00
6aca334d53 Move to controller as a service
Mostly using autowiring to inject deps.
The only tricky part was for import because all producer use the same class and have a different alias. So we must write them down in the service definition, autowiring doesn't work in that case.

Usually:
- if a controller has a constructor, it means injected services are at least re-used once in actions
- otherwise, service are injected per action
2022-12-19 10:38:08 +01:00
b7dba18cb2 Cleanup 2022-11-23 15:51:33 +01:00
27e788d0be Re-create all API routes 2022-11-23 12:44:55 +01:00
470a8575c0 Update to nelmio/api-doc 3.0
Convert ApiDoc to Swagger
2022-11-16 16:10:33 +01:00
eb43c78720 Use FQCN instead of service alias 2022-09-01 09:07:19 +02:00
5a55a64fee Use fosuser_registration directly instead of wallabag_user.registration_enabled 2022-08-15 17:23:16 +02:00
52e8d93248 Fix some Scrutinizer issues 2019-05-29 12:50:44 +02:00
019e1acc49 Factorize sendResponse between Api controllers
And run newer cs fixer
2019-01-22 20:42:25 +01:00
3bd65991ad Add a new endpoint to retrieve information from the wallabag instance
Useful for api client which required some information.
We might add more inside them in the future.

The endpoint /api/version should be avoided now as it contains not so much information rather the version.
2019-01-15 10:17:11 +01:00
f40c88eb1f Jump to Symfony 3.3 & update others deps
Also update tests urls
2017-10-09 16:45:12 +02:00
f808b01692 Add a real configuration for CS-Fixer 2017-07-01 09:52:38 +02:00
001cc7168a Cleanup 2016-11-03 18:01:25 +01:00
864c1dd23a Fix rest controller merge 2016-11-03 17:29:16 +01:00
5a619812ca Merge remote-tracking branch 'origin/master' into 2.2 2016-11-03 16:41:29 +01:00
7816eb622d Add entry.saved event to import & rest 2016-11-02 07:10:23 +01:00
900c844861 Exploded WallabagRestController into many controllers
Fix #2503
2016-10-28 14:46:30 +02:00
aa4741091f Add test on /api/annotations
Fix controller forward in WallabagRestController.
Update PHPDoc so it is sorted the same way as others one
Duplicate all annotations test to use both api & normal way
Also, make annotation tests independent to each other
2016-10-22 12:09:20 +02:00
3199ec4702 CS 2016-10-22 09:17:01 +02:00
d9b7768dca Added a missing namespace 2016-10-22 09:06:07 +02:00
0c271b9eb0 fix cs and phpdoc 2016-10-22 09:06:07 +02:00
b1e92f8c14 cs 2016-10-22 09:06:07 +02:00
1eea248bb0 move code 2016-10-22 09:06:07 +02:00
c7935f32d2 cs 2016-10-22 09:06:07 +02:00
351eb8d97e bring annotations to API 2016-10-22 09:06:07 +02:00
5960aa1ffc CS 2016-10-15 18:00:08 +02:00
f1c3f68e90 ApiDoc & Route annotation were conflicted
The generated error was “Unable to guess how to get a Doctrine instance from the request information.”.

I haven’t checked deeper in Doctrine (I know it was coming from the DoctrineParamConverter).

Anyway, I check for FosRest possiblity to add extra format without allowing them for every route (like it was done in the first place).

I finally found a way but it then seems all request goes to the FormatListener of FosRest so I needed to add a custom rules to match all request to be sure we don’t get  a 406 error from FosRest.

Should be ok now …
2016-10-15 16:46:42 +02:00
b1b561da51 Merge pull request #2372 from pmartin/api-get-entry-as-epub
API: ability to export entry in all available format (epub, pdf, etc...)
2016-10-12 14:06:33 +02:00
28bb48905a Optimize the way tag list is rendered
Instead of retrieve all informations about entries of a tag to just count them, we’ll count them before with a fastest query.

Also change the layout of the tag list in material design
2016-10-09 18:55:22 +02:00
4ad6f5878a Merge pull request #2393 from wallabag/api-urls-exist
Ability to check multiple urls in API
2016-10-08 13:31:31 +02:00
3f3a60879e Add entry export in API
Export isn't available for json & xml because user can use the default
entry endpoint instead.
2016-10-08 12:59:19 +02:00
24de866534 API: getEntry can return EPUB 2016-10-08 12:05:41 +02:00
ac8cf632bb Ensure orphan tag are remove in API
When the association between a tag and an entry is removed, if the tag doesn’t have other entries, we can remove it.

Also add more tests for that part and ensure TagControllerTest is isolated from the rest of the test suite (finally!)
2016-10-07 23:31:53 +02:00
f0abc22d09 Ability to check multiple urls in API 2016-10-07 20:37:01 +02:00
0b174d69d7 Fix typo & add test 2016-10-05 19:30:56 +02:00
5d39243068 Fix exists API call
Boo
2016-10-05 15:28:36 +02:00
c3f8b428dd Fix parameters in API _links
We forgot to pass them to the factory
2016-10-02 15:41:08 +02:00
3583cadf6f CS 2016-10-02 01:43:50 +02:00
6273fefd5d Add an exists endpoint in API
It should allow third party to check if an url was already saved by a user
2016-10-01 17:15:28 +02:00
faa86e06ba Fix tags count in menu
Move enable cache for Tag in the Entity because function `find*` should return result and not a Query
2016-09-25 12:03:49 +02:00
60faee002c Re-user JsonResponse
Since Symfony 3.1 we can define the json of a JsonResonse using `->setJson()`
2016-09-08 12:03:38 +02:00
429d86f388 Added tags counter in sidebar (material theme) 2016-09-04 20:53:28 +02:00
a0e1eafc35 Add some tests
Also, retrieve tag from the request instead of the query (which will be the same but it's more easy to test).

Moved down `deleteTagAction` because it conflicted with the new action:

  api_delete_tag => /api/tags/{tag}.{_format}
  api_delete_tags_label => /api/tags/label.{_format}

And finally, throw exception when a tag is not found before removing it.
2016-08-23 07:26:58 +02:00
9bf83f1fb8 CS 2016-08-23 07:26:58 +02:00
4da01f492b Delete tag or tags by label
Tests not included
2016-08-23 07:26:58 +02:00