-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Describe the advantages of open-rpc over openapi #112
Comments
Hey @gracenoah, Thank you very much for your question. I'm putting together a thoughtful response and will be making a PR with @shanejonas soon. |
Q: There's a perfectly good existing spec for describing JSON based or any other HTTP APIs, so what's the purpose of this project?This project is a fork of openapi. It was modified to accommodate JSON-RPC APIs. JSON-RPC has a few properties that don't fit within openapi.
Q: Why have yet another standard with yet another set of tools to generate code?For the above mentioned reasons, using openapi with JSON-RPC results in generated artifacts that are pretty much useless. They don't accommodate well for these needs. Googling "json rpc openapi" shows many people running into this deficiency. While you could get some things to work, using openapi on anything but path & http based api is fitting a round peg to a square hole. Q: What's the difference between open-rpc and openapi?I think this has been addressed above, but we should add a section that addresses this question specifically. The spec has a sentence that we should use to answer this:
The list of projects that use json-rpc includes a lot of projects that don't have an official openapi spec, which is unfortunate, but I don't see why creating a different standard solves this problem.Hopefully you understand why they dont exist already. It's not that the users of JSON-RPC don't know about openapi. The issue is that all in all, openapi is just not well suited for JSON-RPC. While you could get some things to work, its fitting a round peg to a square hole. @gracenoah Please let me know if you have any other questions, or if you feel there is a way to improve these answers. Thanks again for taking the time to ask, and helping us make it more clear why we are doing this. |
Im gonna leave this up for a little while to have some time to improve it. Later this week Ill make a PR adding it as FAQ. @gracenoah if you are interested in helping out, I'd greatly appreciate the help if you could make this into a PR. |
This all makes a lot of sense! What I was not understanding is that this spec covers only APIs that have a single "endpoint" and all messages are entirely encoded in json payloads. It seems like open-rpc could produce much better specs for the types of projects that have APIs that fit this model. I think the code generators will actually be much, much simpler than the openapi ones! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There's a perfectly good existing spec for describing JSON based or any other HTTP APIs, so what's the purpose of this project? Why have yet another standard with yet another set of tools to generate code? What's the difference between open-rpc and openapi? The FAQ doesn't answer these questions. The list of projects that use json-rpc includes a lot of projects that don't have an official openapi spec, which is unfortunate, but I don't see why creating a different standard solves this problem.
The text was updated successfully, but these errors were encountered: