2016-10-04 12:11:58 +08:00
|
|
|
#type: collection
|
2016-09-22 01:22:40 +08:00
|
|
|
get:
|
2016-10-04 13:51:07 +08:00
|
|
|
is: [ searchable: { searchFields: "name, desc, link" }, embeddable: { embedFields: "user,metacode" }, orderable, pageable ]
|
2016-09-22 01:22:40 +08:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
body:
|
|
|
|
application/json:
|
|
|
|
example: !include ../examples/topics.json
|
|
|
|
post:
|
|
|
|
body:
|
|
|
|
application/json:
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
description: name
|
|
|
|
desc:
|
|
|
|
description: description
|
|
|
|
link:
|
2016-10-04 13:51:07 +08:00
|
|
|
description: link to content on the web
|
|
|
|
required: false
|
2016-09-22 01:22:40 +08:00
|
|
|
permission:
|
|
|
|
description: commons, public, or private
|
|
|
|
metacode_id:
|
|
|
|
description: Topic's metacode
|
|
|
|
responses:
|
|
|
|
201:
|
|
|
|
body:
|
|
|
|
application/json:
|
|
|
|
example: !include ../examples/topic.json
|
|
|
|
/{id}:
|
2016-10-04 12:11:58 +08:00
|
|
|
#type: item
|
2016-09-22 01:22:40 +08:00
|
|
|
get:
|
2016-10-04 13:51:07 +08:00
|
|
|
is: [ embeddable: { embedFields: "user,metacode" } ]
|
2016-09-22 01:22:40 +08:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
body:
|
|
|
|
application/json:
|
|
|
|
example: !include ../examples/topic.json
|
|
|
|
put:
|
|
|
|
body:
|
|
|
|
application/json:
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
description: name
|
|
|
|
desc:
|
|
|
|
description: description
|
|
|
|
link:
|
|
|
|
description: (optional) link to content on the web
|
|
|
|
permission:
|
|
|
|
description: commons, public, or private
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
body:
|
|
|
|
application/json:
|
|
|
|
example: !include ../examples/topic.json
|
|
|
|
patch:
|
|
|
|
body:
|
|
|
|
application/json:
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
description: name
|
|
|
|
desc:
|
|
|
|
description: description
|
|
|
|
link:
|
|
|
|
description: (optional) link to content on the web
|
|
|
|
permission:
|
|
|
|
description: commons, public, or private
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
body:
|
|
|
|
application/json:
|
|
|
|
example: !include ../examples/topic.json
|
|
|
|
delete:
|
|
|
|
responses:
|
|
|
|
204:
|
|
|
|
description: No content
|