Skip to content
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

DRAFT: OpenRPC \w DevUI #36

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

indiealexh
Copy link
Contributor

Draft PR to keep track of progress and refinements to adding OpenRPC schema file generation and DevUI tools

Included new dependencies and classes to integrate OpenRPC support within the project. Added configuration options for enabling OpenRPC, and implemented handlers and processors to manage OpenRPC schemas and playground endpoints.
Renamed OpenRPC-related classes and references to OpenRpc to maintain naming consistency across the codebase. Updated class names, method signatures, variable declarations, and affected configurations to align with the new naming convention.
Renamed OpenRPC-related classes and packages for better organization and clarity. Introduced a new Maven module, `open-rpc-schema`, to house the schema-specific code and dependencies.

// OpenRPC UI
String uiPath = nonApplicationRootPathBuildItem.resolvePath(jsonRPCConfig.openRpc.playgroundPath);
PageBuilder<QuteDataPageBuilder> uiPage = Page.quteDataPageBuilder("OpenRPC Playground")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to use a externalPageBuilder and just use the url (https://playground.open-rpc.org/?schemaUrl=http://localhost:8080{schemaUrl})

@@ -0,0 +1 @@
<iframe height="100%" width="100%" src="https://playground.open-rpc.org/?schemaUrl=http://localhost:8080{schemaUrl}"></iframe>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not include the playground (like we do with swagger-ui) so that everthing runs local ?

@@ -41,6 +41,288 @@ ifndef::add-copy-button-to-env-var[]
Environment variable: `+++QUARKUS_JSON_RPC_WEB_SOCKET_PATH+++`
endif::add-copy-button-to-env-var[]
--|string
|`/quarkus/json-rpc`
|`quarkus/json-rpc`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be generated. You can remove it here

@phillip-kruger
Copy link
Member

We also need to decide and stick to either jsonRPC or jsonRpc for class names.

@indiealexh
Copy link
Contributor Author

We also need to decide and stick to either jsonRPC or jsonRpc for class names.

Good point. I see an argument for either, my preference is for jsonRpc & openRpc since there is a clearer visual divide between the next word in a name, e.g. OpenRpcConfig vs OpenRPCConfig

@phillip-kruger
Copy link
Member

Cool, I am happy with either, as long as we are consistent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants