From e72a6668fc2c7dbfda4e5431bd1b40a181797bb2 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Thu, 3 Jul 2014 18:44:56 +0200 Subject: [PATCH] fix(swagger): correct API docs, fix #3679 --- src/routes/apiv2.coffee | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/routes/apiv2.coffee b/src/routes/apiv2.coffee index 509fc5d89a..01b92ae227 100644 --- a/src/routes/apiv2.coffee +++ b/src/routes/apiv2.coffee @@ -162,7 +162,7 @@ module.exports = (swagger, v2) -> description: "Sell inventory items back to Alexander" parameters: [ #TODO verify these are the correct types - path('type',"The type of object you're selling back.",'string',['eggs','hatchingPotions','food']) + path('type',"The type of object you're selling back.",'string',['gear','eggs','hatchingPotions','food']) path('key',"The object key you're selling back (call /content route for available keys)",'string') ] action: user.sell @@ -172,7 +172,7 @@ module.exports = (swagger, v2) -> method: 'POST' description: "Purchase a gem-purchaseable item from Alexander" parameters:[ - path('type',"The type of object you're purchasing.",'string',['eggs','hatchingPotions','food','quests','special']) + path('type',"The type of object you're purchasing.",'string',['gear','eggs','hatchingPotions','food']) path('key',"The object key you're purchasing (call /content route for available keys)",'string') ] action: user.purchase @@ -191,7 +191,7 @@ module.exports = (swagger, v2) -> "/user/inventory/equip/{type}/{key}": spec: method: 'POST' - description: "Equip an item (either pet, mount, equipped or costume)" + description: "Equip an item (either pets, mounts, or gear)" parameters: [ path 'type',"Type to equip",'string',['pet','mount','equipped', 'costume'] path 'key',"The object key you're equipping (call /content route for available keys)",'string' @@ -372,7 +372,7 @@ module.exports = (swagger, v2) -> "/groups/{gid}:GET": spec: path: '/groups/{gid}' - description: "Get a group. The party the user currently is in can be accessed with the gid 'party'." + description: "Get a group" parameters: [path('gid','Group ID','string')] middleware: [auth.auth, i18n.getUserLanguage] action: groups.get @@ -489,8 +489,11 @@ module.exports = (swagger, v2) -> "/groups/{gid}/chat/{messageId}": spec: method: 'DELETE' - description: 'Delete a group' - parameters: [path('gid','ID of group to delete','string')] + description: 'Delete a chat message in a given group' + parameters: [ + path 'gid', 'ID of the group containing the message to be deleted', 'string' + path 'messageId', 'ID of message to be deleted', 'string' + ] middleware: [auth.auth, i18n.getUserLanguage, groups.attachGroup] action: groups.deleteChatMessage