rpc: Be clearer about updates content

You can't parse an update without knowing the request method (this was
already stated elsewhere).

Prompted by
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1078#note_2889613
This commit is contained in:
Ian Jackson 2023-04-03 17:51:36 +01:00
parent 250bb1aac6
commit 374f76e1df
1 changed files with 3 additions and 2 deletions

View File

@ -155,7 +155,8 @@ some are only suitable for one kind of Object.
When we define a method,
we state its name,
and the names and types of the parameters `params`.
and the expected contents of the successful `result`.
and the expected contents of the successful `result`,
and any `updates`s.
Unrecognized parameters must be ignored.
Indeed, any unrecognized fields in a JSON object must be ignored,
@ -260,7 +261,7 @@ id
that has not received a final response.
update
: A JSON object whose type depends on the request method.
: A JSON object whose contents depends on the request method.
It is required on an update.
result