Skip to content

Commit

Permalink
Added method PATCH examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-r-thorpe committed Feb 14, 2024
1 parent 277ce14 commit 164415b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
4 changes: 3 additions & 1 deletion APIs/ConfigurationAPI.raml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ documentation:
put:
descriptions: 'Put value of a Property'
body:
example: !include ../examples/property-value-put.json
example: !include ../examples/property-value-put-request.json
type: !include schemas/property-value-put-request.json
responses:
200:
Expand Down Expand Up @@ -122,10 +122,12 @@ documentation:
patch:
description: 'Invoke method.'
body:
example: !include ../examples/method-patch-request.json
type: !include schemas/method-patch-request.json
responses:
200:
body:
example: !include ../examples/method-patch-200.json
type: !include schemas/method-patch-response.json
400:
description: 'Returned when the method arguments are invalid. Corresponds to NcMethodStatus code 417.'
Expand Down
4 changes: 4 additions & 0 deletions examples/method-patch-200.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"status": 200,
"value": "user label string"
}
12 changes: 12 additions & 0 deletions examples/method-patch-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"methodId": {
"level": 1,
"index": 1
},
"arguments": {
"id": {
"level": 1,
"index": 6
}
}
}
5 changes: 4 additions & 1 deletion examples/property-value-get-200.json
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{ "value": "this is the property value" }
{
"status": 200,
"value": "this is the property value"
}
File renamed without changes.

0 comments on commit 164415b

Please sign in to comment.