-
Notifications
You must be signed in to change notification settings - Fork 42
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
docs: API documentation tool #6
Comments
@lnielsen @jirikuncar @tiborsimko The main constraint is that we know that some modules will have more than just the REST API so we need a sphinx doc for the rest of the code. For module documentation I would use sphinxcontrib-httpdomain as we already use sphinx for the rest of the code, and leave services in charge of their own API documentation. As the markdown format is simple, it might be possible to bootstrap a doc from the sphinx one if it is really needed, that way the endpoints would be valid. This could be done in a third-party module. |
For my concern it's (2). Help services to create really good beautiful REST API documentation (which is critical for adoption of an API). I don't think it will be possible to use auto-generated documentation, as it won't be specific enough for each instance. |
If needed, we could do a invenio-rest-docs module where all this API documentation helpers exists. |
Another points is that per service you might want a coherent view - e.g on Zenodo I won't not one REST API documentation but also integrate the OAI-PMH API documentation. |
I'm not sure to follow. If we don't provide the services' API doc content, what would be providing invenio-rest-docs which would not be already in From the top of my head I can see one use case only: Helping the service developer make sure that their API has documented the last features provided by all invenio modules. It could be done automatically in travis/jenkins/younameit and does not imply generating the service's API doc. |
Seems interesting. The sphinx docs are good for the framework developers (the docs staying close to the code), the httpdomain extension does a good job for REST API semantics and formatting already, and if services are able to "collect" these docs for even prettier reformatting, then so much the better. |
... and what about swagger? (now called OpenAPI Initiative ) You can:
You can have a look to an example of API description and a demo website that show documentation. |
You can also watch a EP2016 talk about Flask-RESTPlus which is using Swagger UI (https://www.youtube.com/watch?v=OTWs0wPHU-g). |
Also ORCID is using Swagger. https://pub.orcid.org/v2.0_rc1/ |
Personally I really dislike Swagger style of documentation compared to the style from e.g. slate. Btw, there's also e.g. http://jsonapi.org when we talk about standards. |
@lnielsen I have written up a comparison of four tools which can convert OpenAPI / Swagger definitions into Slate-compatible markdown, in case it's of any interest? There's also a more Slate-like theme for Swagger-UI here |
E.g. https://github.com/tripit/slate
The text was updated successfully, but these errors were encountered: