8a95262f2c
* make map methods use ActiveRecord relations so they don't error on pundit * test for logged out maps GET api * open up GET routes on maps/topics/synapses and update api docs
91 lines
2.6 KiB
Text
91 lines
2.6 KiB
Text
#type: collection
|
|
get:
|
|
is: [ searchable: { searchFields: "name, desc, link" }, embeddable: { embedFields: "user,metacode" }, orderable, pageable ]
|
|
securedBy: [ null, cookie, token, oauth_2_0 ]
|
|
responses:
|
|
200:
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/topics.json
|
|
post:
|
|
body:
|
|
application/json:
|
|
properties:
|
|
name:
|
|
description: Topic name; this will be visible on the map
|
|
desc:
|
|
description: Longer topic description visible when opening a map card
|
|
link:
|
|
description: embed a link to content on the web in the topic card
|
|
required: false
|
|
permission:
|
|
description: commons, public, or private
|
|
metacode_id:
|
|
description: Topic's metacode
|
|
responses:
|
|
201:
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/topic.json
|
|
/{id}:
|
|
#type: item
|
|
get:
|
|
is: [ embeddable: { embedFields: "user,metacode" } ]
|
|
securedBy: [ null, cookie, token, oauth_2_0 ]
|
|
responses:
|
|
200:
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/topic.json
|
|
put:
|
|
body:
|
|
application/json:
|
|
properties:
|
|
name:
|
|
description: Topic name; this will be visible on the map
|
|
required: false
|
|
desc:
|
|
description: Longer topic description visible when opening a map card
|
|
required: false
|
|
link:
|
|
description: embed a link to content on the web in the topic card
|
|
required: false
|
|
permission:
|
|
description: commons, public, or private
|
|
required: false
|
|
metacode_id:
|
|
description: Topic's metacode
|
|
required: false
|
|
responses:
|
|
200:
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/topic.json
|
|
patch:
|
|
body:
|
|
application/json:
|
|
properties:
|
|
name:
|
|
description: Topic name; this will be visible on the map
|
|
required: false
|
|
desc:
|
|
description: Longer topic description visible when opening a map card
|
|
required: false
|
|
link:
|
|
description: embed a link to content on the web in the topic card
|
|
required: false
|
|
permission:
|
|
description: commons, public, or private
|
|
required: false
|
|
metacode_id:
|
|
description: Topic's metacode
|
|
required: false
|
|
responses:
|
|
200:
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/topic.json
|
|
delete:
|
|
responses:
|
|
204:
|
|
description: No content
|