mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
apiDoc: meta (#8167)
* apiDoc: meta * Update modelsPaths.js * Update error * fix test * Update GET-model_paths.test.js * Fixed test
This commit is contained in:
@@ -11,9 +11,24 @@ let allModels = ['user', 'tag', 'challenge', 'group'].concat(tasksModels);
|
||||
* @apiName GetUserModelPaths
|
||||
* @apiGroup Meta
|
||||
*
|
||||
* @apiParam {String="user","group","challenge","tag","habit","daily","todo","reward"} model The name of the model
|
||||
* @apiParam (Path) {String="user","group","challenge","tag","habit","daily","todo","reward"} model The name of the model
|
||||
*
|
||||
* @apiExample {curl} Tag
|
||||
* curl https://habitica.com/api/v3/models/tag/paths
|
||||
*
|
||||
* @apiSuccess {Object} data A key-value object made of fieldPath: fieldType (like {'field.nested': Boolean})
|
||||
*
|
||||
* @apiSuccessExample {json} Tag
|
||||
* {
|
||||
* "success":true,
|
||||
* "data": {
|
||||
* "id":"String",
|
||||
* "name":"String",
|
||||
* "challenge":"String"
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* @apiError (400) {badRequest} modelNotFound The model specified was not found
|
||||
*/
|
||||
api.getModelPaths = {
|
||||
method: 'GET',
|
||||
|
||||
Reference in New Issue
Block a user