-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
Spec-improvementUsing idioms, standard prose, Web IDL, alignment with other specsUsing idioms, standard prose, Web IDL, alignment with other specscandidate-release-september-25priority: highIssues that will be tackled in 2024Issues that will be tackled in 2024
Description
Current TD specification introduced the concept of additionalResponses
to model APIs that might return different payloads from the same affordance. The field is used also to model both successful responses and error responses. For example, the Thing Description of a Thing Description Directory contains the following:
"actions": {
"createThing": {
"description": "Create a Thing Description",
"uriVariables": {
"id": {
"@type": "ThingID",
"title": "Thing Description ID",
"type": "string",
"format": "iri-reference"
}
},
"input": {
"description": "The schema is implied by the content type",
"type": "object"
},
"forms": [
{
"href": "/things/{id}",
"htv:methodName": "PUT",
"contentType": "application/td+json",
"response": {
"description": "Success response",
"htv:statusCodeValue": 201
},
"additionalResponses": [
{
"description": "Invalid serialization or TD",
"contentType": "application/problem+json",
"htv:statusCodeValue": 400
}
]
}
]
},
Metadata
Metadata
Assignees
Labels
Spec-improvementUsing idioms, standard prose, Web IDL, alignment with other specsUsing idioms, standard prose, Web IDL, alignment with other specscandidate-release-september-25priority: highIssues that will be tackled in 2024Issues that will be tackled in 2024