Improved API documentation for hall #8087 (#8536)

* Improved API documentation for hall

* Fixes typos, removes apiHeader definitions and curl example

* Fixes @apiParam and capitalization errors. Moves @apiDefines to website/server/api-doc.js
This commit is contained in:
Atte Kortesmaa
2017-06-06 21:48:11 +03:00
committed by Sabe Jones
parent f6f99ec57e
commit f27706cb4b
2 changed files with 156 additions and 16 deletions

View File

@@ -13,3 +13,59 @@
/**
* @apiDefine Query Query Parameters
*/
/**
* @apiDefine Admin Moderators
* Contributors of tier 8 or higher can use this route.
*/
/**
* @apiDefine NoAuthHeaders Missing authentication headers
*
* @apiError (401) {NotAuthorized} NoAuthHeaders Missing authentication headers
*
* @apiErrorExample Missing authentication headers
* {
* "success": false,
* "error": "NotAuthorized",
* "message": "Missing authentication headers."
* }
*/
/**
* @apiDefine NoAccount There is no account that uses those credentials.
*
* @apiError (401) {NotAuthorized} NoAccount There is no account that uses those credentials
*
* @apiErrorExample No account
* {
* "success": false,
* "error": "NotAuthorized",
* "message": "There is no account that uses those credentials."
* }
*/
/**
* @apiDefine NotAdmin You don't have admin access.
*
* @apiError (401) {NotAuthorized} NotAdmin User is not an admin
*
* @apiErrorExample No admin access
* {
* "success": false,
* "error": "NotAuthorized",
* "message": "You don't have admin access."
* }
*/
/**
* @apiDefine NoUser No user
* @apiError (404) {NotFound} NoUser The specified user could not be found.
*
* @apiErrorExample No user
* {
* "success": false,
* "error": "NotFound",
* "message": "User with id \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\" not found."
* }
*/