Add rpc.describe RPC method: JSON Schema Service Descriptor #412
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It is the first change related to JSON-RPC Service Descriptor and enhancement of Web Browsable API. The aim of these changes is to create Metadata of the RPC method to be used by Web Browsable API. The idea here is open the space to use
typing.Annotated
[1] in parameters (and returns) and reflecting that in Web Browsable API, such as:The service descriptor was based on JSON Schema Service Descriptor from JSON-RPC Spec[2], some changes were made to be more seems like OpenRPC Spec[3], and others will do to adapt to the use case of Web Browsable API.
Note: The RPC method
system.describe
was removed (replaced byrcp.describe
).Resolves: #409
See also: #376
[1] - https://docs.python.org/3/library/typing.html#typing.Annotated
[2] - https://www.jsonrpc.org/historical/json-schema-service-descriptor.html
[3] - https://spec.open-rpc.org/