-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request / Question: JSONRPC2 #4274
Comments
Not that I'm aware of but you can always customize the templates for Dart and pass it via the |
Swagger can certainly describe the outer structure of JSON-RPC (id, method, params fields, etc...) but I think it will be hard to describe the methods themselves since they are described in body objects ("SOAP" style) where swagger is oriented towards path objects ("REST" style). For instance it will be hard to link a method request (which would be a model) to its corresponding method result (another model). |
@cbornet i see what you mean. Basically, if i get this, denormalisation of the structure between REST and RPC is just too different and so reconstruction is just too much work. In other words it is not the right approach. I actually want to have a REST / JSON API and a JSONRPC2 API running at the gateway level I was looking at the GRPC code and the JSONRPC2 code and they are almost identical in many ways. SO i am not thinking that code generating from GRPC to JSONRPC2 should have nothing to do with swagger. I need to find / write a code gen just for this. Let me knwo what you think if you get time. |
Hi @cbornet , perhaps "JSONRPC2 envelope" is a good suggestion to add into OpenAPI v3... Perhaps changes to flexiblize a little bit the params envelop structure, OpenAPI also will create the JSONRPC v3 :-) PS: for general. I think there are no conflict between REST and "JSON RPC envelope", JsonRPC-REST exist, and is like to old SOAP-REST. |
@joeblew99 please join the discussion in the Swagger Spec repo: OAI/OpenAPI-Specification#664 |
this is not a bug, but a question.
Is there currently a way to code gen a JSONRPC2 client from swagger ?
i am interested in the Dart client.
thanks in advance, or if i should ask this somewhere else please let me know.
The text was updated successfully, but these errors were encountered: