Commit graph

9 commits

Author SHA1 Message Date
Fernando Valverde
1f6c53a20c
Update per_page_max in API endpoints + docs bump (#18415)
* Update per_page_max in API endpoints + docs bump

* Small tweak

* Fix spec typo
2022-09-02 14:07:19 -06:00
Andy George
fada329309
remove manual changes to autogenerated file (#18414) 2022-09-02 06:54:33 -05:00
Andy George
be27fe74ab
Utilize ApplicationConfig["API_PER_PAGE_MAX"] (#18394)
* add ENV["API_PER_PAGE_LIMIT"]

* cast to int

* add private_constant PER_PAGE_MAX

* use 1000 int

* typo

* use reduced count for ListingsController

* typo

* set max/default in ArticleApiIndexService

* update initializer in ArticleApiIndexService

* Update app/controllers/concerns/api/articles_controller.rb

Co-authored-by: Fernando Valverde <fernando@visualcosita.com>

* Apply suggestions from code review

Co-authored-by: Fernando Valverde <fernando@visualcosita.com>

* update API docs

Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
2022-08-30 13:46:39 -05:00
Joshua Wehner
2ff67bda24
Try an idempotentish reaction create API (#18377)
* Try an idempotentish reaction create API

* Add tests for create API endpoint

* Try -> ReactionHandler

* Fix existing tests first

* Tests for .toggle; fix broken handle_existing

* Use the Handler

* Tweak http status for reaction create

* Use the category reader

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2022-08-30 16:43:18 +02:00
Joshua Wehner
b6efce21fe
API for Reactions: Create endpoint (#18355)
* Extract reaction create from controller to service

* Success is having no errors

* Confirm http status successful

* V1 API endpoint for Create Reaction

* Actually reset cache count

* Tweak JSON response

* Reaction create -> toggle

* Try rswagger docs for reaction toggle
2022-08-24 17:02:34 +02:00
Fernando Valverde
2ad02cf31c
API v1 without api key restriction (#18340)
* Remove :api_v1 feature flag

* Reworking the auth configs throughout V1 + specs

* Fix remaining v1 specs

* Enhanced inline docs

* deprecation warning update

* Use headers variable for most v1 specs

* Cherry pick spec changes

* Fix specs

* group let! statements - rubocop

* Bring back ||= on api v1 authentication methods

* Bump swagger/v1/api_v1.json
2022-08-19 14:04:41 -06:00
Josh Puetz
dcc669de47 Rename generated swagger file 2022-07-29 10:21:27 -05:00
Josh Puetz
74e44aeb61
Documentation for Negative Behavior APIs (#18187)
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-07-28 14:30:32 -05:00
Josh Puetz
5daf869e56
v1 documentation via RSwag (#17990)
Co-authored-by: Fernando Valverde <fernando@fdo.cr>
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
2022-07-08 14:37:30 -05:00