Commit graph

33 commits

Author SHA1 Message Date
Stu Finn
95be4c6308
Update api_v0.yml (#9495)
Updated description with Forem placeholder text
2020-07-24 16:33:18 -04:00
jkrsn98
b84f04baa5
API: add nullable to nullable fields in documentation (#9407)
* crossposted_at made nullable

* edited_at made nullable

* cover_image made nullable

* twitter_username made nullable

* github_username made nullable

* website_url made nullable

* user summary made nullable

* user location made nullable
2020-07-22 12:22:45 +02:00
Piyush Suthar
e8b32c0e51
[deploy] Changed the Typo at "A Published article by path" (#9396) 2020-07-20 09:08:52 -04:00
Andy Zhao
955bdcb2bc
Update docs with Forem instead of dev.to (#9316)
* Rename all GitHub links from thepracticaldev/dev.to to forem/forem

* Use new site name

* Rename to Forem

* Rename more dev.to to forem

* Remove unnecessary redirects

* Rename DEV to Forem

* Use Forem instead of DEV for branding

* Use Forem instead of DEV for licensing

* Use seedling instead of DEV logo
2020-07-15 13:29:11 -04:00
rhymes
5a1c842b6f
API: add docs for get published article by path (#9261) 2020-07-13 15:33:30 +02:00
Michael Kohl
7f75f99560
[deploy] Rename classified listings (#7910)
* Change models and related files

* Update controllers and specs

* More renaming

* Seek and destroy, I mean search and replace

* Round up the stragglers

* Ground control to Major Travis...

* More fixes

* PR feedback

* Various fixes

* Rename view

* Fix list query builder

* Unify request specs

* Fix some API spec errors

* Fix remaining API specs

* Make spec conform to API

* Fix leftover problems

* Fix JS tests

* Fix column name in select

* Fix API specs

* Fix search specs

* Paging Mr. Travis
2020-05-27 13:35:09 +00:00
Andy Zhao
c42fd3461e
[deploy] Rename positive_reactions_count to public_reactions_count in logic (#7926)
* Rename positive_reactions_count to public_reactions_count

* Add positive reactions count back in so we can remove it

* Use public_category method for reactions

* Add positive_reactions_count in case any old caches rely on it

* Add positive_rxn_count to account for API endpoints

* Remove unused method

* One more spot...

* Add method back in because of caches

* Update specs to match new functionality

* Fix typo

* Remove unused methods
2020-05-26 12:36:28 -04:00
Mac Siri
a763f268e3
Add 403 to API docs (#7861) 2020-05-15 12:16:51 -04:00
rhymes
0186fd9aee
Add Retry-After for API rate limit errors and document limits in API spec (#7444)
* Add correct rate limit exception to Articles::Updater

* Send Retry-After with HTTP 429 back to the client

* Update API specs for error 429

* Test build

* Fix spec

* Add retry after to ImageUploadsController and fix specs

* Generalize a bit
2020-04-24 17:35:28 +02:00
Keith Maxwell
6c302f712a
Add missing } to updateArticle code sample (#6924)
Before this change the example curl command returns 400 bad request with an appropriate API key and article ID.

After this change the example curl command does not return error 400 bad request.
2020-03-29 08:35:05 +02:00
rhymes
efb0a7af56
API docs: cleanup parameters (#6625)
* Add ranges and defaults for numeric params

* Refactor page and per_page params with common schema

* Group common id parameters
2020-03-16 11:42:54 +01:00
rhymes
1428013ebd
API: add users and videos docs (#6611) [deploy]
* Fix IDs size

* Document /api/users/{id}

* Document /users/me

* Add videos API docs
2020-03-13 09:12:09 +01:00
rhymes
2d008c58f0
Added docs for tags API (#6583)
* Add API Tags documentation

* Add comment for vendor extensions

* Fix typo

* Remove comment
2020-03-11 16:32:25 +01:00
rhymes
29497ad515
API: add docs for podcast episodes endpoint (#6555)
* Add docs to /api/podcast_episodes

* Bump version

* Fix with the correct slug
2020-03-11 15:46:56 +01:00
rhymes
01e4a0b0f1
API: add docs for /followers/users and remove organizations endpoint (#6551)
* Use api-key for api tests

* Remove /api/followers/organizations endpoint

* Add more tests

* Add documentation for /api/followers/users
2020-03-11 10:56:43 +01:00
rhymes
4c6b901b7a
Validate API OpenAPI 3 spec (#6519)
* Add @stoplight/spectral to dev dependencies for validation

* Add yarn api-docs:lint command

* Fix linting errors

* Lower severity level

* Add ibm-openapi-validator as linter, as it inspects slightly differently
2020-03-09 16:40:05 +01:00
Fernando Valverde
0309bc2e17
Changes type date to string on Create/Update Listings (#6514)
Co-authored-by: rhymes <rhymesete@gmail.com>
2020-03-09 08:34:47 +01:00
rhymes
21fca3e0f2
Comments API: hide deleted and hidden comments (plus docs) (#6482) [deploy]
* Modernize index test

* Hide comments body_html and user info if the comment is either deleted or hidden

* Shorten lines a bit

* Freeze repeated strings

* Document all /comments

* Document /comments/{id}
2020-03-07 09:02:10 +01:00
rhymes
c8c5088fbd
API: Access unpublished listings only if you are the owner (#6458) [deploy]
* Access only unpublished listings if they belong to the user when authenticated

* Make sure we never send unpublished listings in the index

* Update API docs

* oops

* Remove unused preloading as this loads a single item
2020-03-05 11:28:31 +01:00
rhymes
f3e76e7fe5
Improve API docs for articles, add listings to it and fix bugs (#6413) [deploy]
* Fix articles index state param values

* Update Articles API docs

* Fix ClassifiedListing.cost_by_category with invalid category

* Add docs for GET|POST /listings and fix bugs

* Document PUT /api/listings/:id

* Add docs for /listings/category/{category}

* One variable down

* Improve listings update error handling
2020-03-04 15:30:02 +01:00
rhymes
66bc6cf698
Rephrase CORS availability (#6341) 2020-02-27 17:41:16 -05:00
rhymes
a56eb8fab0
Enable CORS on public API endpoints (#6116) [deploy]
* Enable CORS for public API

* Add specs for Articles API

* Mention CORS in the API docs
2020-02-18 10:47:07 -05:00
rhymes
d0bc58b133 API docs updates (#4585)
* Add operationId to all operations

* Add top level tags array

* Add users tag and cleanup /me descriptions

* Add beta to the title

* Update Article Index and Show examples after #4560

* Bump version

* Remove rendundant type object from refs
2019-10-25 10:30:33 -04:00
Nadiya Karachevska
df857d860a Fix API inconsistencies between articles 'index' and 'show' (#4560)
* Fix API inconsistencies between articles 'index' and 'show'

* Update API docs; revert tags from articles index

* Fix specs

* Update specs
2019-10-24 11:56:55 -04:00
rhymes
83291b16c6 Update API docs to add error info and other small fixes (#4459) [ci skip] 2019-10-16 15:08:49 -04:00
Anna Anks Nowak
ee8ae66e47 Add views count for authenticated users articles [#4250] (#4393)
* Add views count for authenticated users articles [#4250]

* Bump API version to 0.5.6 [#4250]
2019-10-15 21:39:17 -04:00
rhymes
e6100dd400 Fix tags format in Article create API (#4075) [ci skip] 2019-09-20 10:14:41 -04:00
rhymes
02b5bb7d78 API: add doc for webhooks index (#4056)
* Remove updated_at and use the same format for dates

* Add API docs for API /webhooks index
2019-09-18 09:48:33 -07:00
rhymes
3a0dc13fc7 Replace "access token" with "API Key" (#3960) [ci skip] 2019-09-06 09:08:39 -04:00
rhymes
2e5a847ab8 API: /api/articles/me defaults to published articles (#3937)
* /api/articles/me defaults to published articles

We want to make it explicit to retrieve unpublished articles, this change defaults `/api/articles/me` to only published articles, also adds `/api/articles/me/published`, `/api/articles/me/unpublished` and `/api/articles/me/all` to make requests more explicit.

* Refactor /me logic into a case switch
2019-09-04 14:02:13 -04:00
rhymes
676cf002bd Webhooks: API fixes and docs (#3901)
* Fix webhook API and add POST /api/webhooks docs

* Document GET /api/webhooks/:id

* Fix DELETE /api/webhooks/{id} and document it

* Add proper 404 specs
2019-09-03 10:41:23 -04:00
rhymes
e9db50b7c9 API docs: Document OAuth2 and /api/articles/me (#3707) 2019-08-12 16:00:12 -04:00
rhymes
35526bef9b API: OpenAPI 3 spec and auto generated docs (#3650) 2019-08-12 11:36:04 -04:00