Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename actions to match properties and events #160

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 22 additions & 15 deletions directory.td.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,20 @@
"security": "combo_sc",
"base": "https://tdd.example.com",
"actions": {
"createTD": {
"createThing": {
"@type": "CreateThingAction",
"description": "Create a Thing Description",
"uriVariables": {
"id": {
"@type": "ThingID",
"title": "Thing Description ID",
"type": "string",
"format": "iri-reference"
}
},
"forms": [
{
"href": "/td/{id}",
"href": "/things/{id}",
"htv:methodName": "PUT",
"contentType": "application/td+json",
"response": {
Expand All @@ -81,16 +83,15 @@
"scopes": "write"
},
{
"href": "/td",
"href": "/things",
"htv:methodName": "POST",
"contentType": "application/td+json",
"response": {
"description": "Success response",
"htv:headers": [
{
"description": "System-generated UUID (version 4) URN",
"htv:fieldName": "Location",
"htv:fieldValue": ""
"description": "System-generated URI",
"htv:fieldName": "Location"
}
],
"htv:statusCodeValue": 201
Expand All @@ -106,18 +107,20 @@
}
]
},
"updateTD": {
"updateThing": {
benfrancis marked this conversation as resolved.
Show resolved Hide resolved
"@type": "UpdateThingAction",
"description": "Update a Thing Description",
"uriVariables": {
"id": {
"@type": "ThingID",
"title": "Thing Description ID",
"type": "string",
"format": "iri-reference"
}
},
"forms": [
{
"href": "/td/{id}",
"href": "/things/{id}",
"htv:methodName": "PUT",
"contentType": "application/td+json",
"response": {
Expand All @@ -132,21 +135,23 @@
}
],
"scopes": "write"
}
},
]
},
"updatePartialTD": {
"description": "Update parts of a Thing Description",
"partialUpdateThing": {
"@type": "PartialUpdateThingAction",
"description": "Update a Thing Description",
"uriVariables": {
"id": {
"@type": "ThingID",
"title": "Thing Description ID",
"type": "string",
"format": "iri-reference"
}
},
"forms": [
{
"href": "/td/{id}",
"href": "/things/{id}",
"htv:methodName": "PATCH",
"contentType": "application/merge-patch+json",
"response": {
Expand All @@ -169,18 +174,20 @@
}
]
},
"deleteTD": {
"deleteThing": {
benfrancis marked this conversation as resolved.
Show resolved Hide resolved
"@type": "DeleteThingAction",
"description": "Delete a Thing Description",
"uriVariables": {
"id": {
"@type": "ThingID",
"title": "Thing Description ID",
"type": "string",
"format": "iri-reference"
}
},
"forms": [
{
"href": "/td/{id}",
"href": "/things/{id}",
"htv:methodName": "DELETE",
"response": {
"description": "Success response",
Expand Down Expand Up @@ -428,4 +435,4 @@
]
}
}
}
}