-
Notifications
You must be signed in to change notification settings - Fork 17
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
Custom protocol support #587
Custom protocol support #587
Comments
@BelfordZ should weigh in here. It seems like you might want something like
Then makeCustomParseOpenRPCDocument and the parseOpenRPCDocument can share the same logic. Where parseOpenRPCDocument looks like it does now essentially except instead of returning the function it returns a call to makeBaseParseOpenRPCDocument with the appropriate handler.
Then signature for makeParseOpenRPCDocument remains the same, but you have a way to access lower level functionality. |
@zcstarr, thank you! This API covers my needs completely. How do you think if I can start its implementation? |
@raman-kananovich you might actually do this as a stop gap , while we think over if the api change belongs inside schema-utils or not. You can start with the custom protocol and just deref the document then pass the dereffed document into to parseOpenRPCDocument. We think https://github.com/json-schema-tools/reference-resolver and Inside the reference-resolver you'll need a PR here for your protocol would be immensely useful. Regardless about the api change, you'll need this logic in order to handle the custom protocol dereferencing. I'd start there. |
@zcstarr, thank you! As you have proposed I am starting from reference-resolver. |
Hello @zcstarr, could you please help me with the question regarding signing CLA? Can you provide a link to the instruction on how to do it. I have tried to google this topic, but the answers are different. |
@raman-kananovich don't worry about it, there is no CLA, that portion of the contributing.md is stale. |
@zcstarr, thank you! |
I have created a pull request to reference-reolver. I hope that I have done it in the right way. @zcstarr, could you please take a look at my PR json-schema-tools/reference-resolver#146 ? |
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. |
This feature exposes two separate entry points for creating a resolver, one using the makeCustomResolver() option and another for advanced users that want more or need more control over the resolution process, which allows users to extend the resolver class if needed. fixes #587
This feature exposes two separate entry points for creating a resolver, one using the makeCustomResolver() option and another for advanced users that want more or need more control over the resolution process, which allows users to extend the resolver class if needed. fixes #587
🎉 This issue has been resolved in version 1.16.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I want to use this library to work via a custom protocol that is based on a pub/sub mechanism.
It would be great to expose new versions of the
parseOpenRPCDocument
which accepts custom URI getters/resolvers.Proposed functionality usage example
const parseOpenRPCDocument = makeCustomProtocolParseOpenRPCDocument(fetchCustomProtocol, resolveReferenceCustomProtocol);
Could you please provide your opinion regarding my proposal?
If it looks OK for you I can implement it and create a pull request.
The text was updated successfully, but these errors were encountered: