According to JSON RPC 2.0, 4.1 Notification, a Request is a notification if no id member is given. It means that:
the Client's lack of interest in the corresponding Response object
In the current OpenRPC spec, we can't define if it's a notification or "normal" request ?
Furthermore result (in Method Object) is a required field. However in case of a notification there is no result at all.
Here is a proposal:
Add a new field (type ?) in Method Object which clearly defines if:
- it's a request:
request ? (result is required)
- it's a notification:
notification?
- it's either a request nor a notification:
any?, both?, either? (result is required)
For instance:
{
(...)
"methods": [
{
"name": "do_something",
"type": "request",
"result": (...),
}
]
}
According to JSON RPC 2.0, 4.1 Notification, a Request is a notification if no
idmember is given. It means that:In the current OpenRPC spec, we can't define if it's a
notificationor "normal"request?Furthermore
result(in Method Object) is a required field. However in case of anotificationthere is no result at all.Here is a proposal:
Add a new field (
type?) in Method Object which clearly defines if:request? (resultis required)notification?any?,both?,either? (resultis required)For instance: