Does describing JSON RPC 2.0 API by Swagger is possible?

4,005 views
Skip to first unread message

svyatosla...@gmail.com

unread,
Apr 19, 2016, 5:32:28 AM4/19/16
to Swagger
I really want to use swagger to describe my API, but it was designed according JSON RPC 2.0 specification because of high flexibility and simplicity in design. And as I could notice it is not possible to use swagger to describe JSON RPC API. May be am I wrong? Does somebody know other tool to describing RPC API?

tony tam

unread,
Apr 19, 2016, 1:15:48 PM4/19/16
to swagger-sw...@googlegroups.com
It kind of depends on what features you’re using from the RPC API.  You’ll have to share more info if you want a response

On Apr 19, 2016, at 2:32 AM, svyatosla...@gmail.com wrote:

I really want to use swagger to describe my API, but it was designed according JSON RPC 2.0 specification because of high flexibility and simplicity in design. And as I could notice it is not possible to use swagger to describe JSON RPC API. May be am I wrong? Does somebody know other tool to describing RPC API?

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

svyatosla...@gmail.com

unread,
Apr 20, 2016, 6:18:09 AM4/20/16
to Swagger
My API has one resource to all methods, like http://myservice.com/rpcapi, and all methods are called by HTTP POST, where API method's name stated in parameter of JSON structure in Body. 

For example:


{
  "jsonrpc""2.0",
  "id""number",
  "method""delete.call_records",
  "params": {
    "access_token""string",
    "id""number",
    "customer_id""number"
  }
}

And in this way designed all others methods. 



On Apr 19, 2016, at 20:15:48 UTC+3 tony tam wrote:
It kind of depends on what features you’re using from the RPC API.  You’ll have to share more info if you want a response
On Apr 19, 2016, at 2:32 AM, svyatosla...@gmail.com wrote:

I really want to use swagger to describe my API, but it was designed according JSON RPC 2.0 specification because of high flexibility and simplicity in design. And as I could notice it is not possible to use swagger to describe JSON RPC API. May be am I wrong? Does somebody know other tool to describing RPC API?

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

Ron Ratovsky

unread,
Apr 20, 2016, 6:31:03 AM4/20/16
to swagger-sw...@googlegroups.com
The current spec does not support describing such operations, and even with the planned changes to 3.0 I don’t see it being supported.

What you’re describing is not a REST API – it’s a single endpoint serving the operations. It doesn’t rely on the HTTP protocol in any way.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.

svyatosla...@gmail.com

unread,
Apr 20, 2016, 7:10:02 AM4/20/16
to Swagger
The current spec does not support describing such operations, and even with the planned changes to 3.0 I don’t see it being supported.

Yes, it does not. That's why I wrote this question.

What you’re describing is not a REST API – it’s a single endpoint serving the operations. It doesn’t rely on the HTTP protocol in any way.

Yes, it is not, but JSON RPC is somewhat popular approach in API design and I believed that since Swagger is Open API Initiative now, swagger should cover not only REST ideology in API design. It is up to you of course, just I am little upset about it.

Jacob Gadikian

unread,
Sep 4, 2016, 8:06:09 PM9/4/16
to Swagger
Okay, so:


It is a JSON RPC API.  Is there any way for me to do swagger for this API, or is that a "not so much"?

Thank you!

Jacob Gadikian

unread,
Sep 4, 2016, 8:06:12 PM9/4/16
to Swagger
Okay, so:


It is a JSON RPC API.  Is there any way for me to do swagger for this API, or is that a "not so much"?

Thank you!

On Tuesday, April 19, 2016 at 4:32:28 PM UTC+7, svyatosla...@gmail.com wrote:

Ron Ratovsky

unread,
Sep 20, 2016, 7:29:11 PM9/20/16
to swagger-sw...@googlegroups.com

Without reading what steem specifically does, when it comes to JSON RPC the answer will normally be “not so much”.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Jacob Gadikian <fad...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Sunday, 4 September 2016 at 17:06
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Re: Does describing JSON RPC 2.0 API by Swagger is possible?

 

Okay, so:

--

Jacob Gadikian

unread,
Sep 20, 2016, 7:31:38 PM9/20/16
to swagger-sw...@googlegroups.com
I later got a clearer answer.... and indeed, it's not possible.

Thanks for your help though :)!



Jacob Gadikian
E-mail: fad...@gmail.com
SKYPE: faddat
Phone/SMS: +84 167 789 6421


To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/Qix82xdWG4w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages