-
Notifications
You must be signed in to change notification settings - Fork 27
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
Reusable client / server libraries for Pinning Service API #43
Comments
It would make sense to me to have a reusable go package that implement the server side http request handling, errors and all that, and pass the queries to a go interface. Everyone would be free to plug there their own implementation with the guarantee to not deviate from the spec. |
... or a |
We have wip client in ipfs/go-pinning-service-http-client#3. It is a thin wrapper on top of code generated by https://openapi-generator.tech/ that makes it easier to ensure golang API remains stable, even if generated code changes in the future, so it makes sense to maintain it. @MichaelMure I am unsure how useful reusable server library would be, because the reusable part would be generated from OpenAPI spec (this ensures server conforms to the wire format), and everything on top of it sounds like vendor-specific things that would not be part of library anyway. Perhaps you could give https://openapi-generator.tech/ a try and see if generated server provides what you need? If not, what vendor-agnostic features could be included to make it worth it to have a server lib? (We'd like to avoid maintaining a library if its only a generated code) |
We have generated a Javascript/Typescript client using the OpenAPI typescript-axios generator at Geo-Web-Project/js-pinning-service-http-client. We have been using it in a simple app in the browser to add and list pins. It has been working well for us so figured I would share it here. |
I'm not sure there is much value in such library, at least on JS side of things given how opinionated community is around server library choice etc... I think it would be far more useful to:
|
|
Let's discuss if it would be useful to have reusable libraries.
AFAIK go-ipfs and js-ipfs plan to implement clients for Pinning Service API.
It is very likely that some of pinning services will use golang or JS for the server side too.
Q:
cc @ipfs/wg-pinning-services @obo20 @GregTheGreek @priom @jsign @sanderpick @andrewxhill @MichaelMure @aschmahmann @achingbrain @Gozala @jacobheun
The text was updated successfully, but these errors were encountered: