Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

API docs generation for Docs v2 #26

Closed
hsanjuan opened this issue Mar 9, 2020 · 4 comments
Closed

API docs generation for Docs v2 #26

hsanjuan opened this issue Mar 9, 2020 · 4 comments
Assignees

Comments

@hsanjuan
Copy link
Member

hsanjuan commented Mar 9, 2020

This issue is to discuss what to make of this library for the upcoming v2 docs:

cc. @jessicaschilling @johnnymatthews

It seems https://docs-beta.ipfs.io/reference/http/api/#getting-started includes the generated HTTP API docs, but I am not sure if they were changed by hand or it is the raw output from here.

I'd like to know if this library needs maintenance, and if we put time into the maintenance, what things do you want out of it. Alternatively we should signal clearly if this is dropped or deprecated.

Maintaining API documentation manually is a very painful process that luckily no one had to go through in the last years, and still we have fairly updated and accurate API docs. So my personal recommendation is to keep this, even with it's shortcomings.

Things that could be improved if we decide to keep this around:

  • Go all over the docs and fix wordings, improve descriptions etc in go-ipfs so that they make sense for both CLI and HTTP.
  • Add HTTP-Specific descriptions to go-ipfs when they don't fit.
  • Add manual specification for of the most problematic endpoints (essentially /add), which describes how to actually add folders, the multipart types etc.
  • Add more descriptions about general API features that affect several endpoints (stream errors, trailer headers).
  • Improve formatting of generated text, anchor links etc
  • Automate generation process on every new release
  • Potentially generate multiple pages (one per endpoint) rather than a single one (I am really against this, but it has been brought up).
  • Include fetching/generation of js-ipfs HTTP API docs
  • Document potential differences between the written Spec and the actual implementations.
  • ...
@hsanjuan hsanjuan self-assigned this Mar 9, 2020
@jessicaschilling
Copy link
Contributor

These did indeed start with the generated API docs but needed quite a bit of massaging (mainly search/replace to escape out things that didn’t render correctly in markdown, IIRC) to display properly. (Note that the result of not escaping out errant characters was that the page just stopped rendering at that point.)

I know @johnnymatthews has both experience with and ideas for API docs going forward, as well as an epic-sized issue in the docs repo as a placeholder for discussing this matter, so I’ll let y’all chat further.

@jessicaschilling
Copy link
Contributor

Also see: https://github.com/ipfs/docs/issues/393

@hsanjuan
Copy link
Member Author

hsanjuan commented Mar 9, 2020

These did indeed start with the generated API docs but needed quite a bit of massaging (mainly search/replace to escape out things that didn’t render correctly in markdown, IIRC) to display properly. (Note that the result of not escaping out errant characters was that the page just stopped rendering at that point.)

ok, so that massaging should happen in the generator. I can diff things and get the generator produce exactly what the v2 docs show now.

@lidel
Copy link
Contributor

lidel commented Sep 21, 2021

Continued in ipfs/ipfs-docs#267

@lidel lidel closed this as completed Sep 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants