quarkiverse / quarkus-json-rpc

JsonRPC over WebSocket services with Quarkus
https://docs.quarkiverse.io/quarkus-json-rpc/dev/
Apache License 2.0
2 stars 4 forks source link

OpenRPC Scanner #23

Open indiealexh opened 3 months ago

indiealexh commented 3 months ago

RPC Endpoints generating an OpenRPC spec and documentation (Similar to OpenAPI + SwaggerUI) would be a great addition to this.

Would this be something I contribute to this project? Or look at creating another? Where is the best place to collaborate if that is needed outside of GitHub?

Relevant Links

https://playground.open-rpc.org/ https://open-rpc.org/ https://github.com/open-rpc

phillip-kruger commented 3 months ago

Awesome ! Please contribute it here !

indiealexh commented 3 months ago

Would appreciate feedback on the project structure to add in the OpenRPC Scanner

https://github.com/indiealexh/quarkus-json-rpc/tree/feature/open-rpc-devui

edit: Adjusted format based on @phillip-kruger advice

phillip-kruger commented 3 months ago

Hi @indiealexh . You don't have to create another deployment and runtime, just add it to the existing one. We can do what quarkus-smallrye-graphql extension has done. There is also a graphiql ui that is always included in dev mode, and might be included in prod mode if a config is set to true. You can look at how that is done.

indiealexh commented 3 months ago

Hi @indiealexh . You don't have to create another deployment and runtime, just add it to the existing one. We can do what quarkus-smallrye-graphql extension has done. There is also a graphiql ui that is always included in dev mode, and might be included in prod mode if a config is set to true. You can look at how that is done.

Thanks, I'll take a look!

indiealexh commented 3 months ago

Making progress on this but taking longer than I was hoping due to having to create the Java OpenRPC library myself.

Hoping to have a working version of OpenRPC generator and DevUI by next week.

phillip-kruger commented 3 months ago

Awesome !

indiealexh commented 2 months ago

Got a working demo of generating the schema file and embedding the playground in the Dev UI with an iframe. Unfortunately, the OpenRPC Playground app appears to be unmaintained despite the project itself remaining active so might need to find or build an alternative, but as a POC it works for now.

Last step is to build the annotation scanner that creates the schema objects, but the structure of the schema is there.

image