mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
Fix api documentation
correctly display swagger-ui and change old api documentation
This commit is contained in:
parent
3a29ae437c
commit
c6d24853f0
2 changed files with 9 additions and 7 deletions
|
|
@ -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',['gear','eggs','hatchingPotions','food'])
|
||||
path('type',"The type of object you're selling back.",'string',['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',['gear','eggs','hatchingPotions','food'])
|
||||
path('type',"The type of object you're purchasing.",'string',['eggs','hatchingPotions','food','quests','special'])
|
||||
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 pets, mounts, or gear)"
|
||||
description: "Equip an item (either pet, mount, equipped or costume)"
|
||||
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"
|
||||
description: "Get a group. The party the user currently is in can be accessed with the gid 'party'."
|
||||
parameters: [path('gid','Group ID','string')]
|
||||
middleware: [auth.auth, i18n.getUserLanguage]
|
||||
action: groups.get
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@ html
|
|||
head
|
||||
title Swagger UI
|
||||
link(href='//fonts.googleapis.com/css?family=Droid+Sans:400,700', rel='stylesheet', type='text/css')
|
||||
link(href='/bower_components/swagger-ui/dist/css/highlight.default.css', media='screen', rel='stylesheet', type='text/css')
|
||||
link(href='/bower_components/swagger-ui/dist/css/reset.css', media='screen', rel='stylesheet', type='text/css')
|
||||
link(href='/bower_components/swagger-ui/dist/css/screen.css', media='screen', rel='stylesheet', type='text/css')
|
||||
link(href='/bower_components/bootstrap/dist/css/bootstrap.min.css', media='screen', rel='stylesheet', type='text/css')
|
||||
link(href='/bower_components/swagger-ui/dist/css/reset.css', media='print', rel='stylesheet', type='text/css')
|
||||
link(href='/bower_components/swagger-ui/dist/css/screen.css', media='print', rel='stylesheet', type='text/css')
|
||||
|
||||
script(src='/bower_components/swagger-ui/dist/lib/shred.bundle.js', type='text/javascript')
|
||||
script(src='/bower_components/swagger-ui/dist/lib/jquery-1.8.0.min.js', type='text/javascript')
|
||||
script(src='/bower_components/swagger-ui/dist/lib/jquery.slideto.min.js', type='text/javascript')
|
||||
|
|
@ -58,7 +60,7 @@ html
|
|||
})
|
||||
window.swaggerUi.load();
|
||||
});
|
||||
body
|
||||
body.swagger-section
|
||||
#header
|
||||
.swagger-ui-wrap
|
||||
a#logo(href='http://swagger.wordnik.com') HabitRPG API Documentation
|
||||
|
|
|
|||
Loading…
Reference in a new issue