-
Notifications
You must be signed in to change notification settings - Fork 33
http-api-docs vs. ipfs/specs. vs. interface-js-ipfs-core #3
Comments
Apparently https://github.com/ipfs/http-api-spec should not be trusted anymore as it is clearly way out of date |
I feel like we can empty that repo. We should also somehow remove the apiary site: http://docs.ipfs.apiary.io -- likely need a login? This is a tool for generating API docs from go-ipfs's |
Or maybe not empty it, but rename it to apiary-experiment or so. |
@lgierth do you still think this belongs in Relatedly, do you know what builds the existing commands docs (if anything)? They claim to be generated, but then they were hand edited later. It seems clear that both could use some serious improvement, so I’m trying to figure out the right technical way forward so I we know how/where to make content changes. |
Or a third option: |
ipfs/go-ipfs-cmds is just a library code, commands are still defined in go-ipfs |
Ah, ok. I had thought Also, is there a relatively easy/quick path to fixing the code here and/or moving it into either I think it’s also an open question as to whether automatic doc generation for this is the right path; at least one person I talked with had lots of trouble getting much useful out of them and, when shown the docs at interface-ipfs-core, were blown away by how much more helpful they were, even if they don’t specifically cover how they translate into HTTP requests. |
interface-ipfs-coreWow. Just like - wow. Why isn't this plastered everywhere across the internet? And its mocha-based! I was feeling a bit depressed, but this just made my day. It seems though, for example that some parts of the key spec are implemented in node.js but not in go... I thought go was feature complete and node was lagging behind - but I will actually be only developing in the node environment, so whatever... Just, does this influence the docs in any way? |
The more I look at this, the more inclined I am to say these docs should actually be manual (we might use these generated docs as a seed to start from, though). Some of the HTTP APIs are pretty straightforward, but other ones are significantly more complex than their command-line variants. The simple cURL example for adding a file, for example, is not nearly clear enough — it really needs to describe the expected headers for each part of the multipart parts; who’s going to know to look at this JS code or this Go code to find it, and even then, fully understand how to format it? One alternative might be add a second field to the Go help text, so you have both |
For anyone susceptible of reading the above and trying to do Apiary or Swagger, I wasted a fair amount of time back in the day and there was no way for those REST-API spec languages to accommodate what is not a REST API, so you end up with the same problem set as right now.
For me these are quality docs, simpler, easy to scroll through, to search, to patch if needed by just fixing go-ipfs sources directly. The people that come to these docs, get what they need, and move on with their lives because they found how to call an endpoint do not open issues to voice out support like those that get confused over the /add endpoint. What we should probably do is to have js-ipfs-api docs in the ipfs docs website too (but that is out of the scope of this repo, which is to generate docs for go-ipfs). |
Closing – repos mentioned in the top comment are no longer relevant (#48) We now have HTTP/CLI API docs automation introduced in ipfs/ipfs-docs#875 – example in ipfs/ipfs-docs#887 |
I believe this will be really confusing for users, right now we have:
Does anyone know the de decision behind?
The text was updated successfully, but these errors were encountered: