Specification tool for JSON RPC 2.0

1,153 views
Skip to first unread message

svyatosla...@gmail.com

unread,
May 24, 2016, 9:40:41 AM5/24/16
to JSON-RPC
Hi there.
I have to choose some tool to describe my API designed according to JSON RPC 2.0. But my dreams are broken by real world where RESTfull approach sets the rules.
Could you give me advice, what is the best tool to describing JSON RPC API for public documentation?

Mo

unread,
May 25, 2016, 12:01:14 PM5/25/16
to JSON-RPC
Perhaps this would be of assitance:

http://json-schema.org/

http://jsonschema.net/


Granted, given the standard JSON-RPC fields would be redundantly replicated in each json-rpc api schema.

Perhaps someone could build a 'template' json-rpc schema or a json-rpc 'meta' schema to centralize the redundant fields.

  -Mo

Matt (MPCM)

unread,
Jun 2, 2016, 10:12:31 AM6/2/16
to JSON-RPC
To add to what Mo posted... the thing you are looking for is often called Service Mapping Description, or at least that would feed into something that generated the docs.

Tooling around this doesn't get enough attention (my present-but-hind-sighted view), and is probably one of the things that has held back json-rpc compared to other specifications.

But it is easy enough to use json-schema to describe it, in much the same way RAML also uses json-schema.

No idea how widely used dojo is these days, but...
http://dojotoolkit.org/reference-guide/1.8/dojox/rpc/smd.html <- Service Mapping Description Proposal

Matt (MPCM)

unread,
Jun 2, 2016, 10:17:54 AM6/2/16
to JSON-RPC
... and while not fully related, noticed this today: http://apeye.org/ vis the nutshell.com site.

Matt (MPCM)

unread,
Jun 2, 2016, 10:20:21 AM6/2/16
to JSON-RPC
and one last link: http://zendframework.github.io/zend-json-server/smd/

There may be a little dated. But conceptually... this doesn't really change much.

Noj Vek

unread,
Jul 14, 2016, 6:17:05 PM7/14/16
to JSON-RPC
Just some inspiration:

Chromium/Node uses protocol.json files to describe their protocol. Interesting their schema is jsonrpc 2.0 except it doesn't send the versions for every method.


Selfish plug:

I am working on tools to auto generate client/server typescript interfaces this kind of protocol.json


Project is still in the works.
Reply all
Reply to author
Forward
0 new messages