Skip to content

How to define a notification ? #230

@rmedaer

Description

@rmedaer

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:

  1. it's a request: request ? (result is required)
  2. it's a notification: notification?
  3. it's either a request nor a notification: any?, both?, either? (result is required)

For instance:

{
  (...)
  "methods": [
    {
      "name": "do_something",
      "type": "request",
      "result": (...),
    }
  ]
}

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions