PUT and PATCH parameters are optional

This commit is contained in:
Devin Howard 2016-10-04 15:30:06 +08:00
parent 2466a0912f
commit 8ac8aad105
5 changed files with 81 additions and 17 deletions

View file

@ -17,9 +17,11 @@ post:
map_id: map_id:
description: id of the map description: id of the map
xloc: xloc:
description: (for Topic mappings only) x location on the canvas description: (only for Topic mappings) x location on the canvas
required: false
yloc: yloc:
description: (for Topic mappings only) y location on the canvas description: (only for Topic mappings) y location on the canvas
required: false
responses: responses:
201: 201:
body: body:
@ -40,10 +42,20 @@ post:
properties: properties:
mappable_id: mappable_id:
description: id of the topic/synapse to be mapped description: id of the topic/synapse to be mapped
required: false
mappable_type: mappable_type:
description: Topic or Synapse description: Topic or Synapse
required: false
map_id: map_id:
description: id of the map description: id of the map
required: false
xloc:
description: (only for Topic mappings) x location on the canvas
required: false
yloc:
description: (only for Topic mappings) y location on the canvas
required: false
responses: responses:
200: 200:
body: body:
@ -55,10 +67,19 @@ post:
properties: properties:
mappable_id: mappable_id:
description: id of the topic/synapse to be mapped description: id of the topic/synapse to be mapped
required: false
mappable_type: mappable_type:
description: Topic or Synapse description: Topic or Synapse
required: false
map_id: map_id:
description: id of the map description: id of the map
required: false
xloc:
description: (only for Topic mappings) x location on the canvas
required: false
yloc:
description: (only for Topic mappings) y location on the canvas
required: false
responses: responses:
200: 200:
body: body:

View file

@ -42,16 +42,22 @@ post:
properties: properties:
name: name:
description: name description: name
required: false
desc: desc:
description: description description: description
required: false
permission: permission:
description: commons, public, or private description: commons, public, or private
required: false
screenshot: screenshot:
description: url to a screenshot of the map description: url to a screenshot of the map
required: false
contributor_ids: contributor_ids:
description: the topic being linked from description: the topic being linked from
required: false
collaborator_ids: collaborator_ids:
description: the topic being linked to description: the topic being linked to
required: false
responses: responses:
200: 200:
body: body:
@ -63,16 +69,22 @@ post:
properties: properties:
name: name:
description: name description: name
required: false
desc: desc:
description: description description: description
required: false
permission: permission:
description: commons, public, or private description: commons, public, or private
required: false
screenshot: screenshot:
description: url to a screenshot of the map description: url to a screenshot of the map
required: false
contributor_ids: contributor_ids:
description: the topic being linked from description: the topic being linked from
required: false
collaborator_ids: collaborator_ids:
description: the topic being linked to description: the topic being linked to
required: false
responses: responses:
200: 200:
body: body:

View file

@ -11,9 +11,11 @@ post:
application/json: application/json:
properties: properties:
desc: desc:
description: name description: text description of this synapse
required: false
category: category:
description: from to or both description: |
<code>from-to</code> or <code>both</code>
permission: permission:
description: commons, public, or private description: commons, public, or private
topic1_id: topic1_id:
@ -41,17 +43,24 @@ post:
application/json: application/json:
properties: properties:
desc: desc:
description: name description: text description of this synapse
required: false
category: category:
description: from-to or both description: |
<code>from-to</code> or <code>both</code>
required: false
permission: permission:
description: commons, public, or private description: commons, public, or private
required: false
topic1_id: topic1_id:
description: the topic being linked from description: the topic being linked from
required: false
topic2_id: topic2_id:
description: the topic being linked to description: the topic being linked to
required: false
user_id: user_id:
description: the creator of the topic description: the creator of the topic
required: false
responses: responses:
200: 200:
body: body:
@ -62,17 +71,24 @@ post:
application/json: application/json:
properties: properties:
desc: desc:
description: name description: text description of this synapse
required: false
category: category:
description: from-to or both description: |
<code>from-to</code> or <code>both</code>
required: false
permission: permission:
description: commons, public, or private description: commons, public, or private
required: false
topic1_id: topic1_id:
description: the topic being linked from description: the topic being linked from
required: false
topic2_id: topic2_id:
description: the topic being linked to description: the topic being linked to
required: false
user_id: user_id:
description: the creator of the topic description: the creator of the topic
required: false
responses: responses:
200: 200:
body: body:

View file

@ -5,6 +5,7 @@ post:
properties: properties:
description: description:
description: short string describing this token description: short string describing this token
required: false
responses: responses:
201: 201:
body: body:

View file

@ -11,11 +11,11 @@ post:
application/json: application/json:
properties: properties:
name: name:
description: name description: Topic name; this will be visible on the map
desc: desc:
description: description description: Longer topic description visible when opening a map card
link: link:
description: link to content on the web description: embed a link to content on the web in the topic card
required: false required: false
permission: permission:
description: commons, public, or private description: commons, public, or private
@ -40,13 +40,20 @@ post:
application/json: application/json:
properties: properties:
name: name:
description: name description: Topic name; this will be visible on the map
required: false
desc: desc:
description: description description: Longer topic description visible when opening a map card
required: false
link: link:
description: (optional) link to content on the web description: embed a link to content on the web in the topic card
required: false
permission: permission:
description: commons, public, or private description: commons, public, or private
required: false
metacode_id:
description: Topic's metacode
required: false
responses: responses:
200: 200:
body: body:
@ -57,13 +64,20 @@ post:
application/json: application/json:
properties: properties:
name: name:
description: name description: Topic name; this will be visible on the map
required: false
desc: desc:
description: description description: Longer topic description visible when opening a map card
required: false
link: link:
description: (optional) link to content on the web description: embed a link to content on the web in the topic card
required: false
permission: permission:
description: commons, public, or private description: commons, public, or private
required: false
metacode_id:
description: Topic's metacode
required: false
responses: responses:
200: 200:
body: body: